Commit Graph

5608 Commits (70c2093d1a825f57cb6501d7f8e9167758e1b912)

Author SHA1 Message Date
Tod Beardsley 0d8d5baf6d Resolve merge conflict from jlee-r7 2012-12-12 14:24:47 -06:00
James Lee 6b4e021607 Make ModuleManager Enumerable
Fixes tools/module_* and probably some other lurking bugs
2012-12-12 13:41:04 -06:00
Tod Beardsley e09f4e609c Merge remote branch 'jlee-r7/bug/rm7037-hash-iteration-redux' 2012-12-11 16:08:28 -06:00
James Lee a673c363fd Use a more descriptive variable name
Also removes commented-out code.
2012-12-10 13:36:09 -06:00
kernelsmith 11fec0bc07 adds rudimentary validity checking to pids for meterp kill
addresses redmine https://dev.metasploit.com/redmine/issues/7223, but
may not be a truly encompassing solution.  'good bandaid' as egypt put
it
2012-12-05 13:17:33 -06:00
James Lee bc7cd4b452 Loop through module sets like super used to do
... since super doesn't exist any more.

Also changes to using ModuleSet#[] inside ModuleManager#[] instead of
ModuleSet#create to mimic original behavior when ModuleManager was a
subclass of ModuleSet.
2012-12-05 12:59:35 -06:00
James Lee d57c24dd5f Use framework.payloads instead of modules
When we know the module we're creating is definitely a payload, don't
bother looking in the other module sets.

Also removes an exception message that gets ignored anyway because the
exception class has a hard-coded #to_s
2012-12-05 12:30:55 -06:00
James Lee 77af4ba559 Missed a file in previous commit, thanks, travis! 2012-12-03 22:37:50 -06:00
James Lee f4476cb1b7 Really fix payload recalculation
Instead of deleting all non-symbolics before the re-adding phase of
PayloadSet#recalculate, store a list of old module names, populate a
list of new ones during the re-adding phase, and finally remove any
non-symbolic module that was in the old list but wasn't in the new list.

Also includes a minor refactoring to make ModuleManager its own thing
instead of being an awkard subclass of ModuleSet. Now PayloadSet doesn't
need to know about the existence of framework.modules, which makes the
separation a little more natural.

[FixRM #7037]
2012-12-03 22:23:40 -06:00
HD Moore 30d7de3157 The db search already prints results, return after 2012-12-02 01:14:56 -06:00
HD Moore 3ae47e2089 Move the thread tracking into the update method 2012-12-02 01:07:40 -06:00
HD Moore 51673ca152 Search reference values as well (ms08-067,etc) 2012-12-02 00:44:25 -06:00
HD Moore f17ea91d7c Whitespace changes only 2012-12-02 00:44:03 -06:00
Brandon Turner 7f822fabd7 Fix typo 2012-12-01 15:53:51 -06:00
Tod Beardsley 7ada8aeac1 Correct bug number 2012-12-01 14:16:24 -06:00
Tod Beardsley 725b085ef2 If there are no search results, try harder.
Sometimes, the database is active but the cache isn't filled out, or
doesn't contain the module you want. This can come up especially when
msfconsole first starts and you are programmatically searching for
modules, for whatever reason.

This allows for falling back to the regular (slow) search in the event
no hits have been returned. It does not actually address the caching
problem seen in QA, but it's generally going to be Good Enough. Search
is getting overhauled Real Soon Now anyway.

[FixRM #7533]
2012-12-01 14:06:32 -06:00
James Lee bc63ee9c46 Merge branch 'jvazquez-r7-file_dropper_support_local' into rapid7 2012-11-30 13:43:02 -06:00
James Lee 1da3388194 Fix missing require
[Closes #1106]
2012-11-30 13:42:31 -06:00
HD Moore a3c8e54d0a Catch exceptions from broken modules 2012-11-30 11:04:23 -08:00
HD Moore fee6ad9799 Bump to 4.5.0-release for testing 2012-11-30 11:04:23 -08:00
Brandon Turner fc2feaaea3 Don't set BUNDLE_GEMFILE env var if already set
This allows setting BUNDLE_GEMFILE with `bundle exec` or some other
command in special cases.
2012-11-30 00:54:36 -06:00
HD Moore 213b3352fa This adds report_last_detail() to Nexpose 2012-11-29 13:07:31 -08:00
jvazquez-r7 087ff328b6 correct comments documentation 2012-11-28 22:18:56 +01:00
jvazquez-r7 17518f035c support for local exploits on file_dropper 2012-11-28 22:17:27 +01:00
Tod Beardsley 95f084b296 Use cvedetails not mitre. 2012-11-28 13:24:08 -06:00
sinn3r 541ecd49d6 Merge branch 'web-modules' of git://github.com/tasos-r7/metasploit-framework into tasos-r7-web-modules 2012-11-26 12:17:24 -06:00
sinn3r d95220da59 Merge branch 'jlee-r7-bug/rm7499-fastlib-1.8.7' 2012-11-21 20:39:11 -06:00
Tasos Laskos 26b3b4577d Merge remote-tracking branch 'upstream/master' into web-modules 2012-11-21 23:57:42 +02:00
Tasos Laskos b656554769 Exploit::Remote::Web: moved status printing calls out of #perform_request and into #exploit 2012-11-21 23:28:26 +02:00
James Lee 3640a344d4 Fix whitespace and long lines 2012-11-20 19:29:12 -06:00
James Lee 084398b611 Fix 1.8.7 incompatibility
::File.find did not return an Enumerable when not given a block in
1.8.7; instead it un-idiomatically just raised an exception.  The
solution is just to give the block directly to .find instead of trying
to call #each on its return value.

[FixRM #7499]
2012-11-20 19:28:33 -06:00
James Lee fcf1c87f64 Fix alignment of one of the banners
Lots of backslashes in a string make it hard to see in the code what it
will look like on on the console. Use single quotes and unescaped
backslashes.
2012-11-20 17:22:38 -06:00
HD Moore f5c7f4c41a Remove trailing whitespace 2012-11-19 19:42:22 -06:00
sinn3r 527ba0e401 Merge branch 'feature/automatic-fs-cleanup' of git://github.com/jlee-r7/metasploit-framework into jlee-r7-feature/automatic-fs-cleanup 2012-11-19 15:59:19 -06:00
James Lee 2526dce20a Add attrib.exe for removing read-only files
This really should be a standard part of session.fs.file.rm
2012-11-19 15:18:03 -06:00
sinn3r d4749ff009 Merge branch 'feature/automatic-fs-cleanup' of git://github.com/jlee-r7/metasploit-framework into jlee-r7-feature/automatic-fs-cleanup 2012-11-16 19:02:46 -06:00
James Lee c81a289d5d Fix a few bad tabs and some 1.9-only syntax 2012-11-16 16:07:12 -06:00
James Lee 591b085858 Add support for shell sessions in FileDropper 2012-11-16 15:51:54 -06:00
Tasos Laskos c659b37c94 Updated indentation to use tabs 2012-11-16 23:11:48 +02:00
James Lee 3363475f99 Fix backwards order of @param comment 2012-11-15 17:55:17 -06:00
James Lee 83708a5a48 Add a FileDropper mixin for recording cleanup targets
Doesn't cover shell sessions yet, so needs a bit more work
2012-11-15 17:52:10 -06:00
James Lee 0e7c3a82f5 Prepend unlink instead of appending
Makes it work when using meterpreter.  Because "quit" or "exit" in the
console ends up calling die() instead of falling through to whatever's
left in the file, a meterpreter session would never reach the code to
delete itself before this change.
2012-11-15 16:22:21 -06:00
Tasos Laskos 7032ef0f6f Merge remote-tracking branch 'upstream/master' into web-modules 2012-11-09 00:21:38 +02:00
jvazquez-r7 b75c622813 Merge branch 'master' into feature/udp-scanner-mixin 2012-11-08 20:15:25 +01:00
HD Moore 0e8a3f0ea6 Merge branch 'master' into feature/udp-scanner-mixin 2012-11-08 06:09:22 -06:00
James Lee 2ebe2fa08e Merge branch 'rapid7' into bug/rm7037-hash-iteration 2012-11-07 19:27:11 -06:00
James Lee 8a4fb07a0c Merge branch 'bug/read-module-content-errno-enoent' into rapid7
Really [Closes #1025]
2012-11-07 19:25:39 -06:00
James Lee 26a145e527 Always overwrite the old module even when ambiguous 2012-11-07 18:51:12 -06:00
James Lee 3a572625f5 return inside a block returns from outer method
So no need to check its return value.
2012-11-07 17:43:22 -06:00
James Lee aaa5a3c0bb Add "Call stack:" to the log when a module load fails 2012-11-07 12:48:55 -06:00