Skip to content

Commit bdc3f06

Browse files
committed
ftp_version: rescue more
1 parent 5fd9420 commit bdc3f06

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

modules/auxiliary/scanner/ftp/ftp_version.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ def run_host(_target_host)
4747
else
4848
print_warning('No FTP banner received')
4949
end
50+
rescue ::Rex::ConnectionRefused
51+
vprint_error('Connection refused')
52+
rescue ::Rex::TimeoutError, ::Rex::ConnectionError, ::EOFError, ::Errno::ECONNREFUSED => e
53+
vprint_error(e.message)
5054
rescue ::Interrupt
5155
raise $ERROR_INFO
52-
rescue ::Rex::ConnectionError, ::IOError => e
53-
vprint_error(e.message)
5456
ensure
5557
disconnect
5658
end

0 commit comments

Comments
 (0)