Skip to content

Commit 6b033fb

Browse files
committed
Only store the password when there's one
1 parent 212179b commit 6b033fb

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

modules/auxiliary/scanner/telnet/lantronix_telnet_password.rb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,18 @@ def run_host(ip)
6969

7070
if password
7171
if password == "\x00\x00\x00\x00"
72-
password = "(not used, or secure)"
73-
end
72+
print_status("#{rhost} - Password isn't used, or secure")
73+
else
74+
print_good("#{rhost} - Telnet password found: #{password.to_s}")
7475

75-
print_good("#{rhost} - Telnet password found: #{password.to_s}")
76-
report_auth_info({
77-
:host => rhost,
78-
:port => 9999,
79-
:sname => 'telnet',
80-
:duplicate_ok => false,
81-
:pass => password,
82-
})
76+
report_auth_info({
77+
:host => rhost,
78+
:port => 9999,
79+
:sname => 'telnet',
80+
:duplicate_ok => false,
81+
:pass => password.to_s
82+
})
83+
end
8384
end
8485

8586
end

0 commit comments

Comments
 (0)