Skip to content

Commit 2597c71

Browse files
committed
Fix undefined method error
[FixRM rapid7#8338] [FixRM rapid7#8337]
1 parent 092b43c commit 2597c71

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/auxiliary/scanner/http/litespeed_source_disclosure.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ def run_host(ip)
6262
'uri' => "#{uri}#{nullbytetxt}",
6363
}, 25)
6464

65-
version = res.headers['Server'] if res
65+
if res.nil?
66+
print_error("Connection timed out")
67+
return
68+
end
69+
70+
version = res.headers['Server']
6671

6772
if vuln_versions.include?(version)
6873
print_good("#{target_url} - LiteSpeed - Vulnerable version: #{version}")

0 commit comments

Comments
 (0)