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