Commit Graph

348 Commits (ffb319d7039ec6c3a2f42da20970370d19eb5c21)

Author SHA1 Message Date
jvazquez-r7 21742b6469 Test #3729 2014-12-06 21:20:52 -06:00
Trevor Rosen 2a033861dc
Just use constants directly
MSP-11673
2014-12-02 13:12:53 -06:00
Trevor Rosen 784e138b14
Extend replicants via arbitrary Ruby code
MSP-11673

* Implements a #register_extensions method on Msf::Module
* Any registered Ruby modules will extend the cloned module returned by #replicant
2014-12-02 12:18:30 -06:00
William Vu bd3d63a155
Land #4270, Msf::Author cleanup and improvements 2014-12-02 01:26:42 -06:00
Meatballs 3e0f909707
Remove debug file writes 2014-11-27 21:34:00 +00:00
Meatballs 94fa6a309c
Fix strip_whitespace speccing 2014-11-27 21:30:08 +00:00
Joe Vennix 99b87c2e97
Fix nonsensical spec. 2014-11-26 13:57:44 -06:00
Joe Vennix 2bd7a67413
Restructure parts of Author, fix some doc bugs. 2014-11-26 13:54:23 -06:00
Trevor Rosen 31184c67b4
Land #4223, specs for DB console command output
Wrap specs around current behavior of the DB command dispatcher,
in order to make upcoming refactor painless.

MSP-11622 #land
2014-11-25 13:30:08 -06:00
Luke Imhoff a2085199f5
Spec methods Msf::Ui::Console::CommandDispatcher::Db responds to
MSP-11622
2014-11-17 13:22:13 -06:00
Luke Imhoff 47f7119f58
Order spec
MSP-11622

Sort specs by describe/context name so it is easier to see if a method
has no specs.
2014-11-17 12:58:04 -06:00
Trevor Rosen 3b558624f3
Merge branch 'landing/4129' into upstream-master
Landing #4129

* Detect leaked constants in spec runs
2014-11-14 12:55:56 -06:00
Luke Imhoff 43511e648a
Merge branch 'chore/MSP-11614/remove-msf-db-manager-sink' into feature/MSP-11605/lazy-thread-creation
MSP-11605

Conflicts:
	spec/lib/msf/core/task_manager_spec.rb
2014-11-14 11:59:12 -06:00
Luke Imhoff 14fa1dba0b
Merge branch 'master' into feature/MSP-11605/lazy-thread-creation
MSP-11605
2014-11-14 11:58:16 -06:00
Luke Imhoff 5e6400a506
Remove Msf::TaskManager
MSP-11614

`Msf::TaskManager` was only used for `Msf::DBManager#sink`, which was
removed because it was unused, so `Msf::TaskManager` can also be
removed.
2014-11-14 11:15:05 -06:00
Luke Imhoff 55a8f6f339
Remove Msf::DBManager::Sink
MSP-11614

`Msf::DBManager::Sink` contains code for a `sink` that is a meant to
serialize database events, but it's unneeded because all database events
go directly through ActiveRecord, which handles threading.
2014-11-14 10:51:51 -06:00
Luke Imhoff 0c6b820f7d
Remove unnecessary thread cleaning from Msf::Framework spec
MSP-11605
2014-11-14 09:11:35 -06:00
David Maloney ccc5bbd745
this spec needs to use the username factory
:metasploit-credential_public factory will randomly
return either a Username or BlankUsername and thus is
not appropriate for when you want tos et an explicit Username.
The :metasploit_credential_username factory should be used for this
instead

MSP-11609
2014-11-13 10:58:03 -06:00
Luke Imhoff cca82f4b36
Failing spec for Msf::Framework.new threads
MSP-11605

`Msf::Framework.new` creates 8 threads (change from 1 thread to 9 threads), but
it shouldn't create any threads.
2014-11-12 13:41:30 -06:00
Luke Imhoff 69043d51e0
Merge branch 'master' into feature/MSP-11147/thread-leak-detection
MSP-11147
2014-11-12 12:34:25 -06:00
Luke Imhoff 3ff87c89fe
Clean up Msf::Framework spec thread-leaks
MSP-11147
2014-11-12 12:20:23 -06:00
Luke Imhoff 22cbc5ca02
Use named subject instead of subject
MSP-11147
2014-11-12 12:18:08 -06:00
Luke Imhoff 1fd8fe57df
Merge staging/great-backport to master
Conflicts:
	spec/lib/msf/core/module_spec.rb
2014-11-12 11:08:18 -06:00
Luke Imhoff cf0ecd0367
Fix thread leaks in TaskManager spec
MSP-11147
2014-11-11 12:02:14 -06:00
Luke Imhoff b0f1b2a1f7
Merge branch 'master' into feature/MSP-11130/metasploit-framework-spec-constants
MSP-11130

Conflicts:
	Rakefile
2014-11-04 10:10:12 -06:00
Luke Imhoff 0c769e2fd7
Fix constant leaks in Msf::Util::EXE spec
MSP-11130

Remove global $framework as it loads modules prior to suite run and they
are not cleaned up.
2014-11-04 09:48:55 -06:00
Luke Imhoff 78ea93044b
Fix Msf::PayloadGenerator spec constant leaks
MSP-11130

Remove the constant PAYLOAD_FRAMEWORK as it leads to a
Msf::Simple::Framework instance that is not cleaned up and loads modules
prior to the beginning of the suite run.
2014-11-04 09:48:02 -06:00
Luke Imhoff 9ea1240cbb
Default modules_path
MSP-11130

Default `:modules_path` to use the `#modules_path` left for
'Msf::Simple::Framework#modules#loading''s `#load_and_create_module`.
2014-11-03 11:06:49 -06:00
Luke Imhoff f0001eb9e6
Extract 'Msf::Simple::Framework#modules loading'
MSP-11130

'Msf::Simple::Framework#modules loading' defines
`#load_and_create_module`, which takes the :ancestor_reference_names,
:modules_path, :module_type, and :reference_name of the module whose
ancestors to load and the reference name to create. A default modules
path, the first 'modules' path for the Rails application is available in
in the `#modules_path` let.
2014-11-03 08:59:06 -06:00
Luke Imhoff 8b4767449f
Fix constant leaks in Msf::EncodedPayload spec
MSP-11130

Switch to using 'Msf::Simple::Framework' shared context and explicit
module loading instead of loading all moduels to just test with one.
2014-10-30 14:56:47 -05:00
Luke Imhoff c2bd75b587
Clean up leaked constants
MSP-11130
2014-10-29 15:50:47 -05:00
James Lee 77d4623c44
Fix respond_to specs for protected methods 2014-10-27 19:39:32 -05:00
Joshua Smith 0d449cb88d
resolves merge conflict between #4071 / #4072 2014-10-24 13:11:35 -05:00
Joshua Smith e583cce7f2 changes be_false to be_falsey in exe_spec 2014-10-24 11:11:44 -05:00
Joe Vennix 813a2f8c1c Oops, false not true. 2014-10-24 10:48:58 -05:00
Joe Vennix 028fb3279f Add spec for ensuring is_eicar_corrupted? is false. 2014-10-24 10:48:58 -05:00
Trevor Rosen 75333702a2
Merge branch 'land/4028' into upstream-master
Land #4028
2014-10-23 12:36:35 -05:00
Luke Imhoff 080ea3e56a
Merge branch 'staging/great-backport' into feature/MSP-11126/msf-module-reorg
MSP-11126
2014-10-17 14:28:13 -05:00
Luke Imhoff ae45c1b9d3
Msf::Module::Rank -> Msf::Module::Ranking
MSP-11126

So that mixin module won't appear as Rank constant that Msf::Module
subclasses are supposed to define.
2014-10-17 13:39:53 -05:00
Luke Imhoff 7ffd07c44d
Remove protected method from specs examples
MSP-11126
2014-10-17 11:49:01 -05:00
Luke Imhoff 575717681c
Extract Msf::Module::Privileged shared examples
MSP-11126
2014-10-17 11:48:36 -05:00
Luke Imhoff 172afd180a
Extract Msf::Module::Privileged
MSP-11126
2014-10-17 11:45:03 -05:00
Luke Imhoff 45302b9403
Extract Msf::Module::UUID shared examples
MSP-11126
2014-10-17 11:34:35 -05:00
Luke Imhoff cbae9be5b5
Extract Msf::Module::UUID
MSP-11126
2014-10-17 11:31:56 -05:00
Luke Imhoff d86eda5f1d
Extract Msf::Module::Author shared examples
MSP-11126
2014-10-17 11:20:23 -05:00
Luke Imhoff a59e635913
Extract Msf::Module::Author
MSP-11126
2014-10-17 11:17:12 -05:00
Luke Imhoff e822920298
Msf::Module::Author -> Msf::Author
MSP-11126

`Msf::Module::Author` was already aliased to `Msf::Author`.  This just
moved `Msf::Module::Author` to that alias to free up
`Msf::Module::Author` so it can be used for a concern for
`Msf::Module`'s author methods.
2014-10-17 08:59:54 -05:00
Luke Imhoff ebc62cf9c9
Spec Msf::Module::Author
MSP-11126

Bare minimum of methods to assist with moves.
2014-10-16 16:03:28 -05:00
Luke Imhoff 839657abec
Extract Msf::Module::Network shared examples
MSP-11126
2014-10-16 15:54:35 -05:00
Luke Imhoff ee9623c11e
Remove class method examples moved to shared examples
MSP-11126
2014-10-16 15:41:28 -05:00