more fixes

bug/bundler_fix
David Maloney 2012-11-01 11:59:18 -05:00
parent 519eb0c2be
commit f843740fcb
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@ class Metasploit3 < Msf::Exploit::Remote
print_error "Login failed!" print_error "Login failed!"
return Msf::Exploit::CheckCode::Safe return Msf::Exploit::CheckCode::Safe
end end
unless streams.class == Hash
print_error "Recieved error while running check"
return Msf::Exploit::CheckCode::Safe
end
streams = winrm_run_cmd("powershell Get-ExecutionPolicy") streams = winrm_run_cmd("powershell Get-ExecutionPolicy")
if streams['stdout'].include? 'Unrestricted' if streams['stdout'].include? 'Unrestricted'
return Msf::Exploit::CheckCode::Vulnerable return Msf::Exploit::CheckCode::Vulnerable