From e04cd244ab26fcab88ef76f3d5dce23d4fb66df6 Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 17 Dec 2018 18:55:20 +0100 Subject: [PATCH] Fix benchmark initializations --- src/interface.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/interface.c b/src/interface.c index 1637643f0..5647d5dc4 100644 --- a/src/interface.c +++ b/src/interface.c @@ -882,22 +882,11 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->tmp_size = default_tmp_size (hashconfig, user_options, user_options_extra); hashconfig->warmup_disable = default_warmup_disable (hashconfig, user_options, user_options_extra); - // those depend on some previously defined sizes - - hashconfig->benchmark_esalt = default_benchmark_esalt (hashconfig, user_options, user_options_extra); - hashconfig->benchmark_hook_salt = default_benchmark_hook_salt (hashconfig, user_options, user_options_extra); - hashconfig->benchmark_mask = default_benchmark_mask (hashconfig, user_options, user_options_extra); - hashconfig->benchmark_salt = default_benchmark_salt (hashconfig, user_options, user_options_extra); - // finally, the real stuff module_register (module_ctx); if (module_ctx->module_attack_exec) hashconfig->attack_exec = module_ctx->module_attack_exec (hashconfig, user_options, user_options_extra); - if (module_ctx->module_benchmark_esalt) hashconfig->benchmark_esalt = module_ctx->module_benchmark_esalt (hashconfig, user_options, user_options_extra); - if (module_ctx->module_benchmark_hook_salt) hashconfig->benchmark_salt = module_ctx->module_benchmark_hook_salt (hashconfig, user_options, user_options_extra); - if (module_ctx->module_benchmark_mask) hashconfig->benchmark_mask = module_ctx->module_benchmark_mask (hashconfig, user_options, user_options_extra); - if (module_ctx->module_benchmark_salt) hashconfig->benchmark_salt = module_ctx->module_benchmark_salt (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); @@ -1032,6 +1021,18 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->is_salted = is_salted; + // those depend on some previously defined values + + hashconfig->benchmark_esalt = default_benchmark_esalt (hashconfig, user_options, user_options_extra); + hashconfig->benchmark_hook_salt = default_benchmark_hook_salt (hashconfig, user_options, user_options_extra); + hashconfig->benchmark_mask = default_benchmark_mask (hashconfig, user_options, user_options_extra); + hashconfig->benchmark_salt = default_benchmark_salt (hashconfig, user_options, user_options_extra); + + if (module_ctx->module_benchmark_esalt) hashconfig->benchmark_esalt = module_ctx->module_benchmark_esalt (hashconfig, user_options, user_options_extra); + if (module_ctx->module_benchmark_hook_salt) hashconfig->benchmark_hook_salt = module_ctx->module_benchmark_hook_salt (hashconfig, user_options, user_options_extra); + if (module_ctx->module_benchmark_mask) hashconfig->benchmark_mask = module_ctx->module_benchmark_mask (hashconfig, user_options, user_options_extra); + if (module_ctx->module_benchmark_salt) hashconfig->benchmark_salt = module_ctx->module_benchmark_salt (hashconfig, user_options, user_options_extra); + hashconfig->pw_max = default_pw_max (hashconfig, user_options, user_options_extra); hashconfig->pw_min = default_pw_min (hashconfig, user_options, user_options_extra); hashconfig->salt_max = default_salt_max (hashconfig, user_options, user_options_extra);