Skip to content

Commit ff39bee

Browse files
author
jvazquez-r7
committed
Land rapid7#2611, @hmoore-r7's fixes for supermicro modules
2 parents 7ec7248 + 09c31f7 commit ff39bee

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def is_supermicro?
4444
"method" => "GET"
4545
})
4646

47-
if res and res.code == 200 and res.body =~ /ATEN International Co Ltd\./
47+
if res and res.code == 200 and res.body.to_s =~ /ATEN International Co Ltd\./
4848
return true
4949
else
5050
return false
@@ -70,7 +70,7 @@ def check_close_window
7070

7171
res = send_close_window_request(safe_check)
7272

73-
unless res and res.code == 200 and res.body =~ /Can't find action/
73+
unless res and res.code == 200 and res.body.to_s =~ /Can't find action/
7474
return false
7575
end
7676

@@ -104,7 +104,7 @@ def check_login
104104

105105
res = send_login_request(safe_check)
106106

107-
unless res and res.code == 200 and res.body =~ /ATEN International Co Ltd\./ and res.body =~ /top\.location\.href = location\.href/
107+
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/
108108
return false
109109
end
110110

modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize(info = {})
2727
},
2828
'Author' =>
2929
[
30-
'hdm', # Discovery and Metasploit module
30+
'hdm', # Discovery and analysis
3131
'juan vazquez' # Metasploit module
3232
],
3333
'License' => MSF_LICENSE,
@@ -75,7 +75,7 @@ def login
7575
}
7676
})
7777

78-
if res and res.code == 200 and res.body =~ /self.location="\.\.\/cgi\/url_redirect\.cgi/ and res.headers["Set-Cookie"] =~ /(SID=[a-z]+)/
78+
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]+)/
7979
return $1
8080
else
8181
return nil
@@ -100,8 +100,8 @@ def read_file(file, session)
100100
}
101101
})
102102

103-
if res and res.code == 200 and res.headers["Content-type"] =~ /text\/html/ and res.headers["Pragma"].nil?
104-
return res.body
103+
if res and res.code == 200 and res.headers["Content-type"].to_s =~ /text\/html/ and res.headers["Pragma"].nil?
104+
return res.body.to_s
105105
else
106106
return nil
107107
end

0 commit comments

Comments
 (0)