diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 64a92f104..a0c46f0c8 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -387,7 +387,9 @@ def dictionaryAttack(attack_dict): for item in attack_info: ((user, _), _) = item - kb.wordlist.append(normalizeUnicode(user)) + + if user: + kb.wordlist.append(normalizeUnicode(user)) length = len(kb.wordlist) * len(suffix_list) @@ -404,6 +406,9 @@ def dictionaryAttack(attack_dict): count += 1 + if not isinstance(word, basestring): + continue + if suffix: word = word + suffix @@ -458,6 +463,9 @@ def dictionaryAttack(attack_dict): current = __functions__[hash_regex](password = word, uppercase = False, **kwargs) count += 1 + if not isinstance(word, basestring): + continue + if suffix: word = word + suffix