Skip to content

Commit dacc4bb

Browse files
committed
ftp_version: Use FTP mixin
1 parent 9070a81 commit dacc4bb

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

modules/auxiliary/scanner/ftp/ftp_version.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
class MetasploitModule < Msf::Auxiliary
77
include Msf::Exploit::Remote::Ftp
88
include Msf::Auxiliary::Scanner
9-
include Msf::Auxiliary::Report
109

1110
def initialize
1211
super(
@@ -38,10 +37,10 @@ def initialize
3837
def run_host(_target_host)
3938
connect(true, false)
4039

41-
if (banner)
42-
banner_sanitized = Rex::Text.to_hex_ascii(banner.to_s)
43-
print_good("FTP Banner: '#{banner_sanitized}'")
44-
report_service(host: rhost, port: rport, name: 'ftp', info: banner_sanitized)
40+
if banner
41+
print_good("FTP Banner: #{Rex::Text.to_hex_ascii(banner_version)}")
42+
else
43+
print_warning('No FTP banner received')
4544
end
4645
rescue ::Interrupt
4746
raise $ERROR_INFO

0 commit comments

Comments
 (0)