1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-10 15:51:10 +00:00

Fixed too early execution of some module functions which could make use of non-final values opts_type and opti_type

This commit is contained in:
Jens Steube 2020-08-04 14:48:12 +02:00
parent 6259acc3ab
commit acafe3dae2
2 changed files with 25 additions and 19 deletions

View File

@ -6,6 +6,12 @@
- Added hash-mode: RSA/DSA/EC/OPENSSH Private Keys
##
## Bugs
##
- Fixed too early execution of some module functions which could make use of non-final values opts_type and opti_type
* changes v6.1.0 -> v6.1.1
##

View File

@ -251,25 +251,6 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
#undef CHECK_MANDATORY
if (module_ctx->module_benchmark_mask != MODULE_DEFAULT) hashconfig->benchmark_mask = module_ctx->module_benchmark_mask (hashconfig, user_options, user_options_extra);
if (module_ctx->module_dictstat_disable != MODULE_DEFAULT) hashconfig->dictstat_disable = module_ctx->module_dictstat_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_esalt_size != MODULE_DEFAULT) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_forced_outfile_format != MODULE_DEFAULT) hashconfig->forced_outfile_format = module_ctx->module_forced_outfile_format (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hash_mode != MODULE_DEFAULT) hashconfig->hash_mode = module_ctx->module_hash_mode (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hashes_count_min != MODULE_DEFAULT) hashconfig->hashes_count_min = module_ctx->module_hashes_count_min (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hashes_count_max != MODULE_DEFAULT) hashconfig->hashes_count_max = module_ctx->module_hashes_count_max (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hlfmt_disable != MODULE_DEFAULT) hashconfig->hlfmt_disable = module_ctx->module_hlfmt_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hook_salt_size != MODULE_DEFAULT) hashconfig->hook_salt_size = module_ctx->module_hook_salt_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hook_size != MODULE_DEFAULT) hashconfig->hook_size = module_ctx->module_hook_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_outfile_check_disable != MODULE_DEFAULT) hashconfig->outfile_check_disable = module_ctx->module_outfile_check_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_outfile_check_nocomp != MODULE_DEFAULT) hashconfig->outfile_check_nocomp = module_ctx->module_outfile_check_nocomp (hashconfig, user_options, user_options_extra);
if (module_ctx->module_potfile_disable != MODULE_DEFAULT) hashconfig->potfile_disable = module_ctx->module_potfile_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_potfile_keep_all_hashes != MODULE_DEFAULT) hashconfig->potfile_keep_all_hashes = module_ctx->module_potfile_keep_all_hashes (hashconfig, user_options, user_options_extra);
if (module_ctx->module_pwdump_column != MODULE_DEFAULT) hashconfig->pwdump_column = module_ctx->module_pwdump_column (hashconfig, user_options, user_options_extra);
if (module_ctx->module_separator != MODULE_DEFAULT) hashconfig->separator = module_ctx->module_separator (hashconfig, user_options, user_options_extra);
if (module_ctx->module_tmp_size != MODULE_DEFAULT) hashconfig->tmp_size = module_ctx->module_tmp_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_warmup_disable != MODULE_DEFAULT) hashconfig->warmup_disable = module_ctx->module_warmup_disable (hashconfig, user_options, user_options_extra);
if (user_options->keyboard_layout_mapping)
{
if ((hashconfig->opts_type & OPTS_TYPE_KEYBOARD_MAPPING) == 0)
@ -412,6 +393,25 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->is_salted = is_salted;
if (module_ctx->module_benchmark_mask != MODULE_DEFAULT) hashconfig->benchmark_mask = module_ctx->module_benchmark_mask (hashconfig, user_options, user_options_extra);
if (module_ctx->module_dictstat_disable != MODULE_DEFAULT) hashconfig->dictstat_disable = module_ctx->module_dictstat_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_esalt_size != MODULE_DEFAULT) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_forced_outfile_format != MODULE_DEFAULT) hashconfig->forced_outfile_format = module_ctx->module_forced_outfile_format (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hash_mode != MODULE_DEFAULT) hashconfig->hash_mode = module_ctx->module_hash_mode (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hashes_count_min != MODULE_DEFAULT) hashconfig->hashes_count_min = module_ctx->module_hashes_count_min (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hashes_count_max != MODULE_DEFAULT) hashconfig->hashes_count_max = module_ctx->module_hashes_count_max (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hlfmt_disable != MODULE_DEFAULT) hashconfig->hlfmt_disable = module_ctx->module_hlfmt_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hook_salt_size != MODULE_DEFAULT) hashconfig->hook_salt_size = module_ctx->module_hook_salt_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_hook_size != MODULE_DEFAULT) hashconfig->hook_size = module_ctx->module_hook_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_outfile_check_disable != MODULE_DEFAULT) hashconfig->outfile_check_disable = module_ctx->module_outfile_check_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_outfile_check_nocomp != MODULE_DEFAULT) hashconfig->outfile_check_nocomp = module_ctx->module_outfile_check_nocomp (hashconfig, user_options, user_options_extra);
if (module_ctx->module_potfile_disable != MODULE_DEFAULT) hashconfig->potfile_disable = module_ctx->module_potfile_disable (hashconfig, user_options, user_options_extra);
if (module_ctx->module_potfile_keep_all_hashes != MODULE_DEFAULT) hashconfig->potfile_keep_all_hashes = module_ctx->module_potfile_keep_all_hashes (hashconfig, user_options, user_options_extra);
if (module_ctx->module_pwdump_column != MODULE_DEFAULT) hashconfig->pwdump_column = module_ctx->module_pwdump_column (hashconfig, user_options, user_options_extra);
if (module_ctx->module_separator != MODULE_DEFAULT) hashconfig->separator = module_ctx->module_separator (hashconfig, user_options, user_options_extra);
if (module_ctx->module_tmp_size != MODULE_DEFAULT) hashconfig->tmp_size = module_ctx->module_tmp_size (hashconfig, user_options, user_options_extra);
if (module_ctx->module_warmup_disable != MODULE_DEFAULT) hashconfig->warmup_disable = module_ctx->module_warmup_disable (hashconfig, user_options, user_options_extra);
// those depend on some previously defined values
hashconfig->pw_max = default_pw_max (hashconfig, user_options, user_options_extra);