File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ class Credential
12
12
# @return [Boolean] Whether BOTH a public and private are required
13
13
# (defaults to `true`)
14
14
attr_accessor :paired
15
+ # @!attribute parent
16
+ # @return [Object] the parent object that had .to_credential called on it to create this object
17
+ attr_accessor :parent
15
18
# @!attribute private
16
19
# The private credential component (e.g. username)
17
20
#
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ def each_credential
83
83
# This could be a Credential object, or a Credential Core, or an Attempt object
84
84
# so make sure that whatever it is, we end up with a Credential.
85
85
credential = raw_cred . to_credential
86
+ credential . parent = raw_cred
86
87
87
88
if credential . realm . present? && self . class ::REALM_KEY . present?
88
89
credential . realm_key = self . class ::REALM_KEY
@@ -129,7 +130,14 @@ def scan!
129
130
successful_users = Set . new
130
131
131
132
each_credential do |credential |
132
- next if successful_users . include? ( credential . public )
133
+ # For Pro bruteforce Reuse and Guess we need to note that we skipped an attempt.
134
+ if successful_users . include? ( credential . public )
135
+ if credential . parent . respond_to? ( :skipped )
136
+ credential . parent . skipped = true
137
+ credential . parent . save!
138
+ end
139
+ next
140
+ end
133
141
134
142
result = attempt_login ( credential )
135
143
result . freeze
You can’t perform that action at this time.
0 commit comments