Commit Graph

669 Commits

Author SHA1 Message Date
h00die d64ed33cdf code spell for a bunch of modules 2023-09-24 17:42:00 -04:00
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
adfoster-r7 e7c05eabe3 Fix deadlock regression when printing multiple lines to console 2023-04-25 00:39:44 +01:00
bcoles 3b7cf035ea DBManager: Import: Add Nuclei JSON database import 2023-04-10 22:22:19 +10:00
adfoster-r7 90d4b660f7 Update brocade tests to pass locally 2023-03-15 13:23:01 +00:00
bcoles 9dcaf93b29 Replace deprecated File.exists? with File.exist? 2023-03-05 14:30:47 +11:00
Jeffrey Martin d9716ebecf core updates for Rails 7 2023-01-23 09:57:09 -06:00
Jeffrey Martin 016a1c9da9 one more safer access 2022-10-18 15:02:58 -05:00
Jeffrey Martin 7b9ed4a1da corrections to reference IDs 2022-10-18 14:57:44 -05:00
Jeffrey Martin 82bd12566f remove constant not used 2022-10-17 15:19:35 -05:00
Jeffrey Martin 2022b507a6 Qualys parser now uses 'Nokogiri::XML'/xpath 2022-10-17 15:03:54 -05:00
Jeffrey Martin 8cc21f9b01 improve qualys import times
When importing data from recent Qualys reports many `RESULT` tags contain
extra long lines and significant content that result in extremely long processing
times when parsed by REXML. By removing all `RESULT` tags not currently processed
during import the time to process data can be significantly improved.
2022-10-17 13:14: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
dwelch-r7 afb9cbfb77 Only normalize new/updated hosts after nmap import 2021-11-25 13:46:57 +00:00
Spencer McIntyre a76eb67d89 Add the DB_SKIP_EXISTING option 2021-09-02 11:57:36 -04:00
Spencer McIntyre 877ea86aaf Support filtering creds by realm 2021-08-30 11:13:12 -04:00
Spencer McIntyre f1395e40f1 Allow querying creds based on the JtR type 2021-08-30 10:30:47 -04:00
Jeffrey Martin 1fe26b8c6c connection_config is deprecated 2021-08-09 12:16:11 -05:00
Jeffrey Martin 047a1eba07 Rails 6.1 upgrade 2021-08-09 12:16:08 -05:00
adfoster-r7 11fb9e8e87 Land #15194, Fix RPORT tab completion crash when connected to remote dataservice 2021-06-01 13:47:08 +01:00
A Galway 134e820322 removes obsolete has_host? usage 2021-06-01 12:02:58 +01:00
adfoster-r7 ac2c467121 Land #15011, Enhance analyze command API to understand modules' needs 2021-05-14 14:30:33 +01:00
Adam Cammack 4eb27bff31 Fix another typo 2021-05-14 07:10:23 -05:00
Adam Cammack cf993532bd Use correct variable name 2021-05-13 18:01:10 -05:00
Jeffrey Martin 5e495d72f5 avoid side effects on arguments
When passed arguments as `opts` prefer to avoid side-effects
from method execution.

This extends similar work from #12740
2021-04-13 16:11:09 -05:00
Adam Cammack 0122daa3e7 Add local modules and statuses to analyze 2021-03-16 10:37:25 -05:00
dwelch-r7 b95be3ed10 Zeitwerk rex folder 2021-02-08 12:24:12 +00:00
Jeffrey Martin ca0deec2c1 typo fix for error logged in import
`print_error` is not commonly used in import classes, this may not
be the best solution, however the typo needs to be addressed.
2020-12-21 10:21:38 -06:00
dwelch-r7 450193ed6a Send sessions records instead of IDs 2020-12-18 11:00:55 +00:00
dwelch-r7 f4e0278125 Add remote data service support for autoroute 2020-12-18 11:00:55 +00:00
Jeffrey Martin 5440415020 force active record object load
In some cases when `empty?` returns true `first` will fail to get db connection
2020-12-09 15:46:27 -06:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Grant Willcox fd4749488f Land #14445, Update XML import to utilize base64 decoding on the body 2020-12-04 11:06:12 -06:00
Matthew Hagan a232839a81 Update Unserialized Body For Binary Type
Co-authored-by: acammack-r7 <adam_cammack@rapid7.com>
2020-12-03 09:18:16 -07:00
Matthew Hagan a06f605675 Updated XML Import To Utilize Base64 Decoding On The Body 2020-11-25 11:48:58 -07: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
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
Matthew Hagan 97eb04a1e3 Fixing zip import errors
in particular:
•passed workspace as an object instead of calling `.name`
*loot and task processing now consumes `wspace` parameter
*fixed typo in `.delete` method
2020-08-25 17:45:30 -05:00
gwillcox-r7 c79f293e52 Land #13846, Add support for import Nmap vulners script output 2020-08-13 12:21:31 -05:00
Christophe De La Fuente 5b51c338fa Make sure mode is a symbol 2020-08-06 19:00:39 +02:00
Jeffrey Martin 1fdcde9d03 adjust vuln logic as nil service should be valid 2020-07-31 11:57:43 -05:00
Jeffrey Martin 0b65266ac1 adjust migration to proxy call to ActiveRecord
By adding proxy method the call to ActiveRecord::Migrator.migrations_paths
is decoupled from the migration task allowing more flexibility for the
underlying migration set selection to change in future Rails versions.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 2c92d17ed9 refactor migration process for Rails 5
As noted in https://github.com/rails/rails/issues/36544 using
ActiveRecord migrations internally is not truly supported. This
workaround is valid for Rails 5 and might be easily adjusted
in Rails 6 although that is still TBD.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 5d1c4dafa1 begin adjust migrations and remove old test
removed connection tests are from rails 3 expectations
2020-07-31 11:56:50 -05:00
Jeffrey Martin aeb6247e8e adjust vuln connection boundaries for rails 5 2020-07-31 11:56:50 -05: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 8fac591f7a rails 5.2 update 2020-07-31 11:56:42 -05:00
dwelch-r7 02b8d436c8 Import vulns discovered from nmap 2020-07-14 13:22:09 +01:00