Spencer McIntyre
e771147046
Fix the default meterpreter prompt
2019-10-22 20:02:32 -04:00
Spencer McIntyre
8bb9f1798b
Add a few more variables including local variants
2019-10-10 22:20:37 -04:00
Spencer McIntyre
ef81205123
Add the %M meterpreter prompt var
2019-10-10 21:13:12 -04:00
Spencer McIntyre
d87308e9c0
Fix a couple of bugs in the MeterpreterPrompt
2019-10-10 21:13:12 -04:00
Spencer McIntyre
48f1e1d909
Add the %D and %U meterpreter prompt chars
2019-10-10 21:13:12 -04:00
Spencer McIntyre
f63fd37938
Support a dynmaic meterpreter prompt
2019-10-10 21:13:12 -04:00
Spencer McIntyre
dfa37a9fb0
Fix a bug when the unbalanced quote is the end
2019-04-24 14:02:18 -04:00
Spencer McIntyre
2a0e3690db
Close unbalanced quotes when tab completing
2019-04-24 11:01:23 -04:00
Spencer McIntyre
92e945ff46
Implement a custom shellsplit method
2019-04-24 10:55:02 -04:00
Spencer McIntyre
0e612045d3
Honor strings ending in slash space
2019-04-22 15:08:11 -04:00
Spencer McIntyre
e962f94fab
Handle spaces in tab completed words
2019-03-24 20:44:51 -04:00
Brent Cook
bf3256a64a
Land #11392 , only compute prompt expansions as-needed
2019-02-20 07:48:05 -06:00
Brent Cook
1b4a0e1abb
switch back to source_address for now
2019-02-13 17:35:00 -06:00
Adam Cammack
22eb2bb72b
Add support for showing detailed help for commands
2019-02-13 15:56:44 -06:00
Brent Cook
a1522ffd06
use Ruby socket
2019-02-13 04:41:41 -06:00
Brent Cook
8083853cb9
don't create a new socket every time the command prompt is displayed
2019-02-13 04:30:57 -06:00
Green-m
1b93363588
Change the error message when interrupt exploit.
2018-09-30 16:09:00 +08:00
William Vu
185931ca91
Land #10625 , repeat command to repeat commands
2018-09-20 15:24:03 -05:00
William Vu
6f72a0516f
Fix remaining typos
2018-09-20 15:23:15 -05:00
Adam Cammack
7c6c621a8f
Remember to assign self.prompt in shell.rb
...
Not everything updates the prompt all the time, make them feel welcome.
2018-09-13 15:51:07 -05:00
Adam Cammack
04cc7843a4
Typo fixes
2018-09-13 11:19:13 -05:00
William Vu
68a51da27b
Land #10477 , console prompt fixes and refactor
2018-09-12 18:00:48 -05:00
Adam Cammack
d017f420bf
Fix missing exception capture
2018-09-11 17:58:41 -05:00
Adam Cammack
de0f0a97fb
Add mode to Shell#run_single to re-raise errors
2018-09-11 17:23:56 -05:00
Adam Cammack
da25391426
Relocate option parsing error handling up a level
2018-09-11 17:22:05 -05:00
Adam Cammack
7414b18f20
Move prompt_char space to correct place
2018-08-29 10:38:28 -05:00
William Vu
e955e8dc15
Clean up code
...
And hope I didn't break anything.
2018-08-24 18:05:52 -05:00
Green-m
418b574161
Merge branch 'master' and resolve conflict.
2018-08-23 23:24:23 -04:00
asoto-r7
4aee3a4ae2
Land #10448 , Implementation of CTRL+C to send SIGINT signal
2018-08-20 18:14:29 -05:00
Adam Cammack
94dd67f3a5
Add public readers for prompt and prompt_char
...
This allows various things to inspect the state of the console before
calling `update_prompt`.
2018-08-17 14:41:48 -05:00
Adam Cammack
410eee8537
Remove 'append' mode from update_prompt
...
Nothing used it meaningfully. Also, due to the way `init_prompt` was set
prior to b1401e2e4e , it would have been
very broken: the prompt_char would have been included in the line twice
and prompt substitutions like %T would have been cached. Even more,
trying to append the empty string to the prompt (removed in that commit)
caused us to add a number of workarounds removed in
1df442e0cf .
2018-08-17 14:32:48 -05:00
Adam Cammack
b1401e2e4e
Update the prompt every shell tick
...
This was inadvertently done as part of the tab completion
initialization but is what we want. Also move the prompt formatting to
the prompt update and make the code more readable.
2018-08-17 14:10:28 -05:00
Adam Cammack
4375a3fbfb
Fix lurking bugs in the shell's prompt_yesno
2018-08-16 09:05:22 -05:00
Adam Cammack
c045f70e80
Emulate prompt_yesno semantics for UI drivers
2018-08-15 17:30:37 -05:00
Wang Yihang
6578950533
[-] Remove debug message
2018-08-09 16:32:27 +08:00
Wang Yihang
f6c28106b9
Merge remote-tracking branch 'upstream/master' into add-resource-meta-shell-command
2018-08-09 16:20:26 +08:00
William Vu
2bce8b008e
Fix history deduplication for system Readline
2018-08-07 16:53:24 -05:00
William Vu
298d5c3b30
Refactor history clearing
2018-08-07 16:53:17 -05:00
William Vu
3b2c3507d1
Refactor history deduplication on save
...
We move the check outside the block and clean up the syntax.
2018-08-07 11:18:13 -05:00
Auxilus
cb01216e0c
fix history issues as stated in #10423
2018-08-06 11:27:47 +05:30
William Vu
a0962855bd
Refactor history deduplication
...
We don't need to know the absolute index. We also fix the IndexError.
2018-08-05 14:28:10 -05:00
Auxilus
fce19cf5b8
Prevent adding the same command to history
2018-08-05 22:33:00 +05:30
Wang Yihang
c90b03808a
Merge remote-tracking branch 'upstream/master' into add-resource-meta-shell-command
2018-07-30 13:25:26 +08:00
Green-m
3f8906596d
Fix issue 10372, match mutiple slashes better
2018-07-26 05:35:04 -04:00
Adam Cammack
ef264e78f0
Refactor grep command to use optparse
...
This is an experiment to see what it would take to convert *all* option
assignment, parsing, and validation to use Ruby's builtin optparse. Our
current situation in the command dispatchers is a mishmash of bespoke
and Rex code, both with odd behaviors. Modules use a more formalized
system, but it is also a bit janky and unlike most other tools a
pentester might use.
The first step is to refactor the console commands to use Ruby's builtin
option parsing to reduce code and increase homogeneity among the various
functions. Next we plan to explore what it would take to invoke modules
from within Metasploit this way (this would be Metasploit 5+ only).
Refactoring `grep` seems to have been a success. There is now less code;
the code that declares and handles the options are now in the same
place; long options are now supported; adjacent, argument-less short
opts now work as expected; patterns can now begin with a `-`; and option
arguments are now validated. Additionally, optparse's argument
coercion/validation code can be extended for custom types/validations to
support more specialized commands.
2018-07-19 12:11:09 -05:00
Green-m
00a748a92c
Add tab_complete_directory
2018-07-17 06:29:12 -04:00
WangYihang
85bfca95fd
[+] Fixed meterpreter resource bug
2018-07-09 11:27:30 +08:00
Green-m
cfb3c4d3ad
Ignore case when use tab to complete
2018-06-01 07:37:23 -04:00
William Vu
6f1e75e097
Remove loopback restriction
...
It's occasionally useful, and we already warn when setting it.
2018-05-24 15:44:32 -05:00
William Vu
da3df23f03
Fix Socket#getifaddrs with ::
...
Rex::Socket#getifaddrs doesn't exist.
2018-05-24 14:53:41 -05:00