Skip to content

Commit 77942f0

Browse files
committed
Fix undefined method error
[FixRM rapid7#8325]
1 parent 2fa75e0 commit 77942f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ def run_host(ip)
4545
'uri' => "#{$uri}\/$defaultview?Readviewentries",
4646
}, 25)
4747

48+
if res.nil?
49+
print_error("Connection timed out")
50+
return
51+
end
52+
4853
if (res and res.body.to_s =~ /\<viewentries/)
4954
print_good("http://#{vhost}:#{rport} - Lotus Domino - OK names.nsf accessible without credentials")
5055
cookie = ''
@@ -85,6 +90,11 @@ def do_login(user=nil,pass=nil)
8590
'data' => post_data,
8691
}, 20)
8792

93+
if res.nil?
94+
print_error("Connection timed out")
95+
return
96+
end
97+
8898
if (res and res.code == 302 )
8999
if res.headers['Set-Cookie'] and res.headers['Set-Cookie'].match(/DomAuthSessId=(.*);(.*)/i)
90100
cookie = "DomAuthSessId=#{$1}"

0 commit comments

Comments
 (0)