Skip to content

Commit

Permalink
Merge pull request #139 from goproslowyo/yescrypt
Browse files Browse the repository at this point in the history
Add regex and test for yescrypt
  • Loading branch information
bee-san committed Oct 20, 2022
2 parents 85faf3a + 3a63a0f commit be72aa7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions name_that_hash/hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand Down
9 changes: 9 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit be72aa7

Please sign in to comment.