Commit Graph

657 Commits

Author SHA1 Message Date
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
Adam Galway 1a2bf98222 creates standard elog & updates exisiting usages 2020-06-22 12:48:39 +01: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
Auxilus 26b2ec3d84 remove spaces at EOL 2020-03-24 18:08:34 +05:30
Pearce Barry 4cc12f1890 Land #12740, Remove method call side-effects 2019-12-17 18:17:34 -06:00
Jeffrey Martin 0aaa4265be do not remove workspace needed for other reports 2019-12-17 14:11:59 -06:00
Jeffrey Martin e5ce6dc8de do not delete workspace reference 2019-12-17 14:11:58 -06:00
Jeffrey Martin aaddc9d8a5 don't rely on side-effects in db util function 2019-12-17 14:11:58 -06:00
Jeffrey Martin 31ed5d553f ensure ref name exists 2019-12-17 11:00:00 -06:00
Jeffrey Martin b786a44c2e support Mdm::Module::Ref object when linking vulns 2019-12-16 17:16:01 -06:00
Jeffrey Martin ba06624e57 consistent usage of :workspace key 2019-11-22 11:16:22 -06:00
Brent Cook 3e951b3f4b Land #12457, consolidate workspace actions 2019-11-19 17:10:36 -06:00