Skip to content

Commit 3396afb

Browse files
committed
Add IP and port (peer) to print_brute messages
1 parent 39e5980 commit 3396afb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/auxiliary/scanner/ssh/ssh_login.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,19 @@ def run_host(ip)
131131
)
132132
case result.status
133133
when Metasploit::Model::Login::Status::SUCCESSFUL
134-
print_brute :level => :good, :ip => ip, :msg => "Success: '#{result.credential}' '#{result.proof.to_s.gsub(/[\r\n\e\b\a]/, ' ')}'"
134+
print_brute :level => :good, :ip => ip, :msg => "#{ip}:#{rport} - Success: '#{result.credential}' '#{result.proof.to_s.gsub(/[\r\n\e\b\a]/, ' ')}'"
135135
credential_core = create_credential(credential_data)
136136
credential_data[:core] = credential_core
137137
create_credential_login(credential_data)
138138
session_setup(result, scanner.ssh_socket)
139139
:next_user
140140
when Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
141-
vprint_brute :level => :verror, :ip => ip, :msg => "Could not connect: #{result.proof}"
141+
vprint_brute :level => :verror, :ip => ip, :msg => "#{ip}:#{rport} - Could not connect: #{result.proof}"
142142
scanner.ssh_socket.close if scanner.ssh_socket && !scanner.ssh_socket.closed?
143143
invalidate_login(credential_data)
144144
:abort
145145
when Metasploit::Model::Login::Status::INCORRECT
146-
vprint_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
146+
vprint_brute :level => :verror, :ip => ip, :msg => "#{ip}:#{rport} - Failed: '#{result.credential}'"
147147
invalidate_login(credential_data)
148148
scanner.ssh_socket.close if scanner.ssh_socket && !scanner.ssh_socket.closed?
149149
else

0 commit comments

Comments
 (0)