Skip to content

Commit 0d7b587

Browse files
committed
Avoid printing rhost:rport from AuthBrute
When AuthBurte is mixed with other modules using the TCP mixin, rhost:rport is printed twice. This info should come from the protocol level mixin.
1 parent f0bb125 commit 0d7b587

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/msf/core/auxiliary/auth_brute.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,7 @@ def build_brute_message(host_ip,host_port,proto,msg,legacy)
593593
old_msg = msg.to_s.strip
594594
msg_regex = /(#{ip})(:#{port})?(\s*-?\s*)(#{proto.to_s})?(\s*-?\s*)(.*)/ni
595595
if old_msg.match(msg_regex) and !old_msg.match(msg_regex)[6].to_s.strip.empty?
596-
complete_message = [ip,port].join(":")
597-
(complete_message << " ") if ip
596+
complete_message = ''
598597
complete_message << (old_msg.match(msg_regex)[4] || proto).to_s
599598
complete_message << " - "
600599
progress = tried_over_total(ip,port)
@@ -604,8 +603,7 @@ def build_brute_message(host_ip,host_port,proto,msg,legacy)
604603
complete_message = msg.to_s.strip
605604
end
606605
else
607-
complete_message = [ip,port].join(":")
608-
(complete_message << " ") if ip
606+
complete_message = ''
609607
complete_message << "#{proto.to_s.strip} - " if proto
610608
progress = tried_over_total(ip,port)
611609
complete_message << progress if progress

0 commit comments

Comments
 (0)