Commit Graph

43 Commits

Author SHA1 Message Date
Matthew Kienow cb8131ab22 Validate search cmd arguments 2018-04-30 00:02:03 -04:00
Matthew Kienow 89d86b1f48 Remove code related to unused search cmd options 2018-04-29 23:16:30 -04:00
Matthew Kienow ca7b10af39 Add search cmd option to write CSV output file 2018-04-29 23:08:24 -04:00
William Vu d2a683d2df Add whitespace and update help 2018-04-12 15:39:04 -05:00
Auxilus 0b3f50ea80 show help when no arguments provided to search 2018-04-13 01:27:22 +05:30
Mehmet İnce 6811097bed Create reload_file method for edit and reload_lib cms 2018-03-14 11:47:23 +03:00
Mehmet İnce 9b84477ddc Changing cmd name to reload_lib 2018-03-13 22:17:59 +03:00
Mehmet İnce b7f95b9cbe Add a loadlib command 2018-03-13 14:03:44 +03:00
William Vu a255586750 Refactor to use guard clauses 2018-01-22 12:38:02 -06:00
Brent Cook df71defdea fix library-specific error messages to not appear with modules 2018-01-18 05:55:51 -06:00
Brent Cook 7fe237abe1 Land #9220, Module cache improvements 2018-01-17 22:34:51 -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
William Vu f132c1572f Fix #9194, clarified error for reloading modules 2017-11-28 17:15:56 -06:00
christopher lee fe1af35107 First pass at changes needed for module metadata caching 2017-11-15 16:38:01 -06: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
christopher lee 43ddc66350 Initial fix for non db cache 2017-11-07 10:33:47 -06: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
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 1ec968192b Add tab completion to the edit command 2017-09-29 15:43:53 -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
William Vu 100afaf251 Add ./ to cmd_use for paths and simplify cases
Don't accommodate typos.
2017-08-23 10:24:37 -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
darkbushido f4013b02e1 renaming db_common to common
this moves the following methods into common
  arg_host_range ( used in creds and db )
  arg_port_range ( used in creds and db )
  set_rhosts_from_addrs ( used in creds and db )
  show_options ( used in jobs and modules )
2017-06-05 14:19:18 -05:00
HD Moore b5771b0f72 Get into the DANGER ZOOOOOOONE 2017-03-31 12:26:42 -05:00
William Vu 1a04691201 Fix #2504, edit command fixes I missed 3y ago
local_editor was never nil, so there was some dead code.
2017-01-08 03:02:19 -06:00
Brent Cook a4950a1598 add auto-complete info for 'show info'
msf > use auxiliary/admin/http/nuuo_nvrmini_reset
msf auxiliary(nuuo_nvrmini_reset) > show
show actions    show all        show encoders   show exploits   show missing    show options    show plugins    show targets
show advanced   show auxiliary  show evasion    show info       show nops       show payloads   show post
2016-12-27 15:48:41 -06:00
William Vu 11e3e1f3dd Handle a couple more edge cases
I don't want to go any further down the rabbit hole.
2016-12-20 18:36:22 -06:00
William Vu 41605c533c Add reference name enforcement to cmd_use 2016-12-20 18:21:24 -06:00
Brent Cook d091a32be8 whitespace/indentation 2016-12-06 16:37:22 -06:00
David Maloney f56c7f9a8e cosmetic touchups 2016-12-05 11:25:56 -06:00
David Maloney d85f9880ff fix command dispatcher specs 2016-12-05 11:16:15 -06:00
David Maloney ab2e88a49e created modules command dispatcher
moved all commands related to navigating around
modules, editing them, and viewing their info into
a new command dispatcher
2016-12-05 10:30:18 -06:00