Commit Graph

29 Commits

Author SHA1 Message Date
h00die d64ed33cdf code spell for a bunch of modules 2023-09-24 17:42:00 -04:00
Spencer McIntyre 69f0234e48 Use #address as the host address instead of the MDM object 2020-09-30 14:28:09 -04:00
Adam Galway a0d6431ed5 adds protocol to search terms 2020-09-22 12:44:32 +01:00
Adam Galway 4918ecf826 replaced get_service calls with services calls 2020-09-16 12:29:15 +01:00
Christophe De La Fuente 5b51c338fa Make sure mode is a symbol 2020-08-06 19:00:39 +02:00
Jeffrey Martin 07cbe426e2 Rails 5, all models inherit from ApplicationRecord
ApplicationRecord is a new superclass for all app models, analogous to app controllers subclassing ApplicationController instead of ActionController::Base. This gives apps a single spot to configure app-wide model behavior.
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-models-now-inherit-from-applicationrecord-by-default

Deprecated Relation#uniq use Relation#distinct instead.
https://edgeguides.rubyonrails.org/5_0_release_notes.html#active-record-deprecations
2020-07-31 11:56:49 -05:00
Jeffrey Martin aaddc9d8a5 don't rely on side-effects in db util function 2019-12-17 14:11:58 -06:00
Erin Bleiweiss 0435d7e1d6 Return the updated objects 2019-01-10 11:04:42 -06:00
Erin Bleiweiss 771469f4cd Update all Mdm::xx.update() instances 2019-01-07 16:24:13 -06:00
Adam Cammack 54abc65c55 Land #10406, Fix notes service, port, protocol 2018-08-01 14:39:34 -05:00
William Vu 2bca1ade05 Normalize note proto better and actually use it 2018-07-31 11:51:34 -05:00
James Barnett 2ef639f99e opts[:id] could sometimes be an integer, so cast to string 2018-07-31 10:58:01 -05:00
James Barnett 4da27d2bff Enable GET for /endpoint/ID for each model 2018-07-18 15:18:22 -05:00
Matthew Kienow 4ecc1ff551 Modify loots, notes and services search methods
Modify loots and services method signatures. Remove workspace as a
positional argument, move into opts hash argument and update callers.
Made host search for these models more uniform. Update find_or_create
methods to handle difference in opts between find and report
operations.
2018-05-21 17:37:51 -04:00
James Barnett 68ad91763a Merge branch 'rapid7/master' into MS-3062_workspaces 2018-04-16 15:33:59 -05:00
Matthew Kienow e283f109a7 Remove commented out code 2018-04-16 14:14:46 -04:00
Matthew Kienow 37479d8fd4 Modify notes search to handle serialized data
Initial Goliath notes search implementation attempted to use Arel and
decode base64 serialized data column, however, this was not without
issue. Updated implementation retrieves all records that match
conditions, thus data has been deserialized and then filters using
specified search term.
2018-04-12 17:37:16 -04:00
James Barnett 90542779ff Audit models to ensure :workspace is passed only when needed 2018-04-09 14:50:37 -05:00
James Barnett 6a02712674 Merge remote-tracking branch 'mkienow/MS-3061-remote-notes-read-update-delete' into MS-3062_workspaces 2018-04-04 16:03:43 -05:00
Matthew Kienow cb2366d2eb Fix regex search for serialized data column 2018-03-30 19:25:38 -04:00
James Barnett 1b6aa86d92 Merge remote-tracking branch 'mkienow/MS-3061-remote-notes-read-update-delete' into MS-3062_workspaces 2018-03-27 15:57:41 -05:00
Matthew Kienow 0b5d3d31f9 WIP remote note read, update, delete 2018-03-27 16:36:56 -04:00
James Barnett 466c97f114 WIP: move tracking active workspace to client side
* Move the @current_workspace tracking to workspace proxy
* Create helper for handling workspace value in opts
* Call framework.db.proxy across dbmanager files now that active ws is tracked in proxy

NOTE: This commit throws an exception when adding a remote data service.
2018-03-22 21:00:06 -05:00
James Barnett f88840e5b7 Move normaliize_host to a library method
This method was in Msf::DbManager class but doesn't actually use the DB.
This required you to have a DB connection just to do the check.
Moved it out to a helper library so we have access to it without forcing
a DB connection.
2017-09-28 16:59:44 -05:00
David Maloney 095431c323 fix note search conditions
note search conditions needed to know about
vuln_id or else vuln notes would get overwritten

MSP-12183
2015-02-26 15:48:04 -06:00
David Maloney e4a58a2ec5 import notes attached to vulns
add the ability to import notes that
are attached to vulns instead of hosts

MSP-12183
2015-02-24 13:36:57 -06:00
Julio Auto 812aa9bc1a Reduce number of calls to to_s and downcase 2014-11-13 14:56:17 -06:00
Julio Auto e72d9bd21f Fix report_note handling incorrect protocol names 2014-11-13 14:30:43 -06:00
Luke Imhoff 2fa02f5c44 Extract Msf::DBManager::Note
Extract all methods related to `Mdm::Note`s.
2014-10-09 15:29:07 -05:00