Minor reporting patch

This commit is contained in:
Miroslav Stampar 2015-08-23 20:27:01 +02:00
parent b8f2c2bf8e
commit fef8f20565

View File

@ -668,8 +668,9 @@ def dictionaryAttack(attack_dict):
hash_regexes = []
results = []
resumes = []
processException = False
user_hash = []
processException = False
foundHash = False
for (_, hashes) in attack_dict.items():
for hash_ in hashes:
@ -693,6 +694,7 @@ def dictionaryAttack(attack_dict):
if not hash_:
continue
foundHash = True
hash_ = hash_.split()[0] if hash_ and hash_.strip() else hash_
if re.match(hash_regex, hash_):
@ -955,9 +957,8 @@ def dictionaryAttack(attack_dict):
results.extend(resumes)
if len(hash_regexes) == 0:
warnMsg = "unknown hash format. "
warnMsg += "Please report by e-mail to 'dev@sqlmap.org'"
if foundHash and len(hash_regexes) == 0:
warnMsg = "unknown hash format"
logger.warn(warnMsg)
if len(results) == 0: