added an unless to wrap around the print and report_creds func for nas module to only execute if ftpuser and ftppass is non-blank
parent
16d7b2e6ff
commit
ff3a554b4d
|
@ -167,17 +167,19 @@ class Metasploit3 < Msf::Auxiliary
|
|||
if /[\x00]{16,}(?<ftpuser>[[:print:]]+)[\x00]{16,}(?<ftppass>[[:print:]]+)/ =~ data
|
||||
ftpuser.strip!
|
||||
ftppass.strip!
|
||||
print_good("#{peer} -- NAS Server: #{server}")
|
||||
print_good("#{peer} -- NAS Port: #{port}")
|
||||
print_good("#{peer} -- FTP User: #{ftpuser}") unless ftpuser.blank?
|
||||
print_good("#{peer} -- FTP Pass: #{ftppass}") unless ftppass.blank?
|
||||
report_creds(
|
||||
host: server,
|
||||
port: port,
|
||||
user: ftpuser,
|
||||
pass: ftppass,
|
||||
type: "FTP",
|
||||
active: true)
|
||||
unless ftpuser.blank? || ftppass.blank?
|
||||
print_good("#{peer} -- NAS Server: #{server}")
|
||||
print_good("#{peer} -- NAS Port: #{port}")
|
||||
print_good("#{peer} -- FTP User: #{ftpuser}")
|
||||
print_good("#{peer} -- FTP Pass: #{ftppass}")
|
||||
report_creds(
|
||||
host: server,
|
||||
port: port,
|
||||
user: ftpuser,
|
||||
pass: ftppass,
|
||||
type: "FTP",
|
||||
active: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue