Skip to content

Commit fdbfaac

Browse files
committed
Land rapid7#3313, progress feedback for PASS_FILE
[FixRM rapid7#8704]
2 parents 1ada483 + a71be33 commit fdbfaac

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/msf/core/auxiliary/auth_brute.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ def combine_users_and_passwords(user_array,pass_array)
330330
end
331331

332332
creds = [ [], [], [], [] ] # userpass, pass, user, rest
333+
remaining_pairs = combined_array.length # counter for our occasional output
334+
interval = 60 # seconds between each remaining pair message reported to user
335+
next_message_time = Time.now + interval # initial timing interval for user message
333336
# Move datastore['USERNAME'] and datastore['PASSWORD'] to the front of the list.
334337
# Note that we cannot tell the user intention if USERNAME or PASSWORD is blank --
335338
# maybe (and it's often) they wanted a blank. One more credential won't kill
@@ -344,6 +347,14 @@ def combine_users_and_passwords(user_array,pass_array)
344347
else
345348
creds[3] << pair
346349
end
350+
if Time.now > next_message_time
351+
print_brute(
352+
:level => :vstatus,
353+
:msg => "Pair list is still building with #{remaining_pairs} pairs left to process"
354+
)
355+
next_message_time = Time.now + interval
356+
end
357+
remaining_pairs -= 1
347358
end
348359
return creds[0] + creds[1] + creds[2] + creds[3]
349360
end

0 commit comments

Comments
 (0)