|
|
|
@ -2263,14 +2263,18 @@ int hashes_init_zerohash (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
module_ctx->module_hash_decode_zero_hash (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info);
|
|
|
|
|
|
|
|
|
|
hash_t *found = (hash_t *) hc_bsearch_r (&hash_buf, hashes_buf, hashes_cnt, sizeof (hash_t), sort_by_hash_no_salt, (void *) hashconfig);
|
|
|
|
|
for (u32 i = 0; i < hashes_cnt; i++)
|
|
|
|
|
{
|
|
|
|
|
hash_t *next = &hashes_buf[i];
|
|
|
|
|
|
|
|
|
|
int rc = sort_by_hash_no_salt (&hash_buf, next, (void *) hashconfig);
|
|
|
|
|
|
|
|
|
|
if (found != NULL)
|
|
|
|
|
if (rc == 0)
|
|
|
|
|
{
|
|
|
|
|
found->pw_buf = (char *) hcmalloc (1);
|
|
|
|
|
found->pw_len = 0;
|
|
|
|
|
next->pw_buf = (char *) hcmalloc (1);
|
|
|
|
|
next->pw_len = 0;
|
|
|
|
|
|
|
|
|
|
found->cracked = 1;
|
|
|
|
|
next->cracked = 1;
|
|
|
|
|
|
|
|
|
|
// should we show the cracked zero hash to the user?
|
|
|
|
|
|
|
|
|
@ -2278,7 +2282,7 @@ int hashes_init_zerohash (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
// digest pos
|
|
|
|
|
|
|
|
|
|
const u32 digest_pos = found - hashes_buf;
|
|
|
|
|
const u32 digest_pos = next - hashes_buf;
|
|
|
|
|
|
|
|
|
|
// show the crack
|
|
|
|
|
|
|
|
|
@ -2310,6 +2314,7 @@ int hashes_init_zerohash (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
hcfree (out_buf);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hashconfig->esalt_size > 0)
|
|
|
|
|
{
|
|
|
|
|