katana.units.crack.md5 — Crack MD5 Hash

Attempt to crack an MD5 hash.

This unit finds potential MD5 hashes matching the defined regular expression:

MD5_PATTERN = re.compile(rb"[a-fA-F0-9]{32}", re.DOTALL | re.MULTILINE)

This unit cracks the MD5 hash by using a supplied password or dictionary file. Currently it does not support reaching out to an online cracker, though this would be ideal.

class katana.units.crack.md5.Unit(*args, **kwargs)

Bases: katana.unit.Unit

GROUPS = ['crack', 'bruteforce']
NO_RECURSE = True
PRIORITY = 75
enumerate() → Generator[Any, None, None]

Yield unit cases. This will read in the supplied password or a given dictionary file to generate new MD5 hashes and test them against the supplied MD5 hash target.

Returns:Generator of target cases, in this case a byte string.
evaluate(case: Any) → None

Evaluate the target. This will take the current case supplied by the enumerate function, generate an MD5 hash with it and compare it to the supplied target. If it is a match, we have successfully cracked the hash and that case value is registered as new data.

Parameters:case – A case returned by enumerate
Returns:None. This function should not return any data.