Commit Graph

341 Commits

Author SHA1 Message Date
Ashley Donaldson 360a0b866a Updated cached sizes because of new UA string 2021-11-10 17:27:02 +11:00
Jeffrey Martin 047a1eba07 Rails 6.1 upgrade 2021-08-09 12:16:08 -05:00
A Galway 134e820322 removes obsolete has_host? usage 2021-06-01 12:02:58 +01:00
cgranleese-r7 98349a6823 Improve handling of external modules when missing runtime dependencies 2021-02-02 14:49:16 +00:00
dwelch-r7 2eb5208ae0 Rename shared example files to remove warnings 2021-01-19 12:32:58 +00:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Jeffrey Martin d99db6ac0e refactor test for ruby 2.7 deprecations
addresses `warning: deprecated Object#=~ is called on Array; it always returns nil`
2020-11-20 10:59:04 -06:00
Grant Willcox 5986bc98f1 Land #14171, Replace erroneous calls to get_service with calls to service 2020-09-30 10:05:13 -05:00
Jeffrey Martin 894ce6b72b ignore cache size for peinject stage 2020-09-25 16:12:44 -05:00
adfoster-r7 9ef5822d3a Revert "Replaces erroneous calls to get_service" 2020-09-18 19:09:25 +01:00
Adam Galway 14b233f957 fixes broken tests 2020-09-16 15:20:16 +01:00
Jeffrey Martin 9a64e3cd38 Land #13913, [GSoC] Specs for the SQLi library 2020-08-20 17:43:11 -05:00
Alan Foster baa33df45d Always use module cache for searching 2020-08-14 19:14:54 +01:00
Niboucha Redouane e4b77616fa Minor formatting (rubocop -a) 2020-08-08 03:49:29 +02:00
Niboucha Redouane 1f17b07746 use Timecop, separate query_proc from sqli_obj, and address other issues in the specs 2020-08-08 03:30:12 +02:00
Jeffrey Martin 8a86cad4a0 remove commented lines not needed 2020-07-31 11:56:52 -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 41776f093c adjust xml spec to use FactoryBot for workspace 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 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
Niboucha Redouane f48ed5027f test #call_function, and not methods that might be implemented on specific DBMS only 2020-07-27 16:38:07 +02:00
Niboucha Redouane 89fef9f9fe Refactor and fix some specs, avoid sleeping in time-based shared examples 2020-07-27 03:15:16 +02:00
Niboucha Redouane 854df7e93b Add shared examples for SQLi::Common, and some tests for MySQLi 2020-07-23 18:54:20 +02:00
Alan Foster 2509bbfbc3 Remove rspec test focus, and ensure all tests run 2020-07-07 17:29:50 +01:00
Jeffrey Martin e883b07fd6 add helper for payloads not cached 2019-11-25 15:59:32 -06:00
Matthew Kienow 4e11dcfee1 Fix import issue caused by missing wspace key
Modify import module to follow pattern used in other Msf::DBManager
import modules. Test module updated for method name changes.
2019-07-01 15:58:36 -04:00
Jacob Robles bf6a62fba8 Add workspace arg to spec 2019-06-05 08:47:13 -05:00
Jeffrey Martin 3c6e2160b9 remove spec tests nolonger valid after app removed 2019-01-31 12:14:30 -06:00
Matthew Kienow 35f95e4b04 Update test for new cred methods
Correct remote data service test behavior.
2019-01-18 12:34:29 -05:00
Matthew Kienow 63c3404f64 Add test for session_events method 2019-01-08 14:02:40 -05:00
Matthew Kienow ff8c70f6af Restore events test for remote DB 2018-12-21 22:19:09 -05:00
William Vu b1c633faf6 Add Group Policy Preferences support to db_import
And take the Jaden Smith approach, as @busterb quipped to me. :)

This one's a little weird, since you normally import scans into
Metasploit, but now that creds are first-class in the database, it makes
more sense to be able to import them.

Currently, your alternatives are post/windows/gather/credentials/gpp,
which requires a session, and auxiliary/scanner/smb/smb_enum_gpp, which
requires a network scan.
2018-08-21 23:44:39 -05:00
Adam Cammack 77bbb517c6 Land #10446, Add missing payload tests
Also adds consideration for IPv6 values needed for some payloads.
2018-08-15 14:46:33 -05:00
Jeffrey Martin 2bea3fdb48 verify sizes for ipv6 when payload is ipv6 2018-08-11 10:31:31 -05:00
James Barnett b8ae4f5d12 Update rspec tests for creds and add stubs 2018-07-11 17:42:55 -05:00
Matthew Kienow 7e145a09de Fix spec tests to match existing methods 2018-05-14 17:43:24 -04:00
christopher lee 94de5a4e42 Add skip message, add event test 2018-05-03 14:20:32 -05:00
christopher lee a7ec7b52b7 Fix error on data server due to unexpected report_exploit call 2018-05-02 14:59:02 -05:00
christopher lee e97693d056 Cleanup 2018-04-26 16:01:15 -05:00
christopher lee 071a191055 Merge master + workspace removal from http remote data service 2018-04-25 13:39:46 -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 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
Brent Cook 226ef160ff Land #9748, Convert the smbloris DoS into an external module
Help reliability and performance. This some Ruby-specific external module
tooling as a result as well.
2018-04-02 23:25:10 -05:00
christopher lee 3aed6d6666 Initial 2018-04-02 08:08:23 -05:00
Brent Cook b134a33877 Merge branch 'master' into land-9740 2018-03-27 11:59:55 -05:00
Adam Cammack c28fe65d98 Exclude Ruby external modules from rspec
The sum of the testing code and loading code assumptions was that all
files with the same extension in the same folder were all loadable with
the same loader. This is no longer the case, and until we are ready to
test the load-ability of external modules we can safely ignore them.
2018-03-23 16:44:58 -05:00
Christian Mehlmauer 7d873ea7ab replace factory_girls with factory_bot fixes #9736 2018-03-21 23:21:37 +01:00
James Barnett 45a6b244a7 Fix services spec 2018-03-16 17:10:02 -05:00