Get rid of hash_mode in hlfmt.c
This commit is contained in:
+5
-6
@@ -129,18 +129,18 @@ static void hlfmt_hash_pwdump (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *li
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hashconfig->hash_mode == 1000)
|
||||
if (hashconfig->hlfmt_pwdump_column == HLFMT_PWDUMP_COLUMN_LM)
|
||||
{
|
||||
if (sep_cnt == 3)
|
||||
if (sep_cnt == 2)
|
||||
{
|
||||
if (pos == NULL) pos = line_buf + i;
|
||||
|
||||
len++;
|
||||
}
|
||||
}
|
||||
else if (hashconfig->hash_mode == 3000)
|
||||
else if (hashconfig->hlfmt_pwdump_column == HLFMT_PWDUMP_COLUMN_NTLM)
|
||||
{
|
||||
if (sep_cnt == 2)
|
||||
if (sep_cnt == 3)
|
||||
{
|
||||
if (pos == NULL) pos = line_buf + i;
|
||||
|
||||
@@ -339,8 +339,7 @@ u32 hlfmt_detect (hashcat_ctx_t *hashcat_ctx, FILE *fp, u32 max_check)
|
||||
|
||||
// Exception: those formats are wrongly detected as HLFMT_SHADOW, prevent it
|
||||
|
||||
if (hashconfig->hash_mode == 5300) return HLFMT_HASHCAT;
|
||||
if (hashconfig->hash_mode == 5400) return HLFMT_HASHCAT;
|
||||
if (hashconfig->hlfmt_disable == true) return HLFMT_HASHCAT;
|
||||
|
||||
u32 *formats_cnt = (u32 *) hccalloc (HLFMTS_CNT, sizeof (u32));
|
||||
|
||||
|
||||
@@ -871,6 +871,8 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
||||
hashconfig->hash_name = default_hash_name (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hash_mode = default_hash_mode (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hash_type = default_hash_type (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hlfmt_disable = default_hlfmt_disable (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hlfmt_pwdump_column = default_hlfmt_pwdump_column (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hook_salt_size = default_hook_salt_size (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hook_size = default_hook_size (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->kern_type = default_kern_type (hashconfig, user_options, user_options_extra);
|
||||
@@ -900,6 +902,8 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
||||
if (module_ctx->module_hash_name) hashconfig->hash_name = module_ctx->module_hash_name (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hash_mode) hashconfig->hash_mode = module_ctx->module_hash_mode (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hash_type) hashconfig->hash_type = module_ctx->module_hash_type (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hlfmt_disable) hashconfig->hlfmt_disable = module_ctx->module_hlfmt_disable (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hlfmt_pwdump_column) hashconfig->hlfmt_pwdump_column = module_ctx->module_hlfmt_pwdump_column (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hook_salt_size) hashconfig->hook_salt_size = module_ctx->module_hook_salt_size (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hook_size) hashconfig->hook_size = module_ctx->module_hook_size (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_kern_type) hashconfig->kern_type = module_ctx->module_kern_type (hashconfig, user_options, user_options_extra);
|
||||
@@ -1908,6 +1912,20 @@ bool default_warmup_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_
|
||||
return warmup_disable;
|
||||
}
|
||||
|
||||
bool default_hlfmt_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const bool hlfmt_disable = false;
|
||||
|
||||
return hlfmt_disable;
|
||||
}
|
||||
|
||||
u32 default_hlfmt_pwdump_column (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const u32 hlfmt_pwdump_column = HLFMT_PWDUMP_COLUMN_NONE;
|
||||
|
||||
return hlfmt_pwdump_column;
|
||||
}
|
||||
|
||||
// migrate
|
||||
|
||||
void seven_zip_hook_func (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt)
|
||||
|
||||
@@ -28154,3 +28154,15 @@ bool default_dictstat_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool default_hlfmt_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
|
||||
switch (hashconfig->hash_mode)
|
||||
{
|
||||
case 5300: return true;
|
||||
case 5400: return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user