Skip to content

Commit 6c2d99c

Browse files
author
jvazquez-r7
committed
Land rapid7#1972, @wchen-r7's patch for [FixRM:rapid7#4704]
2 parents 070111a + 8bdd89f commit 6c2d99c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

modules/auxiliary/dos/windows/ftp/filezilla_server_port.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ def initialize(info = {})
3535
end
3636

3737
def run
38-
connect_login
38+
begin
39+
c = connect_login
40+
rescue Rex::ConnectionRefused
41+
print_error("Connection refused.")
42+
return
43+
rescue Rex::ConnectionTimeout
44+
print_error("Connection timed out")
45+
return
46+
end
47+
48+
return if not c
3949

4050
send_cmd(['PASV', 'A*'], true) # Assigns PASV port
4151
send_cmd(['PORT', 'A*'], true) # Rejected but seems to assign NULL to pointer

0 commit comments

Comments
 (0)