Land #7214, print_brute ip:rport fix
This commit is contained in:
commit
bc9a402d9e
|
@ -594,7 +594,12 @@ module Auxiliary::AuthBrute
|
||||||
msg_regex = /(#{ip})(:#{port})?(\s*-?\s*)(#{proto.to_s})?(\s*-?\s*)(.*)/ni
|
msg_regex = /(#{ip})(:#{port})?(\s*-?\s*)(#{proto.to_s})?(\s*-?\s*)(.*)/ni
|
||||||
if old_msg.match(msg_regex) and !old_msg.match(msg_regex)[6].to_s.strip.empty?
|
if old_msg.match(msg_regex) and !old_msg.match(msg_regex)[6].to_s.strip.empty?
|
||||||
complete_message = ''
|
complete_message = ''
|
||||||
|
unless ip.blank? && port.blank?
|
||||||
|
complete_message << "#{ip}:#{rport}"
|
||||||
|
else
|
||||||
complete_message << (old_msg.match(msg_regex)[4] || proto).to_s
|
complete_message << (old_msg.match(msg_regex)[4] || proto).to_s
|
||||||
|
end
|
||||||
|
|
||||||
complete_message << " - "
|
complete_message << " - "
|
||||||
progress = tried_over_total(ip,port)
|
progress = tried_over_total(ip,port)
|
||||||
complete_message << progress if progress
|
complete_message << progress if progress
|
||||||
|
|
|
@ -128,7 +128,11 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
|
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
|
||||||
else
|
else
|
||||||
invalidate_login(credential_data)
|
invalidate_login(credential_data)
|
||||||
|
if result.proof
|
||||||
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
|
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
|
||||||
|
else
|
||||||
|
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status})"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue