From c3e7556b06d949db302b5f11c0e8f9d5d7e318f8 Mon Sep 17 00:00:00 2001 From: Green-m Date: Fri, 15 Feb 2019 11:45:55 +0800 Subject: [PATCH] Fix a issue that show help do not work. --- .../post/meterpreter/ui/console/command_dispatcher/core.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb index 5726560b2c..ceed057434 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb @@ -1405,7 +1405,7 @@ class Console::CommandDispatcher::Core # Executes a script in the context of the meterpreter session. # def cmd_run(*args) - if args.empty? || args.include?('-h') + if args.empty? || args.length == 1 && args.include?('-h') cmd_run_help return true end @@ -1475,7 +1475,7 @@ class Console::CommandDispatcher::Core # Executes a script in the context of the meterpreter session in the background # def cmd_bgrun(*args) - if args.empty? || args.include?('-h') + if args.empty? || args.length == 1 && args.include?('-h') print_line('Usage: bgrun