Use cmd_exec

bug/bundler_fix
jvazquez-r7 2015-06-26 11:54:19 -05:00
parent 31b7ef49d6
commit 7ccc86d338
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 2 additions and 2 deletions

View File

@ -230,9 +230,9 @@ class Metasploit4 < Msf::Exploit::Local
# Error handling for process.execute() can throw a RequestError in send_request. # Error handling for process.execute() can throw a RequestError in send_request.
begin begin
unless datastore['EXE::Custom'] unless datastore['EXE::Custom']
session.shell_command_token(script_on_target) cmd_exec("wscript \"#{script_on_target}\"")
else else
session.shell_command_token("cscript \"#{script_on_target}\"") cmd_exec("cscript \"#{script_on_target}\"")
end end
rescue rescue
print_error("Failed to execute payload on target") print_error("Failed to execute payload on target")