Commit Graph

34 Commits

Author SHA1 Message Date
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
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
James Barnett b83ee106f7 Merge branch 'master' into local_api_docs 2018-05-23 10:06:12 -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 fc079138fd Service API doc second pass 2018-05-15 14:34:15 -05:00
James Barnett 68ad91763a Merge branch 'rapid7/master' into MS-3062_workspaces 2018-04-16 15:33:59 -05:00
Matthew Kienow 3db19fe4f2 Fix DBManager::Service use of services method
services method was previously modified to use a hash as the parameter,
but each_service was passing a workspace. Make each_service method
consistent with other DBManager modules.
2018-04-11 11:43:12 -04:00
James Barnett cd48b47760 Fix failing tests.
-Was accidentally deleting opts[:workspace] instead of processing
-Update notes help text expectations
2018-04-10 17:10:32 -05:00
James Barnett e51f41fa34 Merge remote-tracking branch 'msf_jbarnett/fix_services_bugs' into MS-3062_workspaces 2018-04-10 13:35:33 -05:00
James Barnett 48c0bbfa7a Only display the services for a given workspace 2018-04-10 10:28:02 -05:00
James Barnett 852bc3d237 Dont inject :workspace into every HTTP request. 2018-04-04 16:30:25 -05: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 e480b7dd2c Only do regex search if search_term is passed 2018-03-12 17:14:44 -05:00
James Barnett 2e287135c4 Fix bug in services search 2018-03-12 16:37:16 -05:00
James Barnett 65f5eeb534 Strip :workspace from service update 2018-03-12 12:28:39 -05:00
James Barnett c52daf43bf Forcefully delete service as fallback 2018-03-07 12:07:47 -06:00
James Barnett fd4032928e Add services search 2018-03-02 10:57:35 -06:00
James Barnett 06d2482e86 Implement services update
NOTE: This changes functionality for the services command flags.
Previously -s and -p were used for searching for services.
Now the commands will only be used for adds/updates.
If you would like to search, please use -s and pass a search string
2018-02-28 15:12:23 -06:00
James Barnett dffbc67e71 Implement service delete
Also fix bug searching for services by host address
2018-02-27 17:17:07 -06:00
James Barnett 96709600e1 Condense services to use opts instead of individual params 2018-02-27 13:38:50 -06:00
James Barnett 9dc6089fcf Merge branch 'goliath' into MS-2909 2018-02-27 11:14:15 -06:00
James Barnett 3c9092f9a6 Complete services GET 2018-02-20 14:41:49 -06:00
Sliim 7f1803590e Fixed on_db_*_state db events
Missed arguments for on_db_host_state and on_db_service_state methods.
Call these methods only when host/service state changed and pass the
old state as argument `ostate` (not sure about what `ostate` meens..)
2018-01-25 21:47:38 +01:00
Sliim 95e9707349 Call db event handlers
Implemented plugins handlers defined in
lib/msf/core/database_event.rb:
- on_db_client
- on_db_host
- on_db_service
- on_db_vuln
- on_db_host_state
- on_db_ref
- on_db_service_state
2018-01-21 19:35:55 +01:00
Brent Cook bb0a0b5cd9 apply empty attribute fix in more places, simplify and unify 2017-04-13 22:07:10 -05:00
darkbushido 099cf87e54 Catching errors where we are passing invalid attributes
We need to pass :task down for some functionality in pro.
while the error is valid we really shouldnt be passing the task all the way down if its blank but we need
the check there or we will end up with the same problem with pro.
2017-04-10 15:05:53 -05:00
Adam Cammack e542a6c8cf Fix importing with Acunetix
Add a default scheme of `http://` to URIs without a scheme. Also update
some documentation.
2016-01-28 16:37:14 -06:00
James Lee 44dd45e48d Use a const instead of hardcoding "tcp" everywhere 2015-03-31 16:15:04 -05:00
Christian Catalan 3deac54d3f Convert find_or_initialize_by_X to Rails 4 compatible.
MSP-12018
2015-02-03 16:09:49 -06:00
Luke Imhoff 200d64040d Fully-qualify Msf::ServiceState
MSP-11152

Replace unqualified `ServiceState` with `Msf::ServiceState`.
2014-10-17 11:58:11 -05:00
Luke Imhoff 0284edf430 Extract Msf::DBManager::Service
MSP-11124

Extract methods related to `Mdm::Service`s.
2014-10-09 11:31:29 -05:00