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
Luke Imhoff
244e4a9954
Extract Msf::Module::Search shared examples
...
MSP-11126
2014-10-16 15:40:19 -05:00
Luke Imhoff
be945d26fc
Extract Msf::Module::FullName shared examples
...
MSP-11126
2014-10-16 15:33:13 -05:00
Luke Imhoff
c501e1e58a
Extract Msf::Module::Rank shared examples
...
MSP-11126
2014-10-16 14:41:59 -05:00
Luke Imhoff
925cd63171
Extrat Msf::Module::Type shared examples
...
MSP-11126
2014-10-16 14:28:43 -05:00
Luke Imhoff
28af6a490b
Extract Msf::Module::Arch shared examples
...
MSP-11126
2014-10-16 13:16:57 -05:00
Luke Imhoff
a2dc3b754f
Extract Msf::Module::ModuleInfo shared examples
...
MSP-11126
2014-10-16 13:10:15 -05:00
Luke Imhoff
f8ada87e86
Extract Msf::Module::Options shared examples
...
MSP-11126
2014-10-16 11:24:03 -05:00
Luke Imhoff
c50cb2eb8a
Extract Msf::Module::UI::*::Verbose and shared examples
...
MSP-11126
2014-10-16 10:05:45 -05:00
Luke Imhoff
a3afb92ee2
Extract Msf::Module::UI::Line shared examples
...
MSP-11126
2014-10-16 09:51:23 -05:00
Luke Imhoff
96864b3892
Extract Msf::Module::UI::Message shared examples
...
MSP-11126
2014-10-16 09:45:17 -05:00
Luke Imhoff
4d9f7db15a
Extract Msf::Module::Compatibility
...
MSP-11126
2014-10-16 09:29:31 -05:00
Luke Imhoff
9b10a3f1dc
Extract Msf::Module::DataStore shared examples
...
MSP-11126
2014-10-16 09:14:44 -05:00
Luke Imhoff
6a194b3a88
Extract Msf::Module::ModuleStore shared examples
...
MSP-11126
2014-10-16 09:03:12 -05:00
Luke Imhoff
98a56d594a
Spec Msf::Target
...
MSP-11496
2014-10-15 15:18:28 -05:00
Luke Imhoff
6bf5e996cf
Spec Msf::Platform
...
MSP-11496
2014-10-15 15:15:33 -05:00
Luke Imhoff
c2c311f087
Spec Msf::SiteReference
...
MSP-11496
2014-10-15 15:13:20 -05:00
Luke Imhoff
26958f5aaa
Spec Msf::Reference
...
MSP-11496
2014-10-15 15:08:12 -05:00
Luke Imhoff
714e9435e5
Spec Msf::Author
...
MSP-11496
2014-10-15 15:07:22 -05:00
Luke Imhoff
43e5abdef4
Spec Msf::Module::UpdateableOptions
...
MSP-11496
2014-10-15 14:59:44 -05:00
Luke Imhoff
23395911d1
Spec Msf::Module::Failure
...
MSP-11496
2014-10-15 14:50:49 -05:00
Luke Imhoff
fd2b7126d6
Msf::Module method specs
...
MSP-11496
Use respond_to matcher to check that methods aren't dropped during
reorganization.
2014-10-15 14:40:07 -05:00
Luke Imhoff
a7d1577494
ImportMsfXml -> Import::MsfXml
...
MSP-11124
2014-10-13 15:46:13 -05:00
Luke Imhoff
acdf6e7dbf
Move missed Msf::DBManager::Connection examples
...
MSP-11124
2014-10-13 15:06:46 -05:00
Luke Imhoff
92aaecf94b
Move add_rails_engine_migrations_paths to Msf::DBManager::Migration
...
MSP-11124
2014-10-13 15:02:20 -05:00
Luke Imhoff
66ce59725b
Extract Msf::DBManager::Adapter shared examples
...
MSP-11124
2014-10-13 14:53:40 -05:00
Luke Imhoff
2b4150ac46
Extract Msf::DBManager::Connection shared examples
...
MSP-11124
2014-10-13 14:47:22 -05:00
Luke Imhoff
43a4858fe3
Extract Msf::DBManager::Web shared examples
...
MSP-11124
2014-10-13 12:01:49 -05:00
Luke Imhoff
3a2f8b7684
Extract Msf::DBManager::VulnAttempt shared examples
...
MSP-11124
2014-10-13 11:34:12 -05:00
Luke Imhoff
adfeef2aa9
Extract Msf::DBManager::Route shared examples
...
MSP-11124
2014-10-13 11:28:19 -05:00
Luke Imhoff
e1ae403292
Extract Msf::DBManager::SessionEvent shared examples
...
MSP-11124
2014-10-13 11:15:07 -05:00
Luke Imhoff
98142def08
Extract Msf::DBManager::HostTag shared examples
...
MSP-11124
2014-10-13 11:03:21 -05:00
Luke Imhoff
6fb263d989
Extract Msf::DBManager::Session shared examples
...
MSP-11124
2014-10-13 10:52:39 -05:00
Luke Imhoff
4aab5129b0
Extract Msf::DBManager::HostDetail shared examples
...
MSP-11124
2014-10-13 10:27:55 -05:00
Luke Imhoff
8026352433
Extract Msf::DBManager::Ref shared examples
...
MSP-11124
2014-10-13 10:12:09 -05:00
Luke Imhoff
7a5b3c9ee7
Move report_artifact example to Msf::DBManager::Report
...
MSP-11124
2014-10-13 10:01:08 -05:00
Luke Imhoff
a970d76a2a
Extract Msf::DBManager::VulnDetail shared examples
...
MSP-11124
2014-10-13 09:58:59 -05:00
Luke Imhoff
97b3198923
Extract Msf::DBManager::ExploitAttempt shared examples
...
MSP-11124
2014-10-13 09:43:40 -05:00
Luke Imhoff
b007fba79f
Extract Msf::DBManager::Task shared examples
...
MSP-11124
2014-10-13 09:32:42 -05:00
Luke Imhoff
66845508d9
Extract Msf::DBManager::Report shared examples
...
MSP-11124
2014-10-13 09:24:27 -05:00
Luke Imhoff
e82a46cc47
Extract Msf::DBManager::Event shared examples
...
MSP-11124
2014-10-13 09:12:49 -05:00
Luke Imhoff
0e93b55397
Extract Msf::DBManager::Client shared examples
...
MSP-11124
2014-10-13 08:40:34 -05:00
Luke Imhoff
b05a466e0a
Extract Msf::DBManager::Vuln shared examples
...
MSP-11124
2014-10-09 15:51:39 -05:00
Luke Imhoff
e403e54896
Extract Msf::DBManager::Note shared examples
...
MSP-11124
2014-10-09 15:39:55 -05:00
Luke Imhoff
e42d60801d
Extract Msf::DBManager::Loot shared examples
...
MSP-11124
2014-10-09 15:21:43 -05:00
Luke Imhoff
2c6753a2e0
Extract Msf::DBManager::Import shared examples
...
MSP-11124
2014-10-09 15:07:17 -05:00
Luke Imhoff
45f5fe36f1
Extract Msf::DBManager::ExploitedHost shared examples
...
MSP-11124
2014-10-09 12:58:30 -05:00
Luke Imhoff
3ec93dea43
Extract Msf::DBManager::Cred shared examples
...
MSP-11124
2014-10-09 11:44:15 -05:00
Luke Imhoff
96b4491d8e
Extract Msf::DBManager::Service shared examples
...
MSP-11124
2014-10-09 11:35:07 -05:00
Luke Imhoff
e7800697eb
Extract Msf::DBManager::Host shared examples
...
MSP-11124
2014-10-09 11:16:04 -05:00
Luke Imhoff
148ad8b050
Extract Msf::DBManager::WMAP shared examples
...
MSP-11124
2014-10-09 10:49:26 -05:00
Luke Imhoff
e723aa7eb3
Extract Msf::DBManager::IPAddress shared examples
...
MSP-11124
2014-10-09 09:40:11 -05:00
Luke Imhoff
37c38ad27b
Extract Msf::DBManager::ModuleCache shared examples
...
MSP-11124
2014-10-09 09:14:45 -05:00
Luke Imhoff
70d4f672e2
Extract Msf::DBManager::Workspace examples to shared example
...
MSP-11124
2014-10-08 15:54:29 -05:00
Luke Imhoff
a64036f6cf
Move Msf::DBManager#sync to Msf::DBManager::Sink
...
MSP-11124
The comment on `#sync` says it's related to `sink`, so move it into its
Module.
2014-10-08 15:38:56 -05:00
Luke Imhoff
37e0b9ffe0
Extract Msf::DBManagerSink examples to shared example
...
MSP-11124
2014-10-08 15:30:20 -05:00
Luke Imhoff
a0a19e5ce8
Spec classes, constants and methods from lib/msf/db.rb
...
MSP-11466
Method specces only check that the method is defined as they only need
to catch deleted methods during the reorganization.
2014-10-08 11:07:15 -05:00
Luke Imhoff
6a54f0ac4c
Spec methods from db_manager.rb
...
MSP-11466
2014-10-08 10:53:14 -05:00
Luke Imhoff
c09335985b
Sort specs
...
MSP-11466
2014-10-08 10:52:21 -05:00
Vincent Herbulot
041d44ecc6
Spec modification to allow previous commit
...
The spec was requiring the WAR to be at /deploy but this path was a
typo introduce while refactoring. The initial correct path is
/deploy/management
2014-10-01 18:30:53 +02:00
Vincent Herbulot
a48d6053ab
Added spec for jboss/deployment_file_repository
2014-10-01 11:57:01 +02:00
us3r777
47507e1ff1
Slight modifications to pass msftidy
2014-09-29 23:59:12 +02:00
us3r777
f9b6519e49
Added spec to new methods in Jboss mixin
2014-09-29 23:45:40 +02:00
sinn3r
9e5826c4eb
Land #3844 - Add the JSObfu mixin to Firefox exploits
2014-09-29 11:15:14 -05:00
Joe Vennix
2b02174999
Yank Android->jsobfu integration. Not really needed currently.
2014-09-25 16:00:37 -05:00
Luke Imhoff
f61afe2598
Merge branch 'master' into bug/MSP-11368/boot-profiling
...
MSP-11368
2014-09-22 10:00:07 -05:00
Joe Vennix
ec88957ff4
Whitespace tweaks.
2014-09-21 23:57:58 -05:00
Joe Vennix
d9e6f2896f
Add the JSObfu mixin to a lot of places.
2014-09-21 23:45:59 -05:00
sinn3r
2e96026725
avoid saying 'should'
2014-09-21 00:56:13 -05:00
sinn3r
e1cfc74c32
Move jsobfu to a mixin
2014-09-21 00:39:04 -05:00
sinn3r
9191af6241
Update js_obfuscate
2014-09-20 23:38:35 -05:00
sinn3r
2d828a2144
Update rspec
2014-09-20 18:09:22 -05:00
sinn3r
135bed254d
Update BrowserExploitServer for JSObfu
2014-09-20 17:59:36 -05:00
sinn3r
d52236fe05
Land #3835 - JSObfu to a gem
2014-09-20 01:38:45 -05:00
Joe Vennix
8e1b00ce95
Adds JSObfu.disabled for spec stubbing, fixes BES specs.
2014-09-19 20:42:05 -05:00
Luke Imhoff
b863978028
Remove fastlib
...
MSP-11368
MSP-11143
Remove fastlib as it slows down the code loading process. From the
previous commit, the mean loading for
`METASPLOIT_FRAMEWORK_PROFILE=true msfconsole -q -x exit` was
27.9530±0.3485 seconds (N=10). The mean after removal of fastlib
was 17.9820±0.6497 seconds (N=10). This means an average 35.67%
reduction in boot time.
2014-09-18 15:24:21 -05:00
Luke Imhoff
44588cc014
Add detected_arch to expected hosts columns in spec
...
MSP-11359
2014-09-18 12:34:34 -05:00
Joe Vennix
a617556f29
Add a helpful comment.
2014-09-12 10:55:08 -05:00
Joe Vennix
0194674542
Oops. Don't duplicate spec block.
2014-09-12 10:54:30 -05:00
Joe Vennix
46f256a6bd
Adds a spec to ensure HttpServer runs Concern hooks.
2014-09-12 10:52:57 -05:00
William Vu
ae5a8f449c
Land #3691 , gdbserver hax
2014-09-08 11:48:39 -05:00
us3r777
cc5b852517
Fixed spec for lib/msf/http/jboss
...
Revert commit abdd72e8c6
.
Added some spec for lib/msf/http/jboss/deployment_file_repository_scripts
2014-09-08 17:42:04 +02:00
jvazquez-r7
fdb66d978b
Fix remainings be_truthy and be_falsey conditionals
2014-09-02 13:22:21 -05:00
jvazquez-r7
9cec62d52b
Merge branch 'specs_its' into fix_deprecation_warnings
2014-09-02 13:14:21 -05:00
jvazquez-r7
e0c6f5032f
Avoid its in Msf::DBManager specs
2014-09-02 12:46:50 -05:00
us3r777
abdd72e8c6
Refactor spec to match lib/msf/jboss
...
Moved bean_hsell_scripts_spec to scripts_spec. Fixed a typo.
2014-08-31 19:13:40 +02:00
jvazquez-r7
b37e1a5421
Solve conflicts
2014-08-26 17:51:37 -05:00
Joshua Smith
49adde2095
Land 3702, prefer be_falsey and cleanup specs
2014-08-26 15:24:41 -05:00
Joshua Smith
1fa26e2afb
cleans up a bunch of spec msftidy issues
2014-08-26 15:24:08 -05:00
jvazquez-r7
042b8a3672
Switch from pending to skip in specs
2014-08-26 15:17:00 -05:00
Jon Hart
337cd02dd7
Change Auxiliary::DRDoS' prove_drdos to prove_amplification
2014-08-26 07:48:44 -07:00
jvazquez-r7
41420a97d5
Solve conflicts
2014-08-26 09:04:05 -05:00
jvazquez-r7
60ecf4e8c4
Use be_truthy instead of be_true
2014-08-25 23:58:08 -05:00
jvazquez-r7
c372f5164b
And switch more cases to be_falsey
2014-08-25 17:50:38 -05:00
jvazquez-r7
a1e1cef418
More use of be_falsey
2014-08-25 17:38:50 -05:00
jvazquez-r7
dd1c015e4e
Use be_falsey
2014-08-25 17:34:55 -05:00
William Vu
1ee83ff57e
Land #3696 , pile of NTP DRDoS 0days
...
Dr. DoS in da house?
2014-08-25 11:47:28 -05:00
Joe Vennix
a27754c5c1
Tweak specs a bit.
2014-08-24 02:41:37 -05:00
Joe Vennix
120f416f9c
Add spec for Msf::EncodedPayload.create.
2014-08-24 02:36:09 -05:00
Joe Vennix
6313b29b7a
Add #arch method to Msf::EncodedPayload.
...
This allows exploits with few one automatic target to support many
different architectures.
2014-08-24 02:22:15 -05:00
jvazquez-r7
8945f04ffd
Add specs for Msf::HTTP::JBoss::BeanShell
2014-08-22 16:13:38 -05:00
jvazquez-r7
f57dd9a224
Add specs for #generate_bsh
2014-08-22 15:39:58 -05:00
jvazquez-r7
2b3058869f
Add Msf::HTTP::JBoss::BeanShellScripts specs
2014-08-22 15:36:29 -05:00
jvazquez-r7
7ee5423310
Add specs for Msf::HTTP::JBoss::Base
2014-08-22 15:11:27 -05:00
jvazquez-r7
38e6576990
Update
2014-08-22 13:22:57 -05:00
Brandon Turner
05f0d09828
Merge branch staging/electro-release into master
...
On August 15, shuckins-r7 merged the Metasploit 4.10.0 branch
(staging/electro-release) into master. Rather than merging with
history, he squashed all history into two commits (see
149c3ecc63
and
82760bf5b3
).
We want to preserve history (for things like git blame, git log, etc.).
So on August 22, we reverted the commits above (see
19ba7772f3
).
This merge commit merges the staging/electro-release branch
(62b81d6814
) into master
(48f0743d1b
). It ensures that any changes
committed to master since the original squashed merge are retained.
As a side effect, you may see this merge commit in history/blame for the
time period between August 15 and August 22.
2014-08-22 10:50:38 -05:00
Brandon Turner
19ba7772f3
Revert "Various merge resolutions from master <- staging"
...
This reverts commit 149c3ecc63
.
Conflicts:
lib/metasploit/framework/command/base.rb
lib/metasploit/framework/common_engine.rb
lib/metasploit/framework/require.rb
lib/msf/core/modules/namespace.rb
modules/auxiliary/analyze/jtr_postgres_fast.rb
modules/auxiliary/scanner/smb/smb_login.rb
msfconsole
2014-08-22 10:17:44 -05:00
Vincent Herbulot
2b59337e9a
Jboss spec modifications.
...
Various changes in the jboss spec to match the newly refactored
methods in lib/msf/http/jboss.
2014-08-18 17:19:09 +02:00
Samuel Huckins
149c3ecc63
Various merge resolutions from master <- staging
...
* --ask option ported to new location
* --version option now works
* MSF version updated
* All specs passing
2014-08-15 11:33:31 -05:00
Jon Hart
8e626c1b60
Add rspec coverage for Msf::Auxiliary::DRDoS
2014-08-09 21:12:10 -07:00
Luke Imhoff
a37244c14e
Fix specs
...
MSP-10998
2014-08-01 21:55:10 -05:00
Luke Imhoff
9096a8a1f5
Remove Msf::Framework::VersionAPI
...
MSP-10998
It's compacting of the version parts into a single float doesn't work
with APIMinor over 10, so replace with Gem::Version, which compares
parts correctly.
2014-08-01 21:43:14 -05:00
Luke Imhoff
22db5aad8a
Remove Msf::Framework::VersionCore
...
MSP-10998
It can't handle 4.10.0 because it tries to compact the multiple part
version into one float using (1 / 10.0).
2014-08-01 21:31:48 -05:00
Brandon Turner
915e09ac50
Update framework version spec and Gemfile
2014-08-01 09:26:38 -05:00
Meatballs
53b66f3b4a
Land #2075 , Powershell Improvements
2014-07-31 00:49:39 +01:00
James Lee
ef59d88f64
Fix spec failure due to workspace mismatch
...
Also fixes intermittent failure from FactoryGirl picking a heinous
Origin type.
2014-07-30 11:26:35 -05:00
us3r777
2efeb850ee
Added spec to lib/msf/http/jboss
2014-07-29 02:04:57 +02:00
us3r777
9e9244830a
Added spec for lib/msf/http/jboss
...
Also renamed get_undeploy_bsh and get_undeploy_stager to
gen_undeploy_bsh and gen_undeploy_stager to be consistent
with the other functions
2014-07-29 01:57:04 +02:00
jvazquez-r7
79fe342688
Land #3558 , @FireFart's improvements to wordpress mixin
2014-07-28 09:52:20 -05:00
James Lee
c65db18090
Add rudimentary specs and fix some help wording
2014-07-28 09:19:09 -05:00
Christian Mehlmauer
baff003ecc
extracted check version to module
...
also added some wordpress specs and applied
rubocop
2014-07-22 17:02:35 +02:00
Luke Imhoff
14fa49cdeb
Update spec to handle Mdm::Service#proto sequence
...
MSP-10029
Mdm::Service factories were changed in metasploit_data_models 0.19.0 to
use a sequence that cycles between 'tcp' and 'udp'. To make the spec
clearer, just hard-code the protos under test instead of relying on
default behavior.
2014-07-22 09:47:35 -05:00
jvazquez-r7
ef12a632f6
Change filename
2014-07-22 08:20:32 -05:00
jvazquez-r7
72c2c07495
Add the specs, really
2014-07-21 17:39:51 -05:00
Meatballs
7583ed4950
Merge remote-tracking branch 'upstream/master' into pr2075
2014-07-16 20:34:34 +01:00
David Maloney
aeda74f394
Merge branch 'master' into staging/electro-release
...
Conflicts:
Gemfile
Gemfile.lock
2014-07-07 16:41:23 -05:00
jvazquez-r7
405de05e4b
Add specs for module_flavors
2014-07-03 10:31:39 -05:00
Spencer McIntyre
1b4b4fd1c0
Update the cmdstager spec ArgumentError text
2014-06-27 08:34:57 -04:00
jvazquez-r7
dcd0e77f9e
Change #compatible? method name because it's used by Module
2014-06-27 08:34:56 -04:00
jvazquez-r7
af568c856a
Add CMStager specs
2014-06-27 08:34:56 -04:00
Luke Imhoff
af99c0c01e
Remove `should_receive(:with_connection)` from specs
...
MSP-10127
Causes specs to randomly fail when with_connection calls from
before(:each) or after(:each) are intercepted by the should_receive
call.
2014-06-19 16:24:53 -05:00
David Maloney
d9b7a320ae
fix more broken specs
2014-06-19 14:07:39 -05:00
James Lee
c0c1bd40a9
Fix help spec
2014-06-10 17:28:55 -05:00
David Maloney
9b9de12a38
Merge branch 'master' into staging/electro-release
...
Conflicts:
lib/msf/core/framework.rb
2014-06-06 12:04:53 -05:00
Brandon Turner
82464bd6aa
Update version spec
2014-06-06 10:16:44 -05:00
David Maloney
98a23881ee
remove cred creation methods
...
removed cred creation methods from framework
and include them from the metasploit-credential gem instead
2014-05-30 11:28:53 -05:00
David Maloney
821a62627a
final spec cleanup
2014-05-28 09:56:26 -05:00
David Maloney
c975d4dc49
some minor cleanup items
2014-05-28 09:26:19 -05:00
David Maloney
19e36cccb3
Credential Core creation now complete
2014-05-21 16:37:13 -05:00
David Maloney
3ea99a9d43
private creation w/ specs and docs
...
the private creation method is now done
with specs and YARD docs
2014-05-21 13:21:56 -05:00
David Maloney
2629549f6f
added realm creation
...
added method for creating credential realm
creation.
2014-05-21 11:22:22 -05:00
David Maloney
9cdddb08d9
origin specs for realsies
...
final specs and fixes for the origin creation
methods
2014-05-20 10:19:03 -05:00
David Maloney
b84aaaad19
specs and fixes for origin creation
2014-05-20 09:59:15 -05:00
David Maloney
ddfa4f1ee7
some origin creation specs
...
started getting working specs
for the origin creation methods. feel
into the weeds for a bit, but making progress at last.
2014-05-19 15:16:02 -05:00
David Maloney
a4d85ad61b
Merge branch 'master' into staging/electro-release
2014-05-16 11:24:18 -05:00
Christian Mehlmauer
dc7a8d32d8
Land #3324 , msfconsole search timestamp fixes
2014-05-14 21:30:02 +02:00
dmaloney-r7
acaf713229
Merge pull request #17 from rapid7/feature/MSP-9606/metasploit-credential
...
Run migrations from Metasploit::Credential and initialize its concerns which patch Mdm
2014-05-14 11:15:07 -05:00
nstarke
bb6201d66d
Fixing nil bug and making format constant
...
The date format has been moved into a constant variable.
Certain modules do not have a disclosure_date. For example,
‘checkvm’. This necessitated checking disclosure_date for nil
before attempting a format conversion. Also, there was an additional
location in core.rb that needed the formatting / nil check added. Specs
were also updated appropriately.
2014-05-14 15:51:42 +00:00
Luke Imhoff
3370465d84
Use railties to load Metasploit::Credential correctly
...
MSP-9606
In order to support Metasploit::Credential correctly,
metasploit-framework needs to support Metasploit::Concern, which does
all its magic using a Rails::Engine initializer, so the easiest path is
to make metasploit-framework be able to use Rails::Engines. To make
Rails::Engine use Rails::Engine, make a dummy Rails::Application
subclass so that all the initializers will be run when anything requires
msfenv.
2014-05-12 15:03:51 -05:00
William Vu
102eb85277
Update CommandDispatcher::Db spec
2014-05-08 03:05:49 -05:00
William Vu
9964548b41
Amend spec for db_import help
2014-04-25 14:28:29 -05:00
Meatballs
318ae46085
Remove puts
2014-04-26 12:59:19 +01:00
Meatballs
3f5cc13bf8
Better eof test
2014-04-25 17:15:12 +01:00
Meatballs
d85e4b1313
Error if encode_inner and encode_final
2014-04-25 15:47:36 +01:00
Meatballs
ae574bec2b
Correct spec
2014-04-25 15:42:48 +01:00
Meatballs
5b9ec72395
Remove read_script spec
2014-04-25 15:40:52 +01:00
Meatballs
206184007f
Move methods and rename file so it is run by rspec
2014-04-25 15:16:15 +01:00
Meatballs
72a2849bf1
Better specs
...
90.6% line coverage in Exploit::Powershell
77.32% in Rex::Exploitation::Powershell and haven't even started
writing those specs...
2014-04-23 08:07:42 +01:00
Meatballs
58c3bf0e59
Further speccage
2014-04-23 06:08:39 +01:00
Meatballs
c4cfa42e5b
More specs
2014-04-23 02:37:19 +01:00
Meatballs
67f44072ca
Merge remote-tracking branch 'upstream/master' into pr2075
2014-04-19 18:45:55 +01:00
sinn3r
7a4e12976c
First little bit at Bug 8498
...
[FixRM #8489 ] rhost/rport modification
2014-04-15 18:20:16 -05:00
Meatballs
38d8df4040
Merge remote-tracking branch 'upstream/master' into pr2075
...
Conflicts:
modules/exploits/windows/local/wmi.rb
2014-04-15 22:06:45 +01:00
Tod Beardsley
e4a61e2730
Fix Module.new bug and test for vhost
2014-04-14 18:01:13 -05:00
Tod Beardsley
bbc72c3e1c
Update spec to reflect the correct version.
2014-04-11 12:29:26 -05:00
William Vu
35d3e064b2
Update spec for #3162
2014-03-28 21:18:26 -05:00
David Maloney
617e916511
fix specs from change
...
spec changes to go with the previous code change
2014-03-18 13:52:17 -05:00
Joe Vennix
78393057fe
Fix failing spec
2014-03-10 16:40:46 -05:00
Joe Vennix
894d16af80
Add specs for new/returning/previous visitors.
2014-03-02 20:50:10 -06:00
Meatballs
2885ebcb40
Merge remote-tracking branch 'upstream/master' into pr2075
2014-03-02 20:57:02 +00:00
Meatballs
1ca690eccf
Do some rspec
2014-03-02 20:37:08 +00:00
sinn3r
8be99fc299
Fix payload_generator.format_payload rspec
...
The platform should match.
2014-02-25 16:37:21 -06:00
David Maloney
a098c08f2f
pend out bad spec
2014-02-13 15:44:05 -06:00
David Maloney
508f251db2
add cli compat
...
add cli capability to putut verbose info to the console
2014-02-05 11:00:57 -06:00
David Maloney
fc9105d862
final generation and specs
...
generation wrapped method complete with specs
2014-02-04 17:52:20 -06:00
David Maloney
4dcae920f8
add specs for generate_java_payload
...
pretty self-explanatory
2014-02-04 17:40:59 -06:00
David Maloney
70d8246791
finish wiring up the final generation
...
formating and main generate methods wired up
still need to add some final tests
2014-02-04 15:52:18 -06:00
David Maloney
c8b7dc30b4
added encoding routines
...
now has a method for encoding the shellcode
and tests to go with
2014-02-03 17:51:22 -06:00
David Maloney
3b648346da
starting in on encoders
...
added get_encoders method to find propper encoders
started on encode_payload, incomplete
added specs
2014-02-03 00:59:08 -06:00
David Maloney
4a82bc74cf
added nop sled generator
...
added code to prepend a nop sled
with tests to match
2014-02-02 22:51:12 -06:00
David Maloney
3e945418df
specs for added shellcode
...
add specs around adding extra shellcode to the payload
2014-02-02 22:17:52 -06:00
David Maloney
bb5f5542f0
generating raw payload bits now
...
added raw payload generation, arch selection,
and specs for everything thus far
2014-02-02 21:09:17 -06:00
David Maloney
f9c31f988e
test platform selection
...
added tests around platform selection
2014-02-02 16:52:41 -06:00
David Maloney
f5d730e874
write specs around initialiser
...
added specs around object initialisation
2014-02-02 16:05:11 -06:00
David Maloney
e265d6f54c
begining of payload generator
...
started basics of generator
started adding specs
added option to simple framework to disable logging
2014-02-02 14:35:16 -06:00
David Maloney
41807d7e4e
move rev_http uri checksum code
...
need access to the uri checksum
routines outside of the handler.
moved them to their own mixin
and then mixed into the handler.
added specs also
2014-01-13 15:18:16 -06:00
Joe Vennix
d00acccd4f
Remove Java target, since it no longer works.
2014-01-04 21:22:47 -06:00
Joe Vennix
694cb11025
Add firefox platform, architecture, and payload.
...
* Enables chrome privilege exploits in firefox to run a javascript cmd
shell session without touching the disk.
* Adds a spec for the addon_generator.
2014-01-02 10:48:28 -06:00
Joe Vennix
ca23b32161
Add support for Procs in browserexploit requirements.
2013-12-19 12:49:05 -06:00
Tod Beardsley
764fd09cc3
Increase duration timeout task manager
...
Sometimes, Jenkins or Travis is slow, and can't hit that 1 second
timeout. This increases to 5 seconds to account for local slowness.
2013-11-25 10:26:51 -06:00
Meatballs
b015dd4f1c
Land #2532 Enum LSA Secrets
...
With refactoring of common methods from smart_hashdump, hashdump,
cachedump to Windows::Post::Privs
2013-11-24 18:09:33 +00:00
jvazquez-r7
a79e137a7a
Fix db_spec
2013-11-19 14:07:41 -06:00
James Lee
0aef145f64
Merge remote-tracking branch 'upstream/master' into land-2532-enum-lsa
2013-11-13 18:11:21 -06:00
James Lee
16627c1bd3
Add spec for capture_lsa_key
2013-11-13 15:16:34 -06:00
Tod Beardsley
5e342debbc
Don't be dopey in the RSpec version matching
2013-11-13 13:04:26 -06:00
Tod Beardsley
3500cf06d4
Add a spec for version checking.
2013-11-13 12:49:57 -06:00
James Lee
3168359a82
Refactor lsa and add a spec for its crypto methods
2013-11-13 11:55:39 -06:00
jvazquez-r7
ef6d9db48f
Land #2613 , @wchen-r7's BrowserExploitServer mixin
2013-11-12 17:33:12 -06:00
sinn3r
f16aa91302
mv rspec
2013-11-11 18:32:43 -06:00
Tod Beardsley
b48950d383
Remove blanket pending test for exe_spec
...
SeeRM #8436
SeeRM #8668
The fix for #8668 is more surgical than the previous fix for #8436 , and
may prove to be more useful
2013-11-11 16:27:42 -06:00
sinn3r
991240a87e
Support java version detection
2013-11-07 00:54:52 -06:00
sinn3r
c338f7a8c0
Change how requirements are defined, rspec, etc
2013-11-06 14:01:29 -06:00
sinn3r
f2e4d5507c
More rspec
2013-11-06 01:45:40 -06:00
sinn3r
73701462ed
Fix ActiveX. Use ERB for Javascript detection code.
2013-11-05 16:26:41 -06:00
sinn3r
90b91ec2cd
Add testcase for on_request_exploit
2013-11-05 12:53:16 -06:00
sinn3r
5f2d8358c0
Be more browser specific with Javascript generation
2013-11-05 01:04:52 -06:00
sinn3r
054a525f35
Change profile data structure
2013-11-04 17:46:36 -06:00
sinn3r
c6fb570480
Correct bad method naming
2013-11-04 12:35:04 -06:00
sinn3r
dc076273f7
Add another test for profile
2013-11-04 11:12:26 -06:00
sinn3r
03ee1d070e
fix server.start_service
2013-11-04 11:06:32 -06:00
sinn3r
bed2ea9e39
rename some stuff
2013-11-04 11:02:05 -06:00
sinn3r
9a8e45f451
be_nil
2013-11-04 10:57:01 -06:00
sinn3r
f98587181d
let 'linux'
2013-11-04 10:55:47 -06:00
sinn3r
6e0690754f
let 'random'
2013-11-04 10:54:15 -06:00
sinn3r
480b876a11
non_existent_profile
2013-11-04 10:51:31 -06:00
sinn3r
8bfa252496
Restate this test
2013-11-04 10:49:48 -06:00
sinn3r
34b5136aa4
use let for requirements
2013-11-04 10:47:52 -06:00
sinn3r
1d5643d53c
Match Rspec terminology
2013-11-04 10:37:41 -06:00
sinn3r
094abdd093
rspec this
2013-11-01 14:59:21 -05:00
Tod Beardsley
72a35d14f1
Mark broken tests as pending
...
These tests are broken a few different ways.
[SeeRM #8463 ]
also see: https://github.com/rapid7/metasploit-framework/pull/2477
2013-10-08 11:49:42 -05:00
Tab Assassin
2e8d19edcf
Retab all the things (except external/)
2013-09-30 13:47:53 -05:00
David Maloney
e80cda4ace
Merge branch 'master' into spike/exe_generation
2013-09-12 12:36:10 -05:00
David Maloney
d6e4e46d86
better validation of buffer register
2013-09-09 12:16:15 -05:00
Brandon Turner
cf69577433
Remove rpsec should_not raise_error deprecations
...
Checking that a specifc error is not raised is deprecated in rspec:
https://github.com/rspec/rspec-expectations/pull/244
2013-09-06 09:34:05 -05:00
Brandon Turner
4760000bca
Replace mock with double in specs
...
mock is deprecated - https://www.relishapp.com/rspec/rspec-mocks/docs
2013-09-06 09:34:05 -05:00
David Maloney
5a424ab4df
Allow user supplied buffer register
...
let the user pick, otherwise default to edx
2013-08-26 13:15:12 -05:00
David Maloney
369535b4e3
Some more specs
...
added a few specs to validate the generated exe.
could use some more love, but it's a start
2013-08-25 13:25:31 -05:00
David Maloney
8f47aa6dcb
Basic Injector class
...
create a class for injecting payloads
into an exe template as a new section
2013-08-24 16:11:00 -05:00
sinn3r
92d57ef37d
Fix merge conflict
...
Conflicts:
msfvenom
2013-08-13 00:00:16 -05:00
Tod Beardsley
02f460287b
Revert "OptString specs and better validation"
...
This reverts commit d66779ba4c
.
Specifically, this commit was causing trouble when a datastore was
getting an Integer. For some reason (as yet undiscovered), the option
normalizer wasn't trying to Integer#to_s such arguments.
This kind of thing is going to happen a lot. For now, I'd rather just
end up with the ducktype, and attack the normalizer in a seperate fix.
2013-08-09 15:30:42 -05:00
William Vu
d493346691
Land #2137 , fixes and specs for Opt containers
2013-07-23 15:58:09 -05:00
jvazquez-r7
b0c17fdebc
Land #2002 , @jlee-r7's patch for better handling uri resources
2013-07-23 15:49:21 -05:00
William Vu
b0c74dbb8b
Land #2120 , specs for command_dispatcher
2013-07-22 16:33:19 -05:00
lsanchez-r7
03cd3ff4eb
adding new lines to the end of files.
2013-07-22 16:26:45 -05:00
David Maloney
943dde5c6c
OptRegexp specs
2013-07-20 18:44:55 -05:00
David Maloney
2fc397b251
OptRaw specs
2013-07-20 17:57:52 -05:00
David Maloney
d66779ba4c
OptString specs and better validation
2013-07-20 17:49:03 -05:00
David Maloney
d6f2b28708
More opt specs
2013-07-20 17:37:39 -05:00
lsanchez-r7
18200c8490
passing all of my changes into rubymines formatter
...
this should convert everything over to tabs
fixing a filename error and some white space at the EOL
2013-07-20 17:32:05 -05:00
David Maloney
7c8f7329e9
integrate with egypt's already better specs
2013-07-20 16:46:16 -05:00
David Maloney
ec82644bd3
mo fixes mo specs
...
SEERM #7536
SEERM #7537
2013-07-18 15:00:57 -05:00
Joe Vennix
7b05ac2036
Remove inapplicable comment.
2013-07-18 13:42:55 -05:00
Joe Vennix
f8b5f1b284
Adds specs for different ref types.
2013-07-18 13:35:04 -05:00
David Maloney
57dd525714
More optaddressrange specs and fixes
...
SEERM #7536
2013-07-18 13:03:32 -05:00
lsanchez-r7
49bb484d14
Adding in specs for ui command dispatchers
...
SEERM #4821
while looking into what it would take to fix bug 4821, I found that there are no specs
for any of the other methods in command dispatcher. I have attempted to add stubs for a
few of the methods and tested a few of the help outputs.
2013-07-18 12:56:21 -05:00
Joe Vennix
f4b0ab8184
Adds 141 passing specs to Msf::Module#search_filter.
...
* tests exclusion functionality, type: matching, port: matching, app: matching,
platform: matching, author: matching, text: matching, name: matching, and
path: matching.
[RM #4790 ]
2013-07-18 12:47:08 -05:00
David Maloney
22e4db04e0
opening specs and fixes for OptAddressRange
2013-07-18 12:44:48 -05:00
David Maloney
27e2469d8e
Specs and code changes for OptAddress
...
handles wierness around Optaddress.
Still need to address isues in optaddressRange
FIXRM #7537
2013-07-17 20:21:24 -05:00
James Lee
d10f082741
Maybe fix travis? Works on my box
2013-07-05 16:58:19 -05:00
James Lee
e330916744
Pull out common stuff in Util::EXE/MsfVenom tests
2013-07-03 12:25:15 -05:00
James Lee
0d78a04af3
Clean up exe spec a bit
2013-07-01 17:36:58 -05:00
James Lee
3ad5dede26
Add spec for elf mips* and exe-only formats
...
Also a rudimentary test for win32_rwx_exec
2013-07-01 17:36:38 -05:00
James Lee
e483fe444d
Add spec for HttpServer#hardcoded_uripath
2013-06-21 15:59:15 -05:00
James Lee
e8a92eb196
Keep better track of resources
...
[See #1623 ]
[SeeRM #7692 ]
2013-06-21 14:51:47 -05:00
Tod Beardsley
d7e3c5cdb3
Rspec: Ensure PacketFu is actually still available
...
PacketFu should be required from the gem, not from the shipped msf
library. Several modules depend on it being available, so this rspec
test mostly just ensures that Msf::Exploit::Capture mixin is still
around.
2013-06-10 16:02:50 -05:00
James Lee
0f2ea755c5
Add encoding comment to spec files for 2.0 compat
2013-06-07 13:27:39 -05:00
Luke Imhoff
4ba571346e
Spec Msf::Simple::Framework#init_module_paths
...
[#47720609 ]
2013-05-24 12:33:42 -05:00
Luke Imhoff
1a487e476d
Merge branch 'master' into bug/module-load-cache-update
2013-05-23 14:23:14 -05:00
Luke Imhoff
2b70ec2e08
Payload compatible cache_in_memory
...
[#47720609 ]
Msf::PayloadSet#add_module does NOT return an annotated module class as
Msf::ModuleSet#add_module does because a payload module is defined as a
ruby Module instead of a ruby Class. Since add_module doesn't always
return an annotated_class, the logic in
Msf::ModuleManager#on_module_load needed to change to NOT use
annotated_class and create #add_module as return [void]. Thus, it is
necessary to pass in all the metasploit module metadata to
Msf::ModuleManager#cache_in_memory instead of assuming they can be
derived from the (payload) Module or (other) Class.
2013-05-22 16:06:02 -05:00
Luke Imhoff
57576de85f
Update in-memory cache to fix file_changed?
...
[#47720609 ]
Msf::ModuleManager#module_info_by_path was not being updated when a
module was loaded, so if a load_module was called again, say during
start up of prosvc, the module would reload even though there was no
change in the file because file_changed? couldn't find an entry for the
module's path in module_info_by_path.
2013-05-22 12:28:42 -05:00
Luke Imhoff
398dcfa8cb
Merge branch 'master' into bug/migrations
2013-05-20 12:49:33 -05:00
Luke Imhoff
0e435d378c
Move Msf::DBManager#migrate(d) to module
...
[#50179803 ]
Move Msf::DBManager#migrate and the migrated attribute to
Msf::DBManager::Migration module to lower complexity of db_manager.rb
and in preparation for more migration related code on this branch.
2013-05-20 12:45:17 -05:00
Luke Imhoff
1df08cfa49
Add specs to prevent dupe migrations_paths regression
...
[#50099107 ]
Add specs to verify that the duplicate migrations_paths protection
works.
2013-05-17 15:15:57 -05:00
Luke Imhoff
c8657fb46b
Fix Mdm::Module::Detail#stance bug
...
[#49858419 ]
[SEERM #7958 ]
metasploit_data_models 0.14.3 relaxes the validation on
Mdm::Module::Detail#stance so it only needs to be in
Mdm::Module::Detail::STANCES if Mdm::Module::Detail#mtype is 'auxiliary'
or 'exploit' as framework only supplies a stance for those types when
using Mdm::Module::Detail.
2013-05-17 11:58:10 -05:00
Luke Imhoff
bc92b43408
Update to metasploit_data_models 0.11.0
...
[#47979793 ]
2013-05-09 13:25:26 -05:00
Luke Imhoff
249a09cd52
Update to metasploit_data_models 0.7.1
...
[#47979793 ]
2013-04-26 13:14:38 -05:00
Luke Imhoff
9207ed6532
Msf::Ui::Console::CommandDispatcher::Core#search_modules_sql spec
...
[#47979793 ]
2013-04-25 14:33:13 -05:00
Luke Imhoff
24b97137ea
Msf::DBManager Mdm::Module* specs
...
[#47979793 ]
2013-04-25 09:46:53 -05:00
Luke Imhoff
4b0e639cf1
Do not mock on nil.
...
[#47979793 ]
Using `should_not_receive` on `nil` gives `nil` a permanent
`@mock_proxy`, which causes Marshal.dump to fail in later tests (see
https://travis-ci.org/rapid7/metasploit-framework/builds/6502350 ). By,
checking there are no NoMethoErrors raised, nil can be tested as
parent_module, but works around the RSpec issue
(https://github.com/rspec/rspec-mocks/issues/274 ).
2013-04-22 10:25:01 -05:00
Luke Imhoff
be0c61a207
Change spec structure to reflect module/classes for Msf::DBManager
...
[#47979793 ]
Multiple files define Msf::DBManager, but it's better to have one spec
for Msf::DBManager, so change spec structure to reflect module and class
hierarchy instead of file hierarchy of defining files.
2013-04-20 16:51:29 -05:00
Luke Imhoff
492b081280
Msf::DBManager::Export#extract_module_detail_info spec
...
[#47979793 ]
2013-04-20 16:44:42 -05:00
Luke Imhoff
3bf3cfccc6
Use be_within to loosen tolerance for Time comparisons
...
[#47979793 ]
[#48414569 ]
Even though using Timecop locally on OS X makes the `should == <Time>`
work, it fails on travis-ci, so try using `should
be_within(1.second).of(<Time>)` instead.
2013-04-19 12:07:12 -05:00
Luke Imhoff
e5befb7094
Msf::DBManager#report_session specs
...
[#47979793 ]
2013-04-19 10:11:33 -05:00
Luke Imhoff
2c681005c0
Msf::ModuleManager::Cache spec coverage
...
[#47979793 ]
2013-04-15 13:08:12 -05:00
Luke Imhoff
0709395570
Msf::ModuleManager::Loading shared example
...
[#47979793 ]
2013-04-12 15:18:16 -05:00
Luke Imhoff
ff7a8e6351
Msf::ModuleManager::ModulePaths shared example
...
[#47979793 ]
2013-04-12 15:14:04 -05:00
Luke Imhoff
0bb79ba890
Msf::DBManager#import_msf_xml refactor
...
[#46491831 ]
Move Msf::DBManager#import_msf_xml into
Msf::DBManager::ImportMsfXml#import_msf_xml and include
Msf::DBManager::ImportMsfXml to cut down size of the infamous db.rb.
Break up #import_msf_xml to have separate methods for parsing web_forms,
web_pages, and web_vulns. The method for
web_vulns, #import_msf_web_vuln_element is needed so that it can be overridden in
Pro to handle the Pro-only changes to Mdm::WebVuln.
2013-04-01 16:06:40 -05:00
egypt
9d4bc6bb89
Restructure a bit and add checks for doubled '//'
2013-01-31 15:34:34 -06:00
sinn3r
d8b15daaf2
Correct rspect to the correct behavior
2013-01-30 16:13:17 -06:00
James Lee
bbb3fa25be
Allow negative values for OptInt
...
[FixRM #7540 ]
2013-01-14 14:18:56 -06:00
James Lee
0d34e0b249
Fix regex for hex numbers
2013-01-13 20:53:40 -06:00
James Lee
4703a6f737
Unbreak OptInt hex syntax
...
* Fix spec for no-longer-pending tests
* Fix regex in OptInt#valid? to allow hex syntax again
[See #1293 ][See #1296 ]
2013-01-12 14:17:29 -06:00
Tod Beardsley
10511e8281
Merge remote branch 'origin/bug/fix-double-slashes'
...
Ran the new normalize_uri() specs, all passes, so I'm quite confident in
this change.
2012-12-17 13:29:19 -06:00
James Lee
2cbc15a22b
Add #import_option and #from_file
2012-11-29 18:10:29 -06:00
James Lee
e298c5b9cd
Add a simple spec for DataStore
2012-11-29 17:28:15 -06:00
James Lee
cf93a81110
Add specs and pending examples for more Opt*s
...
[SeeRM #7535 ]
[SeeRM #7536 ]
[SeeRM #7537 ]
[SeeRM #7539 ]
[SeeRM #7540 ]
2012-11-29 16:35:50 -06:00
James Lee
7f803744d2
Fix typo
2012-11-29 14:42:27 -06:00
James Lee
7f34586780
Add specs for several Opt* classes
2012-11-29 14:40:25 -06:00
James Lee
3205941a59
Use a SyntaxError instead of JumpError
...
Since the 1.8.7 behavior is insane. Also adds a require for msf/core so
this spec can run by itself.
2012-11-20 19:44:55 -06:00
Luke Imhoff
858cef83fe
Add specs for normalize_uri
2012-11-08 13:22:07 -06:00
James Lee
26a145e527
Always overwrite the old module even when ambiguous
2012-11-07 18:51:12 -06:00
Luke Imhoff
16407f91c8
Rescue Errno::ENOENT from File.open in read_module_content
...
[Fixes #38426061 , #38097411 ]
Msf::Modules::Loader::Directory#read_module_content may calculate a non-existent
module_path that gets passed to File.open causing an Errno::ENOENT exception
to be raised when using the module cache with a module that has been
moved to a new path (as is the case that originally found this bug) or
deleted. Now, the exception is rescued and read_module_content returns
an empty string (''), which load_module detects with
module_content.empty? and returns earlier without attempting to module
eval the (empty) content.
As having Msf::Modules::Loader::Directory#read_module_content rescue the
exception, meant there was another place that needed to log and error
and store an error in Msf::ModuleManager#module_load_error_by_path, I
refactored the error reporting to call
Msf::Modules::Loader::Base#load_error, which handles writing to the log
and setting the Hash, so the error reporting is consistent across the
loaders.
The exception hierarchy was also refactored so that
namespace_module.metasploit_class now has an error raising counter-part:
namespace_module.metasploit_class! that can be used with
Msf::Modules::Loader::Base#load_error as it requires an exception, and
not just a string so the exception class, message, and backtrace can be
logged.
2012-11-06 17:38:38 -06:00
Luke Imhoff
de07ca5f07
Merge branch 'bug/wrong-file_changed-argument' of github.com:/rapid7/metasploit-framework into bug/wrong-file_changed-argument
2012-10-31 11:49:02 -05:00
Luke Imhoff
471ac6d15d
Use typed_enable?(type) instead of protected enablement_by_type[type]
...
Msf::Modules::Loader::Archive#each_module_reference_name tried to check
the enabled types for the module_manager by accessing the
enabledment_by_type Hash, which is protected. Instead, it should use
the public type_enabled? method.
Add specs to test all of Msf::Modules::Loader::Archive while testing
each_module_reference_name. In order to properly test that modules
could be found in archives, I had to produce a fastlib archive, so there
is now a spec for FastLib.dump and FastLib.load. Some specs are marked
pending as I found a bug in FastLib, which has a work-around. The bug
is filed in PivotalTracker as
https://www.pivotaltracker.com/story/show/38730815 and the pending tests
include the URL also in their tags.
2012-10-31 11:43:28 -05:00
James Lee
4073bec136
Add missing require
2012-10-30 13:38:51 -05:00
Luke Imhoff
6c11b870da
Check for payload in :type instead of :modification_time
...
Just had a brain fart when converting the hash key names and translated
:mtype to :modification_time instead of the correct :type. Correct key
names are in
Msf::ModuleManager::Cache#module_info_by_path_from_database!.
2012-10-30 12:10:31 -05:00
Luke Imhoff
5709ffc42b
Use Msf::Config.install_root instead of Msf.root
...
Msf::Config.install_root already existed, but I didn't know about it
until egypt pointed it out, so remove the new Msf.root and use
Msf::Config.install_root in the specs instead.
2012-10-30 10:46:02 -05:00
Luke Imhoff
055f95898d
Merge branch 'master' into bug/wrong-file_changed-argument
...
Conflicts:
lib/msf/core/modules/loader/base.rb
2012-10-24 15:25:49 -05:00
Luke Imhoff
69a8739d52
Pass module_path instead of parent_path to file_changed?
...
[Fixes #37630057 ]
Modules were always being detected as having file changes because the
parent_path directory, instead of the actual module_path, was being
passed to module_manager.file_changed?, which caused the modification
times to not match.
To ensure this change fixes the ambiguous module warnings, a full spec
for Msf::Core::Modules::Loader::Base has been written.
spec/msf has moved to spec/lib/msf to match conventional spec layout and
allow for the spec/support directory to not be confused as a lib
subdirectory being tested.
2012-10-24 15:11:53 -05:00