feedback included

bug/bundler_fix
m-1-k-3 2013-08-05 21:55:30 +02:00
parent a19afd163a
commit 786f16fc91
1 changed files with 11 additions and 8 deletions

View File

@ -109,20 +109,24 @@ class Metasploit3 < Msf::Exploit::Remote
"login" => "+Log+In+"
}
})
return if res.nil?
return if (res.headers['Server'].nil? or res.headers['Server'] !~ /Mathopd\/1.5p6/)
return if (res.code == 404)
if res.nil?
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice - no response")
end
if (res.headers['Server'].nil? or res.headers['Server'] !~ /Mathopd\/1.5p6/)
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice - check the server banner")
end
if (res.code == 404)
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice - 404 error")
end
if (res.body) =~ /#{login_check}/
print_good("#{rhost}:#{rport} - Successful login #{user}/#{pass}")
else
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - No successful login possible with #{user}/#{pass}")
return
end
rescue ::Rex::ConnectionError
vprint_error("#{rhost}:#{rport} - Failed to connect to the web server")
return
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice")
end
end
@ -200,8 +204,7 @@ class Metasploit3 < Msf::Exploit::Remote
})
return res
rescue ::Rex::ConnectionError
vprint_error("#{rhost}:#{rport} - Failed to connect to the web server")
return nil
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice")
end
end
end