Small nitpicks to catch bad http responses
parent
7ec7248500
commit
09c31f7582
|
@ -44,7 +44,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
"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
|
||||
else
|
||||
return false
|
||||
|
@ -70,7 +70,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
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
|
||||
end
|
||||
|
||||
|
@ -104,7 +104,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
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
|
||||
end
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
},
|
||||
'Author' =>
|
||||
[
|
||||
'hdm', # Discovery and Metasploit module
|
||||
'hdm', # Discovery and analysis
|
||||
'juan vazquez' # Metasploit module
|
||||
],
|
||||
'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
|
||||
else
|
||||
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?
|
||||
return res.body
|
||||
if res and res.code == 200 and res.headers["Content-type"].to_s =~ /text\/html/ and res.headers["Pragma"].nil?
|
||||
return res.body.to_s
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue