Fixed strategy for eliminating hashes with zero length in LM when multiple hashes contain a zero hash

pull/2999/head
Jens Steube 3 years ago
parent ee3eb21a0d
commit dbefc7e60e

@ -13,6 +13,7 @@
- Fixed division by zero because backend_ctx->hardware_power_all was not re-inserted after refactoring device_param->hardware_power
- Fixed invalid progress counter initialization in attack-mode 9 when using --skip or --restore
- Fixed out-of-boundary reads in attack-mode 9 that were caused by a missing work item limit in the refactored autotune engine
- Fixed strategy for eliminating hashes with zero length in LM when multiple hashes contain a zero hash
##
## Technical

@ -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)
{

Loading…
Cancel
Save