fix for a bug reported by nightman (TypeError: unsupported operand type(s) for +: 'NoneType' and 'str')

This commit is contained in:
Miroslav Stampar 2011-04-18 10:16:38 +00:00
parent 6fab44d635
commit b5aef9bcf9

View File

@ -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