1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-22 20:42:07 +00:00

Fix the evil :password bug, where the hash itself wasn't printed

This commit is contained in:
Jens Steube 2016-11-20 00:03:29 +01:00
parent 0c55626689
commit acf13c5544

View File

@ -152,6 +152,9 @@ int save_hash (hashcat_ctx_t *hashcat_ctx)
return -1;
}
u8 *out_buf = (u8 *) hcmalloc (hashcat_ctx, HCBUFSIZ_LARGE); VERIFY_PTR (out_buf);
for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
{
if (hashes->salts_shown[salt_pos] == 1) continue;
@ -192,8 +195,6 @@ int save_hash (hashcat_ctx_t *hashcat_ctx)
fputc (separator, fp);
}
u8 *out_buf = hashes->out_buf;
out_buf[0] = 0;
ascii_digest (hashcat_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_pos, digest_pos);
@ -203,6 +204,8 @@ int save_hash (hashcat_ctx_t *hashcat_ctx)
}
}
hcfree (out_buf);
fflush (fp);
fclose (fp);