Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fef8f20

Browse files
committed
Minor reporting patch
1 parent b8f2c2b commit fef8f20

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/utils/hash.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,9 @@ def dictionaryAttack(attack_dict):
668668
hash_regexes = []
669669
results = []
670670
resumes = []
671-
processException = False
672671
user_hash = []
672+
processException = False
673+
foundHash = False
673674

674675
for (_, hashes) in attack_dict.items():
675676
for hash_ in hashes:
@@ -693,6 +694,7 @@ def dictionaryAttack(attack_dict):
693694
if not hash_:
694695
continue
695696

697+
foundHash = True
696698
hash_ = hash_.split()[0] if hash_ and hash_.strip() else hash_
697699

698700
if re.match(hash_regex, hash_):
@@ -955,9 +957,8 @@ class Value():
955957

956958
results.extend(resumes)
957959

958-
if len(hash_regexes) == 0:
959-
warnMsg = "unknown hash format. "
960-
warnMsg += "Please report by e-mail to '[email protected]'"
960+
if foundHash and len(hash_regexes) == 0:
961+
warnMsg = "unknown hash format"
961962
logger.warn(warnMsg)
962963

963964
if len(results) == 0:

0 commit comments

Comments
 (0)