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 6766ce7e7f..b0d16da36d 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb @@ -542,9 +542,8 @@ class Console::CommandDispatcher::Core # fall back to using the scripting interface. if (msf_loaded? and mod = client.framework.modules.create(script_name)) original_mod = mod - reloaded_mod = client.framework.modules.reload_module(original_mod) - unless reloaded_mod + unless original_mod error = client.framework.modules.module_load_error_by_path[original_mod.file_path] print_error("Failed to reload module: #{error}") @@ -552,7 +551,7 @@ class Console::CommandDispatcher::Core end opts = (args + [ "SESSION=#{client.sid}" ]).join(',') - reloaded_mod.run_simple( + original_mod.run_simple( #'RunAsJob' => true, 'LocalInput' => shell.input, 'LocalOutput' => shell.output,