Commit Graph

172 Commits

Author SHA1 Message Date
Dean Welch 792708c07b Remove all references to Msf::SymbolicModule 2024-02-07 15:08:47 +00:00
Jeffrey Martin efd49f07b0 update migration calls in spec
As of Rails 7.0.5 the `migrations_paths` are called once in spec run
2023-06-13 17:15:19 -05: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
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
Adam Galway 14b233f957 fixes broken tests 2020-09-16 15:20:16 +01: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
Alan Foster 2509bbfbc3 Remove rspec test focus, and ensure all tests run 2020-07-07 17:29:50 +01: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
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 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
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
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
christopher lee d5978803eb Fix all failing rspec for goliath 2018-01-19 15:16:19 -06: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
OJ d751c43f52 FINALLY fix the last of the tests
Sorry for the stupidity.
2016-11-05 06:20:43 +10:00
OJ 3bc6808278 Really fix the session test this time 2016-11-05 06:07:44 +10:00
OJ 5f5684841b Fix the DB/Session test 2016-11-05 05:59:31 +10:00
Brent Cook 1b31e0a63e remove osvdb links 2016-09-20 14:27:59 -05:00
Brent Cook b08d1ad8d8 Revert "Land #6812, remove broken OSVDB references"
This reverts commit 2b016e0216, reversing
changes made to 7b1d9596c7.
2016-07-15 12:00:31 -05:00
Brent Cook 2b016e0216 Land #6812, remove broken OSVDB references 2016-07-11 22:59:11 -05:00
dmohanty-r7 050061762b Fix db_manager rspec tests
MS-255
2016-04-28 13:17:02 -05:00
James Lee e7f0163c2e Apparently super doesn't work the same here in 2.3
But it doesn't matter, the value just needs to be before the current
time, so replace it with a simpler solution.
2016-04-26 10:35:41 -05:00
wchen-r7 816bc91e45 Resolve #6807, remove all OSVDB references.
OSVDB is no longer a vulnerability database, therefore all the
references linked to it are invalid.

Resolve #6807
2016-04-23 12:32:34 -05:00
David Maloney c6656e4031 example_group and hook_scope conversions
not strictly required, these conversions keep us
up to date with latest rspec conventions and best practices
which will prevent use from having to convert them when they become
deprecated later
2015-12-31 16:56:13 -06:00
Luke Imhoff 6f71810010 it { should -> it { is_expected.to
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 05585acb89 .should_not -> expect().not_to
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 337be4355d Fix Msf::DBManager spec upgrade problems
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 0eb68ef16c .should_not_receive -> expect().not_to receive
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 4870909afc .should -> expect().to
MSP-13484
2015-12-10 21:47:22 -06:00