Commit Graph

49 Commits

Author SHA1 Message Date
James Barnett 90542779ff Audit models to ensure :workspace is passed only when needed 2018-04-09 14:50:37 -05:00
James Barnett fe224f628b Remove update_host_via_sysinfo since it is unused 2018-04-05 14:20:25 -05:00
James Barnett def0e4d93b Merge branch 'goliath' into MS-3062_workspaces 2018-03-23 11:37:01 -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
Matthew Kienow 7ad7188824 Fix comment typo 2018-02-22 11:29:44 -05:00
James Barnett d4440d049d Merge branch 'goliath' of github.com:clee-r7/metasploit-framework into goliath 2018-02-21 11:16:31 -06:00
James Barnett 3005a8b7ce Merge branch 'rapid7/master' into goliath 2018-02-21 11:16:05 -06:00
James Barnett f114092445 Merge branch 'goliath' into MS-2833 2018-02-08 14:32:03 -06:00
Matthew Kienow de0c4c0572 Allow update of host workspace 2018-02-08 13:19:27 -05:00
James Barnett 5b35662dbf Address PR comments 2018-02-07 14:21:31 -06:00
Matthew Kienow 52b8f405bd Refactor change host methods, remove debug output 2018-02-06 18:54:05 -05:00
Matthew Kienow 629f79ebf7 WIP remote host update 2018-02-06 16:11:46 -05:00
James Barnett e8b29af208 Merge branch 'goliath' into MS-2833 2018-02-02 17:32:17 -06:00
Matthew Kienow dcf4171cfb Fix query array encoding issue 2018-02-02 17:16:12 -05:00
Matthew Kienow 67b7af3385 Add tag conditions to host search 2018-02-02 01:33:15 -05:00
James Barnett fc7ab6cbff Merge branch 'externalize-host-data-search' into MS-2833 2018-02-01 11:24:11 -06:00
Matthew Kienow 5c38207a8e WIP externalize host data search 2018-01-31 16:34:42 -05: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
James Barnett 858981d814 Convert hosts delete to use id method 2018-01-24 17:38:51 -06: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
christopher lee d5978803eb Fix all failing rspec for goliath 2018-01-19 15:16:19 -06:00
James Barnett b2666ad3f2 Update host delete method to return full objects of deleted hosts 2018-01-11 16:12:25 -06:00
Matthew Kienow 6c3dbfa275 Remove debug output and cleanup of delete_host 2017-12-27 16:49:53 -05:00
Matthew Kienow 331c09ab1b Fix issue in currently unused delete_host option 2017-12-27 14:35:20 -05:00
Matthew Kienow 5e4836b1e9 Implement hosts remote data store delete
Also, resolve an issue when adding a host where the client-side
raises an exception.
2017-12-26 23:09:23 -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
christopher lee 000f561d6f Added session data export 2017-09-08 11:09:15 -05:00
christopher lee c09796ea7e Merge master 2017-08-23 11:37:04 -05:00
james 9858147dae Add module to detect Docker and LXC containers
Detect Docker by:
 - Presence of .dockerenv file.
 - Finding "docker" in /proc/1/cgroup
Detect LXC by:
 - Finding "lxc" in /proc/1/cgroup
2017-08-05 18:59:36 -05:00
christopher lee b81e9a4d2a Pass 1: externalize database 2017-07-07 13:33:42 -05:00
Brent Cook bb0a0b5cd9 apply empty attribute fix in more places, simplify and unify 2017-04-13 22:07:10 -05:00
darkbushido e0ecf0972e dropping extra spaces 2017-04-10 15:19:36 -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
darkbushido 271fd589f2 Revert "Land #8135, Report hosts always add ip to hostname if hostname is blank"
This reverts commit 5a1c7ca8af, reversing
changes made to d10b3da6ec.
2017-03-23 10:05:58 -05:00
darkbushido 60bc279eb3 removing extra whitespace 2017-03-21 10:40:59 -05:00
darkbushido 1221a20d0d reversing the logic to check for .blank? 2017-03-21 10:35:19 -05:00
darkbushido 7ff7c707c9 setting host_name to address if host_name is blank. 2017-03-21 10:26:57 -05:00
David Maloney 05ac2ee6ed convert first stage to os_family
added the new os-family column to Host
so now we use that as our first stage filter
for targets

MS-2325
2017-01-03 14:38:49 -06:00
Matt Buck 912f41292a Drop some unused code 2015-04-30 11:25:57 -05:00
Matt Buck 5e2d6c27c3 Merge branch 'master' into staging/rails-4.0
Conflicts:
	Gemfile.lock
	db/schema.rb
	lib/msf/core/db_manager/session.rb
	metasploit-framework-db.gemspec
2015-04-06 11:27:00 -05:00
James Lee 1b0e3f13c6 Remove unnecessary extra assignment 2015-03-30 13:14:36 -05:00
Matt Buck f29a3f69e9 Merge branch 'master' into staging/rails-4.0
Conflicts:
	Gemfile.lock
	metasploit-framework-db.gemspec
2015-03-17 15:47:48 -05:00
joev ca3b2220b5 Check to ensure Mdm is loaded to fix store_loot. 2015-03-05 23:27:13 -06:00
Matt Buck d4d1dc09f3 Merge branch 'master' into staging/rails-4.0
Conflicts:
	Gemfile.lock
	db/schema.rb
	metasploit-framework-db.gemspec
	metasploit-framework.gemspec
2015-02-13 16:13:18 -06:00
Sonny Gonzalez dc1eab377c Rails 4 finder conversion: convert find_or_initialize_by_x_and_y
MSP-12153

* convert to where(conditions).first_or_initialize
2015-02-13 12:39:44 -06:00
Sonny Gonzalez 7c57b9fb57 Fix Master - Pro build
MSP-12138

* revert to previous Rails 3 syntax.
2015-02-11 12:02:34 -06:00
Christian Catalan 3deac54d3f Convert find_or_initialize_by_X to Rails 4 compatible.
MSP-12018
2015-02-03 16:09:49 -06:00
darkbushido 8d664bee9a normalize_host dropps scope if it exists
s
2014-10-28 15:34:54 -05:00
Luke Imhoff 0cfac32290 Extract Msf::DBManager::Host
MSP-11124

Extract methods related to `Mdm::Host`s.
2014-10-09 11:11:36 -05:00