From b83e8a2fa71504ca0cd5d54610a224723c8bb1cb Mon Sep 17 00:00:00 2001 From: dwelch-r7 Date: Tue, 23 Nov 2021 12:23:03 +0000 Subject: [PATCH] Tell the user about `shell -it` --- .../ui/console/command_dispatcher/stdapi/sys.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb index 30f7ad2d0a..1cef933983 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb @@ -368,11 +368,14 @@ class Console::CommandDispatcher::Stdapi::Sys if raw && !use_pty print_warning('Note: To use the fully interactive shell you must use a pty, i.e. %grnshell -it%clr') return false - end - if use_pty && pty_shell(sh_path, raw: raw) + elsif use_pty && pty_shell(sh_path, raw: raw) return true end + if client.framework.features.enabled?(Msf::FeatureManager::FULLY_INTERACTIVE_SHELLS) && !raw && !use_pty + print_line('This Meterpreter supports %grnshell -it%clr to start a fully interactive TTY.') + print_line('This will increase network traffic.') + end cmd_execute('-f', '/bin/sh', '-c', '-i') else # Then this is a multi-platform meterpreter (e.g., php or java), which