diff --git a/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb b/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb index 4746f52150..16d77a623a 100644 --- a/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb +++ b/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb @@ -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 diff --git a/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb b/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb index 12378ab526..d32240505b 100644 --- a/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb +++ b/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb @@ -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