Skip to content

Commit 9fdbfd7

Browse files
committed
Use vprint_error
1 parent 017ae46 commit 9fdbfd7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

modules/auxiliary/scanner/http/f5_bigip_http_vs_scanner.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ def bigip_http?(ip, port, ssl, verbose = false)
5252
return true if server =~ /BIG\-IP/ || server =~ /BigIP/
5353
end
5454
rescue ::Rex::ConnectionRefused
55-
print_status("#{ip}:#{port} - TCP port closed") if verbose
55+
vprint_error("#{ip}:#{port} - Connection refused")
5656
rescue ::Rex::ConnectionError
57-
print_error("#{ip}:#{port} - Connection error")
57+
vprint_error("#{ip}:#{port} - Connection error")
5858
rescue ::OpenSSL::SSL::SSLError
59-
print_error("#{ip}:#{port} - SSL/TLS connection error")
60-
rescue => e
61-
print_error("#{ip}:#{port} - Connection failed") if verbose
59+
vprint_error("#{ip}:#{port} - SSL/TLS connection error")
6260
end
6361
end
6462
rescue Timeout::Error
65-
print_error("#{ip}:#{port} - HTTP connection timed out") if verbose
63+
vprint_error("#{ip}:#{port} - HTTP connection timed out") if verbose
6664
end
6765
return false
6866
end
@@ -74,15 +72,15 @@ def run_host(ip)
7472
ports.each do |port|
7573
next if port == 443
7674
if bigip_http?(ip, port, ssl = false, verbose)
77-
print_status("#{ip}:#{port} - BigIP HTTP virtual server found")
75+
print_good("#{ip}:#{port} - BigIP HTTP virtual server found")
7876
ports.delete(port)
7977
end
8078
end
8179

8280
ports.each do |port|
8381
next if port == 80
8482
if bigip_http?(ip, port, ssl = true, verbose)
85-
print_status("#{ip}:#{port} - BigIP HTTP virtual server found")
83+
print_good("#{ip}:#{port} - BigIP HTTP virtual server found")
8684
end
8785
end
8886

0 commit comments

Comments
 (0)