1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-21 15:48:08 +00:00

Add support for hash comparison checks to allow slight inaccuracies if so selected in the kernel

This commit is contained in:
jsteube 2023-11-23 15:19:02 +00:00
parent f8bd133373
commit 9d1bbd8472
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
for (int digest_pos = 0; digest_pos < DIGESTS_CNT; digest_pos++)
{
const u32 final_hash_pos = DIGESTS_OFFSET_HOST + digest_pos;
const digest_t *digest = digests_buf + final_hash_pos;
const int invalid_bits = count_bits_32 (digest->digest_buf[0], r0)
+ count_bits_32 (digest->digest_buf[1], r1)
+ count_bits_32 (digest->digest_buf[2], r2)
+ count_bits_32 (digest->digest_buf[3], r3);
if (invalid_bits > invalid_bits_accept) continue;
if (hc_atomic_inc (&hashes_shown[final_hash_pos]) == 0)
{
mark_hash (plains_buf, d_return_buf, SALT_POS_HOST, DIGESTS_CNT, digest_pos, final_hash_pos, gid, il_pos, 0, 0);
}
}

View File