From cfc9772e0e0fcb0f3b1a69cd9ba8682c059c8237 Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 20 Dec 2018 12:59:56 +0100 Subject: [PATCH] Add module_hash_decode_zero_hash() --- include/interface.h | 88 ++++++++++++------------- include/modules.h | 83 ++++++++++++------------ include/types.h | 99 ++++++++++++++-------------- modules/module_01000.c | 90 +++++++++++++------------- src/hashes.c | 2 +- src/interface.c | 139 +++++++++++++++++++++++----------------- src/interface_migrate.c | 25 ++++++++ src/potfile.c | 52 ++++----------- 8 files changed, 301 insertions(+), 277 deletions(-) diff --git a/include/interface.h b/include/interface.h index 3b8e32cf7..82de34321 100644 --- a/include/interface.h +++ b/include/interface.h @@ -19,7 +19,6 @@ static const u32 MODULE_VERSION_MINIMUM = 520; * zero hashes shutcut */ -static const char LM_ZERO_HASH[] = "aad3b435b51404ee"; static const char LM_MASKED_PLAIN[] = "[notfound]"; /** @@ -269,48 +268,49 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const int out_size, bool initialize_keyboard_layout_mapping (hashcat_ctx_t *hashcat_ctx, const char *filename, keyboard_layout_mapping_t *keyboard_layout_mapping, int *keyboard_layout_mapping_cnt); -int hashconfig_init (hashcat_ctx_t *hashcat_ctx); -void hashconfig_destroy (hashcat_ctx_t *hashcat_ctx); -int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx); -void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, void *esalt, void *hook_salt); - -u32 default_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -void *default_benchmark_esalt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -void *default_benchmark_hook_salt (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 char *default_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -salt_t *default_benchmark_salt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool default_dictstat_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); -u32 default_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 default_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_forced_kernel_threads (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_forced_kernel_loops (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_forced_outfile_format (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 char *default_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_hash_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -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); -u64 default_hook_salt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 default_hook_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 default_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 default_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool default_outfile_check_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); -bool default_outfile_check_nocomp (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool default_potfile_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); -u32 default_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); -u32 default_pw_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_salt_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_salt_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 default_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -char default_separator (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 char *default_st_hash (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 char *default_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 default_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool default_warmup_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); +int hashconfig_init (hashcat_ctx_t *hashcat_ctx); +void hashconfig_destroy (hashcat_ctx_t *hashcat_ctx); +int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx); +void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, void *esalt, void *hook_salt); + +u32 default_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +void *default_benchmark_esalt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +void *default_benchmark_hook_salt (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 char *default_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +salt_t *default_benchmark_salt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool default_dictstat_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); +u32 default_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 default_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_forced_kernel_threads (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_forced_kernel_loops (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_forced_outfile_format (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 char *default_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_hash_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +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); +u64 default_hook_salt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 default_hook_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 default_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 default_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool default_outfile_check_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); +bool default_outfile_check_nocomp (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool default_potfile_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); +bool default_potfile_keep_all_hashes (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_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); +u32 default_pw_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_salt_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_salt_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 default_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +char default_separator (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 char *default_st_hash (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 char *default_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 default_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool default_warmup_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); #endif // _INTERFACE_H diff --git a/include/modules.h b/include/modules.h index 3139068fe..d11807a83 100644 --- a/include/modules.h +++ b/include/modules.h @@ -2,47 +2,50 @@ #ifndef _MODULES_H #define _MODULES_H -u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -void *module_benchmark_esalt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -void *module_benchmark_hook_salt (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 char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -salt_t *module_benchmark_salt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool module_dictstat_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); -u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_forced_kernel_threads (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_forced_kernel_loops (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_forced_outfile_format (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 char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_hash_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool module_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); -u64 module_hook_salt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 module_hook_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool module_outfile_check_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); -bool module_outfile_check_nocomp (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool module_potfile_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); -u32 module_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); -u32 module_pw_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_salt_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_salt_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -char module_separator (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 char *module_st_hash (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 char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); -bool module_warmup_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); +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +void *module_benchmark_esalt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +void *module_benchmark_hook_salt (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 char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +salt_t *module_benchmark_salt (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool module_dictstat_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); +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_forced_kernel_threads (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_forced_kernel_loops (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_forced_outfile_format (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 char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_hash_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool module_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); +u64 module_hook_salt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 module_hook_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool module_outfile_check_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); +bool module_outfile_check_nocomp (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool module_potfile_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); +bool module_potfile_keep_all_hashes (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_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); +u32 module_pw_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_salt_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_salt_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +char module_separator (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 char *module_st_hash (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 char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra); +bool module_warmup_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); -int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, const char *line_buf, MAYBE_UNUSED const int line_len); -int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, char *line_buf, MAYBE_UNUSED const int line_size); +int module_hash_decode_outfile (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, const char *line_buf, MAYBE_UNUSED const int line_len); +int module_hash_decode_zero_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf); +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, const char *line_buf, MAYBE_UNUSED const int line_len); +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, char *line_buf, MAYBE_UNUSED const int line_size); void hook12_func (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt); void hook23_func (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt); diff --git a/include/types.h b/include/types.h index 279aa99f4..d643c086a 100644 --- a/include/types.h +++ b/include/types.h @@ -962,6 +962,7 @@ struct hashconfig bool outfile_check_disable; bool outfile_check_nocomp; bool potfile_disable; + bool potfile_keep_all_hashes; u32 pwdump_column; }; @@ -1564,8 +1565,6 @@ typedef struct potfile_ctx { bool enabled; - bool keep_all_hashes; - FILE *fp; char *filename; @@ -2238,53 +2237,55 @@ typedef struct module_ctx void *module_handle; u32 module_version_current; - void (*module_init) (struct module_ctx *); - - u32 (*module_attack_exec) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - void *(*module_benchmark_esalt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - void *(*module_benchmark_hook_salt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - const char *(*module_benchmark_mask) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - salt_t *(*module_benchmark_salt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - bool (*module_dictstat_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_dgst_pos0) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_dgst_pos1) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_dgst_pos2) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_dgst_pos3) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_dgst_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u64 (*module_esalt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_forced_kernel_threads) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_forced_kernel_loops) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_forced_outfile_format) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - const char *(*module_hash_name) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_hash_mode) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_hash_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - bool (*module_hlfmt_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u64 (*module_hook_salt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u64 (*module_hook_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u64 (*module_kern_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_opti_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u64 (*module_opts_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - bool (*module_outfile_check_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - bool (*module_outfile_check_nocomp) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - bool (*module_potfile_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_pwdump_column) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_pw_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_pw_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_salt_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_salt_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u32 (*module_salt_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - char (*module_separator) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - const char *(*module_st_hash) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - const char *(*module_st_pass) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - u64 (*module_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - bool (*module_warmup_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); - - int (*module_hash_decode_outfile) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int); - int (*module_hash_decode) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int); - int (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, char *, int); - - void (*module_hook12) (hc_device_param_t *, const void *, const u32, const u64); - void (*module_hook23) (hc_device_param_t *, const void *, const u32, const u64); + void (*module_init) (struct module_ctx *); + + u32 (*module_attack_exec) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + void *(*module_benchmark_esalt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + void *(*module_benchmark_hook_salt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + const char *(*module_benchmark_mask) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + salt_t *(*module_benchmark_salt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_dictstat_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_dgst_pos0) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_dgst_pos1) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_dgst_pos2) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_dgst_pos3) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_dgst_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u64 (*module_esalt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_forced_kernel_threads) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_forced_kernel_loops) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_forced_outfile_format) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + const char *(*module_hash_name) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_hash_mode) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_hash_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_hlfmt_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u64 (*module_hook_salt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u64 (*module_hook_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u64 (*module_kern_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_opti_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u64 (*module_opts_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_outfile_check_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_outfile_check_nocomp) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_potfile_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_potfile_keep_all_hashes) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_pwdump_column) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_pw_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_pw_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_salt_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_salt_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u32 (*module_salt_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + char (*module_separator) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + const char *(*module_st_hash) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + const char *(*module_st_pass) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + u64 (*module_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + bool (*module_warmup_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *); + + int (*module_hash_decode_outfile) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int); + int (*module_hash_decode_zero_hash) (const hashconfig_t *, void *, salt_t *, void *); + int (*module_hash_decode) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int); + int (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, char *, int); + + void (*module_hook12) (hc_device_param_t *, const void *, const u32, const u64); + void (*module_hook23) (hc_device_param_t *, const void *, const u32, const u64); } module_ctx_t; diff --git a/modules/module_01000.c b/modules/module_01000.c index 2c6d41b0e..3a8a68aff 100644 --- a/modules/module_01000.c +++ b/modules/module_01000.c @@ -116,48 +116,50 @@ void module_init (module_ctx_t *module_ctx) { // undefined functions automatically call corresponding default functions - module_ctx->module_attack_exec = module_attack_exec; - module_ctx->module_benchmark_esalt = NULL; - module_ctx->module_benchmark_hook_salt = NULL; - module_ctx->module_benchmark_mask = NULL; - module_ctx->module_benchmark_salt = NULL; - module_ctx->module_dgst_pos0 = module_dgst_pos0; - module_ctx->module_dgst_pos1 = module_dgst_pos1; - module_ctx->module_dgst_pos2 = module_dgst_pos2; - module_ctx->module_dgst_pos3 = module_dgst_pos3; - module_ctx->module_dgst_size = module_dgst_size; - module_ctx->module_dictstat_disable = NULL; - module_ctx->module_esalt_size = NULL; - module_ctx->module_forced_kernel_loops = NULL; - module_ctx->module_forced_kernel_threads = NULL; - module_ctx->module_forced_outfile_format = NULL; - module_ctx->module_hash_decode_outfile = NULL; - module_ctx->module_hash_decode = module_hash_decode; - module_ctx->module_hash_encode = module_hash_encode; - module_ctx->module_hash_mode = NULL; - module_ctx->module_hash_name = module_hash_name; - module_ctx->module_hash_type = module_hash_type; - module_ctx->module_hlfmt_disable = NULL; - module_ctx->module_hook12 = NULL; - module_ctx->module_hook23 = NULL; - module_ctx->module_hook_salt_size = NULL; - module_ctx->module_hook_size = NULL; - module_ctx->module_kern_type = module_kern_type; - module_ctx->module_opti_type = module_opti_type; - module_ctx->module_opts_type = module_opts_type; - module_ctx->module_outfile_check_disable = NULL; - module_ctx->module_outfile_check_nocomp = NULL; - module_ctx->module_potfile_disable = NULL; - module_ctx->module_pwdump_column = module_pwdump_column; - module_ctx->module_pw_max = NULL; - module_ctx->module_pw_min = NULL; - module_ctx->module_salt_max = NULL; - module_ctx->module_salt_min = NULL; - module_ctx->module_salt_type = NULL; - module_ctx->module_separator = NULL; - module_ctx->module_st_hash = module_st_hash; - module_ctx->module_st_pass = NULL; - module_ctx->module_tmp_size = NULL; - module_ctx->module_version_current = MODULE_VERSION_CURRENT; - module_ctx->module_warmup_disable = NULL; + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = NULL; + module_ctx->module_benchmark_hook_salt = NULL; + module_ctx->module_benchmark_mask = NULL; + module_ctx->module_benchmark_salt = NULL; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = NULL; + module_ctx->module_esalt_size = NULL; + module_ctx->module_forced_kernel_loops = NULL; + module_ctx->module_forced_kernel_threads = NULL; + module_ctx->module_forced_outfile_format = NULL; + module_ctx->module_hash_decode_outfile = NULL; + module_ctx->module_hash_decode_zero_hash = NULL; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_mode = NULL; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hash_type = module_hash_type; + module_ctx->module_hlfmt_disable = NULL; + module_ctx->module_hook12 = NULL; + module_ctx->module_hook23 = NULL; + module_ctx->module_hook_salt_size = NULL; + module_ctx->module_hook_size = NULL; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = NULL; + module_ctx->module_outfile_check_nocomp = NULL; + module_ctx->module_potfile_disable = NULL; + module_ctx->module_potfile_keep_all_hashes = NULL; + module_ctx->module_pwdump_column = module_pwdump_column; + module_ctx->module_pw_max = NULL; + module_ctx->module_pw_min = NULL; + module_ctx->module_salt_max = NULL; + module_ctx->module_salt_min = NULL; + module_ctx->module_salt_type = NULL; + module_ctx->module_separator = NULL; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = NULL; + module_ctx->module_tmp_size = NULL; + module_ctx->module_version_current = MODULE_VERSION_CURRENT; + module_ctx->module_warmup_disable = NULL; } diff --git a/src/hashes.c b/src/hashes.c index b5b050cec..d073c8f95 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -1346,7 +1346,7 @@ int hashes_init_stage2 (hashcat_ctx_t *hashcat_ctx) for (u32 hashes_pos = 1; hashes_pos < hashes_cnt; hashes_pos++) { - if (potfile_ctx->keep_all_hashes == true) + if (hashconfig->potfile_keep_all_hashes == true) { // do not sort, because we need to keep all hashes in this particular case } diff --git a/src/interface.c b/src/interface.c index 6d9d6edda..86d95d55e 100644 --- a/src/interface.c +++ b/src/interface.c @@ -670,36 +670,37 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) // set some boring defaults - hashconfig->attack_exec = default_attack_exec (hashconfig, user_options, user_options_extra); - hashconfig->dictstat_disable = default_dictstat_disable (hashconfig, user_options, user_options_extra); - hashconfig->dgst_pos0 = default_dgst_pos0 (hashconfig, user_options, user_options_extra); - hashconfig->dgst_pos1 = default_dgst_pos1 (hashconfig, user_options, user_options_extra); - hashconfig->dgst_pos2 = default_dgst_pos2 (hashconfig, user_options, user_options_extra); - hashconfig->dgst_pos3 = default_dgst_pos3 (hashconfig, user_options, user_options_extra); - hashconfig->dgst_size = default_dgst_size (hashconfig, user_options, user_options_extra); - hashconfig->esalt_size = default_esalt_size (hashconfig, user_options, user_options_extra); - hashconfig->forced_kernel_threads = default_forced_kernel_threads (hashconfig, user_options, user_options_extra); - hashconfig->forced_kernel_loops = default_forced_kernel_loops (hashconfig, user_options, user_options_extra); - hashconfig->forced_outfile_format = default_forced_outfile_format (hashconfig, user_options, user_options_extra); - 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->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); - hashconfig->opti_type = default_opti_type (hashconfig, user_options, user_options_extra); - hashconfig->opts_type = default_opts_type (hashconfig, user_options, user_options_extra); - hashconfig->outfile_check_disable = default_outfile_check_disable (hashconfig, user_options, user_options_extra); - hashconfig->outfile_check_nocomp = default_outfile_check_nocomp (hashconfig, user_options, user_options_extra); - hashconfig->potfile_disable = default_potfile_disable (hashconfig, user_options, user_options_extra); - hashconfig->pwdump_column = default_pwdump_column (hashconfig, user_options, user_options_extra); - hashconfig->salt_type = default_salt_type (hashconfig, user_options, user_options_extra); - hashconfig->separator = default_separator (hashconfig, user_options, user_options_extra); - hashconfig->st_hash = default_st_hash (hashconfig, user_options, user_options_extra); - hashconfig->st_pass = default_st_pass (hashconfig, user_options, user_options_extra); - hashconfig->tmp_size = default_tmp_size (hashconfig, user_options, user_options_extra); - hashconfig->warmup_disable = default_warmup_disable (hashconfig, user_options, user_options_extra); + hashconfig->attack_exec = default_attack_exec (hashconfig, user_options, user_options_extra); + hashconfig->dictstat_disable = default_dictstat_disable (hashconfig, user_options, user_options_extra); + hashconfig->dgst_pos0 = default_dgst_pos0 (hashconfig, user_options, user_options_extra); + hashconfig->dgst_pos1 = default_dgst_pos1 (hashconfig, user_options, user_options_extra); + hashconfig->dgst_pos2 = default_dgst_pos2 (hashconfig, user_options, user_options_extra); + hashconfig->dgst_pos3 = default_dgst_pos3 (hashconfig, user_options, user_options_extra); + hashconfig->dgst_size = default_dgst_size (hashconfig, user_options, user_options_extra); + hashconfig->esalt_size = default_esalt_size (hashconfig, user_options, user_options_extra); + hashconfig->forced_kernel_threads = default_forced_kernel_threads (hashconfig, user_options, user_options_extra); + hashconfig->forced_kernel_loops = default_forced_kernel_loops (hashconfig, user_options, user_options_extra); + hashconfig->forced_outfile_format = default_forced_outfile_format (hashconfig, user_options, user_options_extra); + 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->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); + hashconfig->opti_type = default_opti_type (hashconfig, user_options, user_options_extra); + hashconfig->opts_type = default_opts_type (hashconfig, user_options, user_options_extra); + hashconfig->outfile_check_disable = default_outfile_check_disable (hashconfig, user_options, user_options_extra); + hashconfig->outfile_check_nocomp = default_outfile_check_nocomp (hashconfig, user_options, user_options_extra); + hashconfig->potfile_disable = default_potfile_disable (hashconfig, user_options, user_options_extra); + hashconfig->potfile_keep_all_hashes = default_potfile_keep_all_hashes (hashconfig, user_options, user_options_extra); + hashconfig->pwdump_column = default_pwdump_column (hashconfig, user_options, user_options_extra); + hashconfig->salt_type = default_salt_type (hashconfig, user_options, user_options_extra); + hashconfig->separator = default_separator (hashconfig, user_options, user_options_extra); + hashconfig->st_hash = default_st_hash (hashconfig, user_options, user_options_extra); + hashconfig->st_pass = default_st_pass (hashconfig, user_options, user_options_extra); + hashconfig->tmp_size = default_tmp_size (hashconfig, user_options, user_options_extra); + hashconfig->warmup_disable = default_warmup_disable (hashconfig, user_options, user_options_extra); // finally, the real stuff @@ -716,36 +717,37 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) return -1; } - if (module_ctx->module_attack_exec) hashconfig->attack_exec = module_ctx->module_attack_exec (hashconfig, user_options, user_options_extra); - if (module_ctx->module_dictstat_disable) hashconfig->dictstat_disable = module_ctx->module_dictstat_disable (hashconfig, user_options, user_options_extra); - if (module_ctx->module_dgst_pos0) hashconfig->dgst_pos0 = module_ctx->module_dgst_pos0 (hashconfig, user_options, user_options_extra); - if (module_ctx->module_dgst_pos1) hashconfig->dgst_pos1 = module_ctx->module_dgst_pos1 (hashconfig, user_options, user_options_extra); - if (module_ctx->module_dgst_pos2) hashconfig->dgst_pos2 = module_ctx->module_dgst_pos2 (hashconfig, user_options, user_options_extra); - if (module_ctx->module_dgst_pos3) hashconfig->dgst_pos3 = module_ctx->module_dgst_pos3 (hashconfig, user_options, user_options_extra); - if (module_ctx->module_dgst_size) hashconfig->dgst_size = module_ctx->module_dgst_size (hashconfig, user_options, user_options_extra); - if (module_ctx->module_esalt_size) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra); - if (module_ctx->module_forced_kernel_threads) hashconfig->forced_kernel_threads = module_ctx->module_forced_kernel_threads (hashconfig, user_options, user_options_extra); - if (module_ctx->module_forced_kernel_loops) hashconfig->forced_kernel_loops = module_ctx->module_forced_kernel_loops (hashconfig, user_options, user_options_extra); - if (module_ctx->module_forced_outfile_format) hashconfig->forced_outfile_format = module_ctx->module_forced_outfile_format (hashconfig, user_options, user_options_extra); - 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_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); - if (module_ctx->module_opti_type) hashconfig->opti_type = module_ctx->module_opti_type (hashconfig, user_options, user_options_extra); - if (module_ctx->module_opts_type) hashconfig->opts_type = module_ctx->module_opts_type (hashconfig, user_options, user_options_extra); - if (module_ctx->module_outfile_check_disable) hashconfig->outfile_check_disable = module_ctx->module_outfile_check_disable (hashconfig, user_options, user_options_extra); - if (module_ctx->module_outfile_check_nocomp) hashconfig->outfile_check_nocomp = module_ctx->module_outfile_check_nocomp (hashconfig, user_options, user_options_extra); - if (module_ctx->module_potfile_disable) hashconfig->potfile_disable = module_ctx->module_potfile_disable (hashconfig, user_options, user_options_extra); - if (module_ctx->module_pwdump_column) hashconfig->pwdump_column = module_ctx->module_pwdump_column (hashconfig, user_options, user_options_extra); - if (module_ctx->module_salt_type) hashconfig->salt_type = module_ctx->module_salt_type (hashconfig, user_options, user_options_extra); - if (module_ctx->module_separator) hashconfig->separator = module_ctx->module_separator (hashconfig, user_options, user_options_extra); - if (module_ctx->module_st_hash) hashconfig->st_hash = module_ctx->module_st_hash (hashconfig, user_options, user_options_extra); - if (module_ctx->module_st_pass) hashconfig->st_pass = module_ctx->module_st_pass (hashconfig, user_options, user_options_extra); - if (module_ctx->module_tmp_size) hashconfig->tmp_size = module_ctx->module_tmp_size (hashconfig, user_options, user_options_extra); - if (module_ctx->module_warmup_disable) hashconfig->warmup_disable = module_ctx->module_warmup_disable (hashconfig, user_options, user_options_extra); + if (module_ctx->module_attack_exec) hashconfig->attack_exec = module_ctx->module_attack_exec (hashconfig, user_options, user_options_extra); + if (module_ctx->module_dictstat_disable) hashconfig->dictstat_disable = module_ctx->module_dictstat_disable (hashconfig, user_options, user_options_extra); + if (module_ctx->module_dgst_pos0) hashconfig->dgst_pos0 = module_ctx->module_dgst_pos0 (hashconfig, user_options, user_options_extra); + if (module_ctx->module_dgst_pos1) hashconfig->dgst_pos1 = module_ctx->module_dgst_pos1 (hashconfig, user_options, user_options_extra); + if (module_ctx->module_dgst_pos2) hashconfig->dgst_pos2 = module_ctx->module_dgst_pos2 (hashconfig, user_options, user_options_extra); + if (module_ctx->module_dgst_pos3) hashconfig->dgst_pos3 = module_ctx->module_dgst_pos3 (hashconfig, user_options, user_options_extra); + if (module_ctx->module_dgst_size) hashconfig->dgst_size = module_ctx->module_dgst_size (hashconfig, user_options, user_options_extra); + if (module_ctx->module_esalt_size) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra); + if (module_ctx->module_forced_kernel_threads) hashconfig->forced_kernel_threads = module_ctx->module_forced_kernel_threads (hashconfig, user_options, user_options_extra); + if (module_ctx->module_forced_kernel_loops) hashconfig->forced_kernel_loops = module_ctx->module_forced_kernel_loops (hashconfig, user_options, user_options_extra); + if (module_ctx->module_forced_outfile_format) hashconfig->forced_outfile_format = module_ctx->module_forced_outfile_format (hashconfig, user_options, user_options_extra); + 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_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); + if (module_ctx->module_opti_type) hashconfig->opti_type = module_ctx->module_opti_type (hashconfig, user_options, user_options_extra); + if (module_ctx->module_opts_type) hashconfig->opts_type = module_ctx->module_opts_type (hashconfig, user_options, user_options_extra); + if (module_ctx->module_outfile_check_disable) hashconfig->outfile_check_disable = module_ctx->module_outfile_check_disable (hashconfig, user_options, user_options_extra); + if (module_ctx->module_outfile_check_nocomp) hashconfig->outfile_check_nocomp = module_ctx->module_outfile_check_nocomp (hashconfig, user_options, user_options_extra); + if (module_ctx->module_potfile_disable) hashconfig->potfile_disable = module_ctx->module_potfile_disable (hashconfig, user_options, user_options_extra); + if (module_ctx->module_potfile_keep_all_hashes) hashconfig->potfile_keep_all_hashes = module_ctx->module_potfile_keep_all_hashes (hashconfig, user_options, user_options_extra); + if (module_ctx->module_pwdump_column) hashconfig->pwdump_column = module_ctx->module_pwdump_column (hashconfig, user_options, user_options_extra); + if (module_ctx->module_salt_type) hashconfig->salt_type = module_ctx->module_salt_type (hashconfig, user_options, user_options_extra); + if (module_ctx->module_separator) hashconfig->separator = module_ctx->module_separator (hashconfig, user_options, user_options_extra); + if (module_ctx->module_st_hash) hashconfig->st_hash = module_ctx->module_st_hash (hashconfig, user_options, user_options_extra); + if (module_ctx->module_st_pass) hashconfig->st_pass = module_ctx->module_st_pass (hashconfig, user_options, user_options_extra); + if (module_ctx->module_tmp_size) hashconfig->tmp_size = module_ctx->module_tmp_size (hashconfig, user_options, user_options_extra); + if (module_ctx->module_warmup_disable) hashconfig->warmup_disable = module_ctx->module_warmup_disable (hashconfig, user_options, user_options_extra); if (user_options->keyboard_layout_mapping) { @@ -1396,6 +1398,23 @@ bool default_hlfmt_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_U return hlfmt_disable; } +bool default_potfile_keep_all_hashes (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + bool potfile_keep_all_hashes = false; + + // keep all hashes if --username was combined with --left or --show + + if (user_options->username == true) + { + if ((user_options->show == true) || (user_options->left == true)) + { + potfile_keep_all_hashes = true; + } + } + + return potfile_keep_all_hashes; +} + u32 default_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 pwdump_column = PWDUMP_COLUMN_INVALID; diff --git a/src/interface_migrate.c b/src/interface_migrate.c index 1822abe01..67464c05e 100644 --- a/src/interface_migrate.c +++ b/src/interface_migrate.c @@ -28444,3 +28444,28 @@ int module_hash_decode_outfile (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY } } +int module_hash_decode_zero_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf) +{ + if (hashconfig->hash_mode == 3000) + { + static const char LM_ZERO_HASH[] = "aad3b435b51404ee"; + + + return module_hash_decode (hashconfig, digest, salt, esalt, LM_ZERO_HASH, 16); + +} + + +bool potfile_keep_all_hashes +{ + // keep all hashes if -m 3000 was combined with --left or --show + + if (user_options->hash_mode == 3000) + { + if ((user_options->show == true) || (user_options->left == true)) + { + potfile_ctx->keep_all_hashes = true; + } + } +} + diff --git a/src/potfile.c b/src/potfile.c index ec6c5bed1..442cfed1b 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -124,28 +124,6 @@ int potfile_init (hashcat_ctx_t *hashcat_ctx) potfile_ctx->fp = NULL; } - // keep all hashes if --username was combined with --left or --show - - potfile_ctx->keep_all_hashes = false; - - if (user_options->username == true) - { - if ((user_options->show == true) || (user_options->left == true)) - { - potfile_ctx->keep_all_hashes = true; - } - } - - // keep all hashes if -m 3000 was combined with --left or --show - - if (user_options->hash_mode == 3000) - { - if ((user_options->show == true) || (user_options->left == true)) - { - potfile_ctx->keep_all_hashes = true; - } - } - // starting from here, we should allocate some scratch buffer for later use u8 *out_buf = (u8 *) hcmalloc (HCBUFSIZ_LARGE); @@ -440,7 +418,7 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx) pot_tree_entry_t *tree_entry_cache = NULL; pot_hash_node_t *tree_nodes_cache = NULL; - if (potfile_ctx->keep_all_hashes == true) + if (hashconfig->potfile_keep_all_hashes == true) { // we need *at most* one entry for every hash // (if there are no hashes with the same keys (hash + salt), a counter example would be: same hash but different user name) @@ -510,24 +488,21 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx) } } - // special case for a split hash + // do not use this unless really needed, for example as in LM - if (hashconfig->hash_mode == 3000) + if (module_ctx->module_hash_decode_zero_hash) { - const int parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, LM_ZERO_HASH, 16); + module_ctx->module_hash_decode_zero_hash (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt); - if (parser_status == PARSER_OK) + if (hashconfig->potfile_keep_all_hashes == true) { - if (potfile_ctx->keep_all_hashes == true) - { - potfile_update_hashes (hashcat_ctx, &hash_buf, NULL, 0, all_hashes_tree); - } - else - { - hash_t *found = (hash_t *) hc_bsearch_r (&hash_buf, hashes_buf, hashes_cnt, sizeof (hash_t), sort_by_hash_no_salt, (void *) hashconfig); + potfile_update_hashes (hashcat_ctx, &hash_buf, NULL, 0, all_hashes_tree); + } + else + { + hash_t *found = (hash_t *) hc_bsearch_r (&hash_buf, hashes_buf, hashes_cnt, sizeof (hash_t), sort_by_hash_no_salt, (void *) hashconfig); - potfile_update_hash (hashcat_ctx, found, NULL, 0); - } + potfile_update_hash (hashcat_ctx, found, NULL, 0); } } @@ -652,7 +627,7 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx) if (parser_status != PARSER_OK) continue; - if (potfile_ctx->keep_all_hashes == true) + if (hashconfig->potfile_keep_all_hashes == true) { potfile_update_hashes (hashcat_ctx, &hash_buf, line_pw_buf, (u32) line_pw_len, all_hashes_tree); @@ -669,8 +644,7 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx) potfile_read_close (hashcat_ctx); - - if (potfile_ctx->keep_all_hashes == true) + if (hashconfig->potfile_keep_all_hashes == true) { pot_tree_destroy (all_hashes_tree); // this could be slow (should we just skip it?)