Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d64c0af commit 9d31230Copy full SHA for 9d31230
1 file changed
lib/utils/hash.py
@@ -474,7 +474,7 @@ def dictionaryAttack(attack_dict):
474
logger.info(infoMsg)
475
476
for hash_regex in hash_regexes:
477
- items = set()
+ keys = set()
478
attack_info = []
479
480
for (user, hashes) in attack_dict.items():
@@ -498,9 +498,10 @@ def dictionaryAttack(attack_dict):
498
elif hash_regex in (HASH.CRYPT_GENERIC):
499
item = [(user, hash_), {'salt': hash_[0:2]}]
500
501
- if item and repr(item) not in items:
+ key = hash(repr(item))
502
+ if item and key not in keys:
503
attack_info.append(item)
- items.add(repr(item))
504
+ keys.add(key)
505
506
if not attack_info:
507
continue
0 commit comments