From d64c0af461c027ff8d5aa1b41a08a4d48b9aeaaa Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 26 Oct 2011 14:31:00 +0000 Subject: [PATCH] minor update --- lib/core/settings.py | 2 +- lib/utils/hash.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 8870153fd..67d9ab428 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -387,7 +387,7 @@ ROTATING_CHARS = ('\\', '|', '|', '/', '-') BIGARRAY_CHUNK_LENGTH = 4096 # Only console display last n table rows -TRIM_STDOUT_DUMP_SIZE = 1024 +TRIM_STDOUT_DUMP_SIZE = 256 # Step used in ORDER BY technique used for finding the right number of columns in UNION query injections ORDER_BY_STEP = 10 diff --git a/lib/utils/hash.py b/lib/utils/hash.py index a4a609f6e..ceff89311 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -474,6 +474,7 @@ def dictionaryAttack(attack_dict): logger.info(infoMsg) for hash_regex in hash_regexes: + items = set() attack_info = [] for (user, hashes) in attack_dict.items(): @@ -497,8 +498,9 @@ def dictionaryAttack(attack_dict): elif hash_regex in (HASH.CRYPT_GENERIC): item = [(user, hash_), {'salt': hash_[0:2]}] - if item and item not in attack_info: + if item and repr(item) not in items: attack_info.append(item) + items.add(repr(item)) if not attack_info: continue