Skip to content

Commit 032312d

Browse files
committed
Properly check res
1 parent ec83a86 commit 032312d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/auxiliary/scanner/http/cisco_ironport_enum.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ def check_conn?
6363
if res
6464
print_good("#{rhost}:#{rport} - Server is responsive...")
6565
return true
66-
else
67-
return false
6866
end
6967
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError, ::Errno::EPIPE
70-
return false
7168
end
69+
false
7270
end
7371

7472
#

modules/auxiliary/scanner/http/cisco_ssl_vpn.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,17 @@ def run_host(ip)
8383
def check_conn?
8484
begin
8585
res = send_request_cgi('uri' => '/', 'method' => 'GET')
86-
vprint_good("Server is responsive...")
87-
return true
86+
if res
87+
vprint_good("Server is responsive...")
88+
return true
89+
end
8890
rescue ::Rex::ConnectionRefused,
8991
::Rex::HostUnreachable,
9092
::Rex::ConnectionTimeout,
9193
::Rex::ConnectionError,
9294
::Errno::EPIPE
93-
return
9495
end
96+
false
9597
end
9698

9799
def enumerate_vpn_groups

0 commit comments

Comments
 (0)