Skip to content

Commit 2680809

Browse files
author
jvazquez-r7
committed
Merge branch 'nil_res_bug_fixes' of https://github.com/wchen-r7/metasploit-framework into wchen-r7-nil_res_bug_fixes
2 parents 5e873d0 + 2c4273e commit 2680809

File tree

8 files changed

+15
-8
lines changed

8 files changed

+15
-8
lines changed

modules/auxiliary/admin/officescan/tmlisten_traversal.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ def run_host(target_host)
5151
'method' => 'GET',
5252
}, 20)
5353

54+
if not res
55+
print_error("No response from server")
56+
return
57+
end
58+
5459
http_fingerprint({ :response => res })
5560

5661
if (res.code >= 200)

modules/auxiliary/dos/http/sonicwall_ssl_format.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run
5858
'uri' => datastore['URI'] + fmt,
5959
})
6060

61-
if res.code == 200
61+
if res and res.code == 200
6262
res.body.scan(/\<td class\=\"loginError\"\>(.+)XX/ism)
6363
print_status("Information leaked: #{$1}")
6464
end

modules/auxiliary/scanner/http/ektron_cms400net.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run_host(ip)
6767

6868
#Check for HTTP 200 response.
6969
#Numerous versions and configs make if difficult to further fingerprint.
70-
if (res.code == 200)
70+
if (res and res.code == 200)
7171
print_status("Ektron CMS400.NET install found at #{target_url} [HTTP 200]")
7272

7373
#Gather __VIEWSTATE and __EVENTVALIDATION from HTTP response.

modules/auxiliary/scanner/http/sap_businessobjects_user_brute.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def enum_user(user='administrator', pass='pass')
8989
'Content-Type' => 'text/xml; charset=UTF-8',
9090
}
9191
}, 45)
92-
return :abort if (res.code == 404)
93-
success = true if(res.body.match(/SessionInfo/i))
92+
return :abort if (!res or (res and res.code == 404))
93+
success = true if(res and res.body.match(/SessionInfo/i))
9494
success
9595

9696
rescue ::Rex::ConnectionError

modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def enum_user(user, pass)
7575
'Accept-Encoding' => "gzip,deflate",
7676
},
7777
}, 45)
78-
return :abort if (res.code != 200)
78+
return :abort if (!res or (res and res.code != 200))
7979
if(res.body.match(/Account Information/i))
8080
success = false
8181
else

modules/auxiliary/scanner/http/sap_businessobjects_user_enum.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def enum_user(user='administrator', pass='invalid-sap-password-0d03b389-b7a1-4ec
9393
}, 45)
9494

9595
if res
96-
return :abort if (res.code == 404)
97-
success = true if(res.body.match(/Invalid password/i))
96+
return :abort if (!res or (res and res.code == 404))
97+
success = true if(res and res.body.match(/Invalid password/i))
9898
success
9999
else
100100
vprint_error("[SAP BusinessObjects] No response")

modules/auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def enum_user(user, pass)
126126
}
127127
}, 45)
128128

129+
return if not res
130+
129131
if (res.code != 500 and res.code != 200)
130132
return
131133
else

modules/exploits/unix/webapp/dogfood_spell_exec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def check
7070
'uri' => datastore['URIPATH'],
7171
}, 1)
7272

73-
if (res.body =~ /Spell Check complete/)
73+
if (res and res.body =~ /Spell Check complete/)
7474
return Exploit::CheckCode::Detected
7575
end
7676
return Exploit::CheckCode::Safe

0 commit comments

Comments
 (0)