Skip to content

Commit d98841d

Browse files
committed
Land rapid7#5109, uictl enable/disable all
2 parents c9bf8f3 + 1591c92 commit d98841d

File tree

1 file changed

+9
-1
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+9
-1
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def cmd_idletime(*args)
8989
def cmd_uictl(*args)
9090
if (args.length < 2)
9191
print_line(
92-
"Usage: uictl [enable/disable] [keyboard/mouse]")
92+
"Usage: uictl [enable/disable] [keyboard/mouse/all]")
9393
return true
9494
end
9595

@@ -102,6 +102,10 @@ def cmd_uictl(*args)
102102
when 'mouse'
103103
print_line("Enabling mouse...")
104104
client.ui.enable_mouse
105+
when 'all'
106+
print_line("Enabling all...")
107+
client.ui.enable_keyboard
108+
client.ui.enable_mouse
105109
else
106110
print_error("Unsupported user interface device: #{args[1]}")
107111
end
@@ -113,6 +117,10 @@ def cmd_uictl(*args)
113117
when 'mouse'
114118
print_line("Disabling mouse...")
115119
client.ui.disable_mouse
120+
when 'all'
121+
print_line("Disabling all...")
122+
client.ui.disable_keyboard
123+
client.ui.disable_mouse
116124
else
117125
print_error("Unsupported user interface device: #{args[1]}")
118126
end

0 commit comments

Comments
 (0)