Commit Graph

322 Commits (00e4a8881f5053a9c98dd98027070c08eb1de03d)

Author SHA1 Message Date
Tod Beardsley 1deacad2be
Add a print_bad alias for print_error
Came up on Twitter, where Justin may have been trolling a little:

https://twitter.com/jstnkndy/status/798671298302017536

We have a `print_good` method, but not a `print_bad`, which seems a
little weird for Ruby -- opposite methods should be intuitive as Justin
is implying.

Anyway, I went with alias_method, thanks to the compelling argument at

https://github.com/bbatsov/ruby-style-guide#alias-method

...since Metasploit is all about the singleton, and didn't want to risk
some unexpected scoping thing.

Also dang, we define the `print_` methods like fifty billion times!
Really should fix that some day.
2016-11-15 19:20:42 -06:00
Louis Sato ca683576d0 Mock rex-socket getaddress call for loginscanner
Since we're using the rex-socket gem, we don't need to
test the getaddress call for each one of the login scanner specs
2016-09-28 11:32:06 -05:00
Brent Cook 1b31e0a63e remove osvdb links 2016-09-20 14:27:59 -05:00
David Maloney 7e10b5c482
use new rex-encoder gem
remove all the encoidng lbiraries and use the new gem
rex-encoder that contains them now.

MS-1708
2016-09-14 12:07:26 -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
David Maloney fb5b228984
Merge branch 'master' into staging/rails-upgrade 2016-05-02 11:33:35 -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
Fernando Arias 8f3f2f74b4
Move shared example from pro into framework
MS-1361
2016-04-07 13:09:52 -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
Gregory Mikeska 99931aff44 Call stance only if module implements stance 2015-12-10 21:47:22 -06:00
Greg Mikeska a96445b302 switch out expect with a proper mock by allow 2015-12-10 21:47:22 -06:00
Greg Mikeska 5056321d34 replace before block expecations with allow statements
comment out some before statements that seem to be causing a problem
2015-12-10 21:47:22 -06:00
Greg Mikeska 71ce9b377a change module manager stub from expect to allow 2015-12-10 21:47:22 -06:00
Greg Mikeska 2fc0c0b326 switch expect stubs
in ui_driver shared context to allows
2015-12-10 21:47:22 -06:00
Greg Mikeska 93d4be2301 replace stubbing expects with allow statements 2015-12-10 21:47:22 -06:00
jvazquez-r7 2beb42a734 Use msf_data attribute 2015-12-10 21:47:22 -06:00
jvazquez-r7 bc80bf7fdb use Msf::StringIO on client_spec 2015-12-10 21:47:22 -06:00
jvazquez-r7 3d0fcdf84d Add set_msf_data 2015-12-10 21:47:22 -06:00
jvazquez-r7 2041149d54 Use Msf::StringIO in connection_spec 2015-12-10 21:47:22 -06:00
jvazquez-r7 4872628ff5 Try to make it generic 2015-12-10 21:47:22 -06:00
jvazquez-r7 236c28b6fb Add shared context 2015-12-10 21:47:22 -06:00
Luke Imhoff 3d64c52c9a it { should_not -> it { is_expected.not_to
MSP-13484
2015-12-10 21:47:22 -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 d1f64363b1 .any_instance -> *_any_isntance_of()
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
Luke Imhoff 2534b18f4c .stub -> expect().to receive
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 03c649bb91 should_receive -> expect().to receive
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 6f29e9a4cf .should == -> expect().to eq
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff 3fff6cabce should_not == -> expect().not_to eq
MSP-13484
2015-12-10 21:47:22 -06:00
Luke Imhoff fc9ca84da5 shared_context -> RSpec.shared_context
MSP-13484

shared_context must be qualified as global patching is disabled in
spec_helper.
2015-12-10 21:47:22 -06:00
Fernando Arias d4b9b8e1a4
Stub out :create_match_for_vuln on MatchSet since we already test it
MSP-13119
2015-09-29 16:36:59 -05:00
Fernando Arias 52e3405192
Passing report_exploit_success specs
MSP-13119
2015-09-23 11:12:02 -05:00
Fernando Arias dc84b3b1ba
Passing report_exploit_failure specs
MSP-13119
2015-09-23 10:54:13 -05:00
Fernando Arias 359306a1a4
Add specs to exploit_attempt to cover report_exploit_failure
MSP-13119
2015-09-18 12:25:21 -05:00
Fernando Arias d3a73149a2
Add specs around match result creation in exploit attempt
MSP-13119
2015-09-18 12:04:45 -05:00
Fernando Arias c7f15ca940
Rework how match results get created
MSP-13119

* Create match result when we create vuln attempt
2015-09-14 12:18:47 -05:00
Jon Hart 0f9032100d
Stub print_status to allow testing of workspace...
and other things that may use print_status rather than print line
2015-08-28 11:10:35 -07:00
Dev Mohanty 68a802b980 Merge pull request #5834 from gmikeska-r7/bug/MSP-13064/SVV-validations-not-created
Bug/msp 13064/svv validations not created
2015-08-19 12:47:59 -05:00
jvazquez-r7 f25a5da46f
Do Minor fixes 2015-08-14 12:37:49 -05:00
Greg Mikeska 66148336e1
Modify tests to resolve false negative
MSP-13064
2015-08-14 11:48:52 -05:00
Brent Cook 6b1e911041 Instantiate payload modules so parameter validation occurs
Calling .new on payload modules does not perform parameter validation, leading
to a number cached sizes based on invalid parameters. Most notably,
normalization does not occur either, which makes all OptBool params default to
true.
2015-08-14 11:35:39 -05:00
Matt Buck 8163c3cdda Merge branch 'master' into staging/rails-4.0
Conflicts:
	Gemfile.lock
	plugins/nessus.rb
2015-04-28 15:33:46 -05:00
Matt Buck 6a4d63ca4f Drop explicit IPAddr to String coercion
MSP-12611
2015-04-27 10:48:13 -05:00
jvazquez-r7 4224008709
Delete print_debug/vprint_debug 2015-04-21 11:14:03 -05:00