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
Brent Cook
1b4a0e1abb
switch back to source_address for now
2019-02-13 17:35:00 -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
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
7414b18f20
Move prompt_char space to correct place
2018-08-29 10:38:28 -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
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
Brent Cook
99965c142b
remove duplicate check
2018-02-20 04:42:49 -06:00
Brent Cook
bb3a11dd20
use ctrl-d to cancel input instead
2018-02-20 04:40:00 -06:00
Brent Cook
f5f7b4d25a
handle sessions still open
2018-02-20 03:31:20 -06:00
Brent Cook
e995ccfc33
make this a little easier to read
2018-02-20 03:27:55 -06:00
Brent Cook
e26fb49c99
if we have no more input from the console, quit
2018-02-20 03:27:38 -06:00
Spencer McIntyre
214c137b4a
Don't use parenthesis around pgets
2018-02-07 15:53:11 -05:00
Spencer McIntyre
0ad7d10e05
Use a continuation flag to disable tab completion
2018-02-06 14:44:55 -05:00
Spencer McIntyre
6d7579d907
Support breaking commands into multiple lines
2018-02-06 14:29:11 -05:00
James Lee
af42f517b8
Default PromptTimeFormat to %T
2017-10-17 16:39:44 -05:00
cypher
27ba8f00df
check for nil msg in print_error
2016-12-14 21:10:10 -08:00
h00die
cd01b07682
Land #7565
...
Lands print_bad and vprint_bad from todb-r7
2016-11-18 13:29:39 -05:00
Dylan Davis
491a3a3162
Prevent the input prompt from being mangled by asynchronous prints.
2016-11-16 20:43:07 -07:00
Tod Beardsley
1deacad2be
Add a print_bad alias for print_error
...
Came up on Twitter, where Justin may have been trolling a little:
https://twitter.com/jstnkndy/status/798671298302017536
We have a `print_good` method, but not a `print_bad`, which seems a
little weird for Ruby -- opposite methods should be intuitive as Justin
is implying.
Anyway, I went with alias_method, thanks to the compelling argument at
https://github.com/bbatsov/ruby-style-guide#alias-method
...since Metasploit is all about the singleton, and didn't want to risk
some unexpected scoping thing.
Also dang, we define the `print_` methods like fifty billion times!
Really should fix that some day.
2016-11-15 19:20:42 -06:00
Brent Cook
57ab974737
File.exists? must die
2016-04-21 00:47:07 -04:00
William Vu
5f8d58f214
Use framework.db.active
2015-04-06 14:08:10 -05:00
James Lee
566c330b83
Add workspace to prompt format options
2015-04-06 09:19:49 -05:00
Tab Assassin
7e5e0f7fc8
Retab lib
2013-08-30 16:28:33 -05:00
sinn3r
d36f642edc
Add print_warning()
2012-10-12 21:48:15 -05:00
HD Moore
d656e3185f
Mark all libraries as defaulting to 8-bit strings
2012-06-29 00:18:28 -05:00
Tod Beardsley
a75371c282
See #5660 . Well that broke other things. Rats.
...
git-svn-id: file:///home/svn/framework3/trunk@13861 4d416f70-5f16-0410-b530-b9f4589650da
2011-10-10 21:20:45 +00:00
Tod Beardsley
e9e4dc5d02
Fixes #5660 for real. Apparently I cannot tell the difference between 0 and 1. I would be a terrible robot. 0101100101.
...
git-svn-id: file:///home/svn/framework3/trunk@13857 4d416f70-5f16-0410-b530-b9f4589650da
2011-10-10 19:03:18 +00:00
Tod Beardsley
1f1cd87e87
Fixes #5660 . update_prompt('') is now equivalent to update_prompt(nil), which avoids the prompt stacking problem when setting an empty prompt.
...
git-svn-id: file:///home/svn/framework3/trunk@13855 4d416f70-5f16-0410-b530-b9f4589650da
2011-10-10 18:42:44 +00:00
Joshua Drake
f1473c4cb3
Fixes #5062 - Use .length instead of .count (1.8 compat)
...
git-svn-id: file:///home/svn/framework3/trunk@13352 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-26 23:36:30 +00:00
David Rude
25bdbe6568
More prompt bug fixes, back and use commands should work properly now
...
git-svn-id: file:///home/svn/framework3/trunk@13326 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-24 18:41:23 +00:00
David Rude
a54b8c26c3
Fix prompt updates to show the last set prompt variable
...
git-svn-id: file:///home/svn/framework3/trunk@13291 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-22 01:49:29 +00:00
David Rude
2776669a51
reworked how the custom prompts work with different input streams
...
git-svn-id: file:///home/svn/framework3/trunk@13279 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-21 18:19:43 +00:00
HD Moore
8337c9e90a
Add the framework accessor, unbreak trunk
...
git-svn-id: file:///home/svn/framework3/trunk@13276 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-21 15:35:28 +00:00
David Rude
1902b92878
Merge custom prompt code
...
git-svn-id: file:///home/svn/framework3/trunk@13272 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-21 06:14:25 +00:00
HD Moore
5bbf27bf5b
Woops, this may not have a prompt accessor, find another way
...
git-svn-id: file:///home/svn/framework3/trunk@13029 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-25 20:33:15 +00:00
HD Moore
da7cc53c38
Add the spool command for redirecting output to both the console and a file
...
git-svn-id: file:///home/svn/framework3/trunk@13028 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-25 18:51:07 +00:00
James Lee
e94d39af2c
un-ghetto meterpreter output logging
...
git-svn-id: file:///home/svn/framework3/trunk@11750 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-15 05:45:01 +00:00