Commit Graph

1093 Commits

Author SHA1 Message Date
Brent Cook 5ec3da843e Land #9349, GoAhead LD_PRELOAD CGI Module 2018-01-24 17:12:47 -06:00
William Vu 7da3bdd081 Land #9432, cmd_edit improvements (again!)
We seem to enjoy refactoring this method.
2018-01-24 17:12:20 -06:00
William Vu 0a1eea9860 Allow local_editor in cmd_edit to take arguments
Such as vim -i NONE. This may allow command injection via arguments.
However, you can already start an arbitrary program by setting
LocalEditor or escaping the editor.

msf > setg LocalEditor /bin/sh
LocalEditor => /bin/sh
msf > edit -i
[*] Launching /bin/sh -i
$
2017-12-14 19:51:57 -06:00
Brent Cook e5a5d35ad8 add 'promptname' that expands the module path a bit more
This allows the user to actually see the module context.
2017-11-29 19:49:43 -06:00
Brent Cook 55f56a5350 Land #9110, added -C option to change default hosts columns 2017-11-29 17:48:44 -06:00
Brent Cook 0aeb245c9c Land #9252, docker improvements 2017-11-29 17:15:47 -06:00
William Vu f132c1572f Fix #9194, clarified error for reloading modules 2017-11-28 17:15:56 -06:00
Christian Mehlmauer 50351320d7 more docker work 2017-11-28 21:35:20 +01:00
William Vu 65412cd2f1 Land #9201, enhanced tab completion 2017-11-27 11:37:04 -06:00
Spencer McIntyre fb7635502d Tab completion for exploit and handler commands 2017-11-11 17:11:54 -05:00
Spencer McIntyre 68a43fef36 Add the new generic tab completion functoin 2017-11-11 16:47:11 -05:00
William Vu 97859ebf8c Clarify XXX comment no user will ever see anyway 2017-11-09 15:23:37 -06:00
William Vu 577baf6070 Add a check for .rb in cmd_edit 2017-11-09 15:17:53 -06:00
Spencer McIntyre d815e42ccf Add a generic tab completion function 2017-11-01 20:38:45 -04:00
Spencer McIntyre 1462330f34 Add tab completion to the payload generate command 2017-10-31 20:33:31 -04:00
Spencer McIntyre 940573ad49 Support ruby directives in Meterpreter rc scripts 2017-10-29 15:57:33 -04:00
William Vu 73c9807c55 Add module support for sessions -s 2017-10-27 12:28:53 -05:00
Tim ca4feb5136 fix session upgrading 2017-10-23 01:26:45 +08:00
Dave Farrow 636551aa03 Fixed help message to match test 2017-10-20 21:32:54 -07:00
Dave Farrow ea1ac3d5b3 #9108: added -C option to change default hosts columns
The -C option saves the column list the user provided and uses that as the default column list until msfconsole is restarted
2017-10-20 20:39:38 -07:00
Adam Cammack 436b72d4cc Land #9023, Add tab completion to the edit command 2017-10-09 11:37:12 -05:00
William Vu 27dcc162b2 Revert to Vim because ed is the standard editor
https://www.gnu.org/fun/jokes/ed-msg.html
2017-10-09 11:34:45 -05:00
James Barnett 56e95f15c9 Land #9024, fix bug when manually adding loot
cmd_loot was throwing a stack trace when the host was not properly defined.
This fixes it to give a useful error message.
2017-10-06 16:02:12 -05:00
William Vu 5b9a4d73ee Readd hostless loot display
In the chance event someone actually managed to store it.
2017-10-02 23:31:44 -05:00
William Vu 403b5e2fa8 Move TARGET check into option_values_payloads 2017-10-02 23:22:42 -05:00
William Vu 9941097a5c Remove extraneous else 2017-09-29 19:01:04 -05:00
William Vu 6de986bd70 Fix cache invalidation bug in tab completion
We use active_module instead of cmd_use to invalidate @cache_payloads,
since the ivar is no longer shared between cmd_set and cmd_use.

Fixes #8483. See #7655.
2017-09-29 18:01:50 -05:00
William Vu 0723477b49 Fix nil bug in loot -a and nix hostless loot
Apparently you can't actually store hostless loot.
2017-09-29 16:16:16 -05:00
William Vu 1ec968192b Add tab completion to the edit command 2017-09-29 15:43:53 -05:00
bwatters-r7 e0fee9e317 Land #8821, Expose session naming 2017-09-29 15:32:47 -05:00
Adam Cammack 968ae8e267 Land #8925, Allow edit to optionally take a path 2017-09-26 13:32:39 -05:00
Tim 9afb09813f update cmd_edit_help text 2017-09-13 14:54:35 +08:00
Tim bc02df16b3 update cmd_edit_help 2017-09-06 16:04:54 +08:00
Tim e83e4d0a7e add argument to cmd_edit 2017-09-06 11:30:28 +08:00
Tim 636d1a5fcb fix #8921, fix crash on nmap tab completion 2017-09-05 16:36:14 +08:00
Adam Cammack d6ed1f6f8d Make backgrounding messages more consistent
Inspired by the work in #8896
2017-08-28 11:19:17 -05:00
Marc Green d50c7d7f5c Output job id when jobifying exploit 2017-08-28 14:36:04 +02:00
William Vu b797e96a19 Remove nil check because blank? handles it
The check used to be session_name.strip.empty?, but I forgot to remove
the nil case when I converted to blank?.
2017-08-25 14:11:59 -05:00
William Vu 100afaf251 Add ./ to cmd_use for paths and simplify cases
Don't accommodate typos.
2017-08-23 10:24:37 -05:00
William Vu 5b7785438f Add session naming support to CommandDispatcher 2017-08-16 18:18:49 -05:00
William Vu 18c9ac7abb Update stdin processing in resource scripting
Originally in #4674, I wanted to add stdin to msfconsole -r, but I
purposefully left off support for stdin in the console. Now it works.
2017-07-12 13:40:44 -05:00
Brent Cook 06aa239d47 pass loggger conditionally to common search function 2017-07-03 16:22:47 -05:00
David Maloney 1cbc4af6b6 Land #8606
land's bcook's module search rpc work
2017-06-30 14:58:46 -05:00
William Vu 1637f55c65 Handle ArgumentError when previous gets args
Dumb patch.
2017-06-27 00:41:26 -05:00
Brent Cook 5635e81a87 export module.search command 2017-06-24 15:50:37 -05:00
Brent Cook e0695cbf9b add a framework-wide search method 2017-06-24 15:09:32 -05:00
Brent Cook 8eceef18d9 refactor search, separate search bits from output 2017-06-24 14:51:14 -05:00
RageLtMan 42d1fae2e6 Upstream console search additions and fixes
The -S flag for console commands, backed by search functionality
in Rex' tables, originally pushed upstream in #1604 (iirc), lacks
coverage for a number of commands which benefit a good deal from
inline filtering of the potentially large number of results.

Push more -S flags and surrounding table functionality upstream
to provide coverage for the console commands included in framework.

Include a fix for deleting hosts when DB references are a problem.

Include a fix for the upstream route command wherein scope must be
defined for the routing target by assuming a /32 without explicit
definition.

Note:
  With this in place, console behavior when filtering results is
roughly analagous to the R7 filtering in web UI, which should help
those of us trying to use both maintain corresponding workflows.

Testing:
  Used in-house for years, though changes to the diff from upstream
and our fork (expunging some internal code) are untested, so would
appreciate eyes and hands on.
2017-06-16 20:28:51 -04:00
William Vu 4198efa41f Remove pry from CommandDispatcher::Creds...
My bad. Should have been caught in #8517.
2017-06-08 00:18:46 -05:00
William Vu 596924552e Fix literal \n in jobs -i
Regression from #4063.
2017-06-07 03:19:30 -05:00