Commit Graph

395 Commits

Author SHA1 Message Date
Zach Goldman 2c9ade955e make session query/shares help menu more explicit 2024-03-20 13:18:10 -05:00
sjanusz-r7 d51aa30fff Rex Table command column width based on longest dispatcher command with sane default 2024-02-27 13:11:24 +00:00
cgranleese-r7 450fd0876f Improve unknown command handling 2024-02-12 16:43:56 +00:00
h00die 6a851855a8 spelling fixes for lib folder 2024-01-06 15:54:49 -05:00
adfoster-r7 b58f963355 Land #18299, extend error message for timeouts to include more detail to user 2023-10-26 00:21:22 +01:00
Zach Goldman 862e738015 extend error message for timeouts to include more detail to user
initial functionality, testing/cleanup still needed

script and command functionality

remove unnecessary accessor

switch puts to print_error in proc

ensure proc is reset, run on every error, add yard docs

fix yard, refactor/remove dead code

rename on_error_proc
2023-10-25 11:08:00 -05:00
adfoster-r7 1f6009333e Add history support to nasm and metasm shells 2023-10-04 22:36:19 +01:00
adfoster-r7 a60e048e78 Fix msfrpc hanging when updating saved command history 2023-09-15 12:42:40 +01:00
adfoster-r7 449af8daa7 Fix broken msfconsole histories when switching between shell sessions 2023-07-27 16:12:57 +01:00
Grant Willcox ad82437067 Land #17591, Fix metasm_shell by requiring readline 2023-02-03 15:14:32 -06:00
Spencer McIntyre dc179f6279 Fix stack trace on exit via Ctrl+D (EOF) 2023-02-03 14:38:07 -05:00
cgranleese-r7 d1e68e634a Add row indicator to show targets command 2023-02-02 16:12:19 +00:00
adfoster-r7 00b85e9bb4 Fix msfrpcd console read failures 2022-07-27 13:11:11 +01:00
Spencer McIntyre d52bee3201 Remove an unnecessary duplicate line 2022-03-03 11:57:25 -05:00
Ashley Donaldson f6e88d0405 Fix bug in tab completion of directories 2022-03-03 15:57:10 +11:00
Simon Janusz 732bd3a71c Land #16173, Add readline option to msfconsole
Add readline option to msfconsole
2022-02-14 16:11:15 +00:00
alanfoster d45783a5a0 Add readline option to msfconsole 2022-02-13 23:47:08 +00:00
Spencer McIntyre 72ca957285 Don't use default values 2022-02-08 17:40:03 -05:00
Spencer McIntyre 1fe01087b6 Remove trailing whitespace from command output 2022-02-08 15:37:11 -05:00
Spencer McIntyre 7d9e6c2bb9 Don't crash when the hostname can't be determined
This fixes a framework-level crash when msfconsole initializes and the
HOSTNAME environment variable is not set and the hostname binary is
missing.
2022-02-08 15:14:36 -05:00
Ashley Donaldson 607ff2727a Resolve readline error when two options differ only in case 2021-11-29 12:47:28 +11:00
Ashley Donaldson 935eff899a Only perform deduplication if a value is actually returned 2021-11-11 13:17:35 +11:00
Ashley Donaldson 4986583f41 Fix bug in tab completion in case-sensitive situations
Includes a fix for a crash caused when tab completing.
This crash is the result of a bug in rb-readline when the only remaining options
provided in the tab completion procedure are identical. The bug is only triggered
when going case-insensitive, but we can avoid it by de-duping the list sent back to
rb-readline.
2021-11-11 12:09:59 +11:00
Tim W 3066c5b05e Revert "Fix bug in tab completion in case-sensitive situations"
This reverts commit 22fb90b258.
2021-11-10 16:44:29 +00:00
Ashley Donaldson 22fb90b258 Fix bug in tab completion in case-sensitive situations 2021-11-09 10:18:02 +11:00
adfoster-r7 9574100760 Improve interactive shell performance 2021-09-17 11:43:28 +01:00
adfoster-r7 50330c1559 Land #15522, Add feature flagged support for fully interactive Meterpreter shells 2021-09-03 14:24:41 +01:00
adfoster-r7 89ab189a87 Add quick fix for alias tab completion; Aliases most likely needs to be implemented differently 2021-08-25 19:58:54 +01:00
adfoster-r7 5837ceb03d Escape paths and perform consistent autocompletion of quoted strings 2021-08-23 12:07:45 +01:00
adfoster-r7 ef6c743452 Correctly handle quoted console options and whitespace 2021-08-23 12:07:40 +01:00
dwelch-r7 669caaf7a6 Rework interactive meterpreter shells feature flag 2021-08-18 15:07:59 +01:00
dwelch-r7 ae90c86333 Meterpreter interactive shell 2021-08-18 15:07:59 +01:00
Gaurav Purswani 25d4a71ef8 Add rescue for load error in case pry gem is not present
Co-authored-by: Jeffrey Martin <jeffrey_martin@rapid7.com>
2021-07-02 08:11:27 +05:30
Gaurav Purswani ff7625ed7d Update lib/rex/ui/text/shell.rb
Co-authored-by: Jeffrey Martin <jeffrey_martin@rapid7.com>
2021-07-02 08:10:55 +05:30
Jeffrey Martin 9e447d33a5 ensure final history write 2021-07-01 09:19:45 -05:00
Jeffrey Martin 35189dbc9a reverse commands when pulled from queue 2021-07-01 08:17:42 -05:00
Gaurav Purswani 5115651f11 Update history_manager.rb 2021-07-01 16:58:00 +05:30
Jeffrey Martin e85a31c36a write new instead of append
Co-authored-by: Gaurav Purswani <43883877+pingport80@users.noreply.github.com>
2021-06-29 08:17:47 -05:00
Jeffrey Martin 8e716b56a9 adjust history context to thread file write
By moving writes to a thread and allowing short circuit when
a context is reloaded quickly this code can shorten the conditions
that would cause slow context transitions.  This also restricts
history length to a defined constant applied to each context.
2021-06-28 15:01:10 -05:00
Gaurav Purswani c7749fa2c3 Update lib/rex/ui/text/shell.rb
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
2021-06-28 19:35:19 +05:30
pingport80 b404c90830 disable pry history by default when used as break points 2021-06-25 20:35:52 +05:30
pingport80 1215ea2946 add rescue for interrupt 2021-06-25 16:21:22 +05:30
pingport80 1b816596bf update size to 2000 2021-06-23 23:49:13 +05:30
pingport80 8187a58549 add limit to size of history_files 2021-06-23 23:04:49 +05:30
Spencer McIntyre 582d64abe8 Add some documentation for the new code 2021-06-16 09:04:11 -04:00
Spencer McIntyre 2e07dc7686 Search extensions for missing Meterpreter commands 2021-06-16 09:04:11 -04:00
adfoster-r7 11fb9e8e87 Land #15194, Fix RPORT tab completion crash when connected to remote dataservice 2021-06-01 13:47:08 +01:00
A Galway 134e820322 removes obsolete has_host? usage 2021-06-01 12:02:58 +01:00
Gaurav Purswani 379b0825b3 Merge branch 'master' into separate_session_history 2021-05-27 20:20:01 +05:30
Spencer McIntyre 0ea33ffee0 Consolidate session and shell context changes 2021-05-27 20:08:14 +05:30