mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-21 23:58:07 +00:00
Fix missing check for -j and -k before writing hashcat.dictstat2 which can lead to false negatives
This commit is contained in:
parent
7ee59e1a96
commit
734b435028
@ -18,7 +18,7 @@
|
||||
#define MAX_DICTSTAT 100000
|
||||
|
||||
#define DICTSTAT_FILENAME "hashcat.dictstat2"
|
||||
#define DICTSTAT_VERSION (0x6863646963743200 | 0x02)
|
||||
#define DICTSTAT_VERSION (0x6863646963743200 | 0x03)
|
||||
|
||||
int sort_by_dictstat (const void *s1, const void *s2);
|
||||
|
||||
|
@ -94,11 +94,15 @@ void dictstat_read (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
dictstat_ctx_t *dictstat_ctx = hashcat_ctx->dictstat_ctx;
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
if (dictstat_ctx->enabled == false) return;
|
||||
|
||||
if (hashconfig->dictstat_disable == true) return;
|
||||
|
||||
if (user_options->rule_buf_l != NULL) return;
|
||||
if (user_options->rule_buf_r != NULL) return;
|
||||
|
||||
HCFILE fp;
|
||||
|
||||
if (hc_fopen (&fp, dictstat_ctx->filename, "rb") == false)
|
||||
@ -182,11 +186,15 @@ int dictstat_write (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
dictstat_ctx_t *dictstat_ctx = hashcat_ctx->dictstat_ctx;
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
if (dictstat_ctx->enabled == false) return 0;
|
||||
|
||||
if (hashconfig->dictstat_disable == true) return 0;
|
||||
|
||||
if (user_options->rule_buf_l != NULL) return 0;
|
||||
if (user_options->rule_buf_r != NULL) return 0;
|
||||
|
||||
HCFILE fp;
|
||||
|
||||
if (hc_fopen (&fp, dictstat_ctx->filename, "wb") == false)
|
||||
|
Loading…
Reference in New Issue
Block a user