diff --git a/name_that_hash/hashes.py b/name_that_hash/hashes.py index 7d797f8..60d1fe9 100644 --- a/name_that_hash/hashes.py +++ b/name_that_hash/hashes.py @@ -747,6 +747,18 @@ class HashInfo: HashInfo(name="bcrypt", hashcat=3200, john="bcrypt", extended=False), ], ), + Prototype( + regex=re.compile(r"^\$y\$[.\/A-Za-z0-9]+\$[.\/a-zA-Z0-9]+\$[.\/A-Za-z0-9]{43}$", re.IGNORECASE), + modes=[ + HashInfo( + name="yescrypt", + hashcat="Not yet supported, see notes in summary.", + john="On systems that use libxcrypt, you may use --format=crypt to use JtR in passthrough mode which uses the system's crypt function.", + extended=False, + description="Can be used in Linux Shadow Files in modern Linux distributions like Ubuntu 22.04, Debian 11, Fedora 35. On hashcat this is not yet implemented, please vote (👍 \"thumbs up\") on this issue: https://github.com/hashcat/hashcat/issues/2816." + ) + ], + ), Prototype( regex=re.compile(r"^[a-f0-9]{40}:[a-f0-9]{16}$", re.IGNORECASE), modes=[HashInfo(name="Android PIN", hashcat=5800, john=None, extended=False)], diff --git a/tests/test_main.py b/tests/test_main.py index 5dbdf02..7915572 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -372,3 +372,12 @@ def test_argon2d(): x = runner.api_return_hashes_as_json(hashes) assert "Argon2d" in x + + +def test_yescrypt(): + hashes = [ + "$y$j9T$.9s2wZRY3hcP/udKIFher1$sIBIYsiMmFlXhKOO4ZDJDXo54byuq7a4xAD0k9jw2m4" + ] + + x = runner.api_return_hashes_as_json(hashes) + assert "yescrypt" in x