From 1591c92547d50cb05489e7b4d8f52aaa30791044 Mon Sep 17 00:00:00 2001 From: Roberto Soares Date: Thu, 9 Apr 2015 01:04:50 -0300 Subject: [PATCH] Add the "all" option for the uictl --- .../ui/console/command_dispatcher/stdapi/ui.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb index 046ad66371..56c508bf75 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb @@ -89,7 +89,7 @@ class Console::CommandDispatcher::Stdapi::Ui def cmd_uictl(*args) if (args.length < 2) print_line( - "Usage: uictl [enable/disable] [keyboard/mouse]") + "Usage: uictl [enable/disable] [keyboard/mouse/all]") return true end @@ -102,6 +102,10 @@ class Console::CommandDispatcher::Stdapi::Ui when 'mouse' print_line("Enabling mouse...") client.ui.enable_mouse + when 'all' + print_line("Enabling all...") + client.ui.enable_keyboard + client.ui.enable_mouse else print_error("Unsupported user interface device: #{args[1]}") end @@ -113,6 +117,10 @@ class Console::CommandDispatcher::Stdapi::Ui when 'mouse' print_line("Disabling mouse...") client.ui.disable_mouse + when 'all' + print_line("Disabling all...") + client.ui.disable_keyboard + client.ui.disable_mouse else print_error("Unsupported user interface device: #{args[1]}") end