Minor patch

This commit is contained in:
Miroslav Štampar 2026-07-19 11:15:32 +02:00
parent 54bb3ea136
commit 384ee1a91a
3 changed files with 14 additions and 4 deletions

View file

@ -1074,9 +1074,6 @@ def hashRecognition(value):
# Hashes for Oracle and old MySQL look the same hence these checks
if isOracle and regex == HASH.MYSQL_OLD or isMySQL and regex == HASH.ORACLE_OLD:
continue
elif regex == HASH.CRYPT_GENERIC:
if any((value.lower() == value, value.upper() == value)):
continue
else:
parts.append("(?P<%s>%s)" % (name, regex))
@ -1088,6 +1085,10 @@ def hashRecognition(value):
algorithm, _ = [_ for _ in match.groupdict().items() if _[1] is not None][0]
retVal = getattr(HASH, algorithm)
# Note: greedy CRYPT_GENERIC requires a mixed-case value to reduce false positives
if retVal == HASH.CRYPT_GENERIC and any((value.lower() == value, value.upper() == value)):
retVal = None
return retVal
def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc_count, wordlists, custom_wordlist, api):