Land #7214, print_brute ip:rport fix

This commit is contained in:
William Vu 2016-08-17 22:48:40 -05:00
commit bc9a402d9e
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
2 changed files with 11 additions and 2 deletions

View File

@ -594,7 +594,12 @@ module Auxiliary::AuthBrute
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?
complete_message = ''
complete_message << (old_msg.match(msg_regex)[4] || proto).to_s
unless ip.blank? && port.blank?
complete_message << "#{ip}:#{rport}"
else
complete_message << (old_msg.match(msg_regex)[4] || proto).to_s
end
complete_message << " - "
progress = tried_over_total(ip,port)
complete_message << progress if progress

View File

@ -128,7 +128,11 @@ class MetasploitModule < Msf::Auxiliary
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
else
invalidate_login(credential_data)
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
if 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