Skip to content

Commit e30ab85

Browse files
committed
Fix some outputting issues
1 parent 872a24b commit e30ab85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/auxiliary/scanner/smb/smb_login.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ def try_user_pass(domain, user, pass)
189189

190190
user = user.to_s.gsub(/<BLANK>/i,"")
191191
status = check_login_status(domain, user, pass)
192-
output_message = "#{smbhost} - %s (#{smb_peer_os}) #{user} : #{pass} [#{status}]"
192+
193+
if domain.empty? || domain == "."
194+
output_message = "#{rhost}:#{rport} - %s (#{smb_peer_os}) #{user} : #{pass} [#{status}]"
195+
else
196+
output_message = "#{rhost}:#{rport}|#{domain} - %s (#{smb_peer_os}) #{user} : #{pass} [#{status}]"
197+
end
193198

194199
case status
195200
when 'STATUS_SUCCESS'

0 commit comments

Comments
 (0)