minor update

This commit is contained in:
Miroslav Stampar 2011-10-26 21:56:26 +00:00
parent d64c0af461
commit 9d31230d5e

View File

@ -474,7 +474,7 @@ def dictionaryAttack(attack_dict):
logger.info(infoMsg) logger.info(infoMsg)
for hash_regex in hash_regexes: for hash_regex in hash_regexes:
items = set() keys = set()
attack_info = [] attack_info = []
for (user, hashes) in attack_dict.items(): for (user, hashes) in attack_dict.items():
@ -498,9 +498,10 @@ def dictionaryAttack(attack_dict):
elif hash_regex in (HASH.CRYPT_GENERIC): elif hash_regex in (HASH.CRYPT_GENERIC):
item = [(user, hash_), {'salt': hash_[0:2]}] item = [(user, hash_), {'salt': hash_[0:2]}]
if item and repr(item) not in items: key = hash(repr(item))
if item and key not in keys:
attack_info.append(item) attack_info.append(item)
items.add(repr(item)) keys.add(key)
if not attack_info: if not attack_info:
continue continue