Grant Willcox
cd00585e12
Support properly handling tagging multiple hosts and then deleting those tags.
...
This involves updating add_host_tag and delete_host_tag and performing some refactoring.
2023-06-21 09:31:55 -05:00
Spencer McIntyre
e28ee9ca53
Improve an error message when addr is nil
...
The normalized value can be nil when the hostname failed to resolve.
That is not helpful in the exception information, so use the original
value.
2022-03-15 14:01:26 -04:00
A Galway
134e820322
removes obsolete has_host? usage
2021-06-01 12:02:58 +01:00
Spencer McIntyre
291c883db8
Don't alter the os_name or os_flavor keys in report_host
2020-10-23 09:48:33 -04: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
Adam Galway
0bd43096f1
PRC return tags for del & add, simplified DB call
2020-04-23 17:01:32 +01:00
Adam Galway
789b5dec00
adds tag functionality for hosts
2020-04-22 16:47:23 +01:00
Jeffrey Martin
aaddc9d8a5
don't rely on side-effects in db util function
2019-12-17 14:11:58 -06:00
Jeffrey Martin
ba06624e57
consistent usage of :workspace key
2019-11-22 11:16:22 -06:00
James Barnett
65f127a66f
Land #11222 , Display error when update operation has invalid fields
2019-01-10 11:33:22 -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
Erin Bleiweiss
6641c606b2
Add support for db import from remote data service
2019-01-07 14:32:27 -06:00
Matthew Kienow
a683cedcce
Enhance race condition workaround in report_host
2018-12-14 12:28:16 -05:00
Jeffrey Martin
efeacf8666
ensure os_flavor can be supplied for no Windows OS
2018-10-23 12:22:57 -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
James Barnett
f8317d3ae2
Address code review comments
...
- Don't document unsupported session POST
- Hide unimplemented loot/id and session/id GET methods
- Fix URL for msf doc
- Add missing workspace parament to vuln-attempts
- Remove unneccessary code for hosting the doc UI
2018-05-29 12:24:53 -05:00
Matthew Kienow
4b13fbb5a3
Add workaround for race condition in report_host
...
Modify to use DBManager methods rather than DataProxy
2018-05-14 17:36:33 -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
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