Skip to content

Commit a263f5a

Browse files
committed
ftp_version: Make sure to disconnect
1 parent ef715e4 commit a263f5a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/auxiliary/scanner/ftp/ftp_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def run_host(_target_host)
5757
data: { banner: banner.strip }
5858
)
5959
end
60-
61-
disconnect
6260
rescue ::Rex::ConnectionRefused
6361
vprint_error('Connection refused')
6462
report_host(host: rhost)
@@ -67,5 +65,7 @@ def run_host(_target_host)
6765
report_host(host: rhost)
6866
rescue ::Interrupt
6967
raise $ERROR_INFO
68+
ensure
69+
disconnect
7070
end
7171
end

0 commit comments

Comments
 (0)