Small nitpicks to catch bad http responses

bug/bundler_fix
HD Moore 2013-11-06 15:06:04 -06:00
parent 7ec7248500
commit 09c31f7582
2 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ class Metasploit3 < Msf::Auxiliary
"method" => "GET" "method" => "GET"
}) })
if res and res.code == 200 and res.body =~ /ATEN International Co Ltd\./ if res and res.code == 200 and res.body.to_s =~ /ATEN International Co Ltd\./
return true return true
else else
return false return false
@ -70,7 +70,7 @@ class Metasploit3 < Msf::Auxiliary
res = send_close_window_request(safe_check) res = send_close_window_request(safe_check)
unless res and res.code == 200 and res.body =~ /Can't find action/ unless res and res.code == 200 and res.body.to_s =~ /Can't find action/
return false return false
end end
@ -104,7 +104,7 @@ class Metasploit3 < Msf::Auxiliary
res = send_login_request(safe_check) res = send_login_request(safe_check)
unless res and res.code == 200 and res.body =~ /ATEN International Co Ltd\./ and res.body =~ /top\.location\.href = location\.href/ unless res and res.code == 200 and res.body.to_s =~ /ATEN International Co Ltd\./ and res.body.to_s =~ /top\.location\.href = location\.href/
return false return false
end end

View File

@ -27,7 +27,7 @@ class Metasploit3 < Msf::Auxiliary
}, },
'Author' => 'Author' =>
[ [
'hdm', # Discovery and Metasploit module 'hdm', # Discovery and analysis
'juan vazquez' # Metasploit module 'juan vazquez' # Metasploit module
], ],
'License' => MSF_LICENSE, 'License' => MSF_LICENSE,
@ -75,7 +75,7 @@ class Metasploit3 < Msf::Auxiliary
} }
}) })
if res and res.code == 200 and res.body =~ /self.location="\.\.\/cgi\/url_redirect\.cgi/ and res.headers["Set-Cookie"] =~ /(SID=[a-z]+)/ if res and res.code == 200 and res.body.to_s =~ /self.location="\.\.\/cgi\/url_redirect\.cgi/ and res.headers["Set-Cookie"].to_s =~ /(SID=[a-z]+)/
return $1 return $1
else else
return nil return nil
@ -100,8 +100,8 @@ class Metasploit3 < Msf::Auxiliary
} }
}) })
if res and res.code == 200 and res.headers["Content-type"] =~ /text\/html/ and res.headers["Pragma"].nil? if res and res.code == 200 and res.headers["Content-type"].to_s =~ /text\/html/ and res.headers["Pragma"].nil?
return res.body return res.body.to_s
else else
return nil return nil
end end