mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-15 04:23:06 +00:00
Move hashconfig initialization to first inner loop
This commit is contained in:
parent
1c9aa25886
commit
04dbbebc62
@ -427,13 +427,9 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
/**
|
||||
* config
|
||||
* outer loop
|
||||
*/
|
||||
|
||||
hashconfig_t *hashconfig = (hashconfig_t *) mymalloc (sizeof (hashconfig_t));
|
||||
|
||||
data.hashconfig = hashconfig;
|
||||
|
||||
uint algorithm_pos = 0;
|
||||
uint algorithm_max = 1;
|
||||
|
||||
@ -483,6 +479,10 @@ int main (int argc, char **argv)
|
||||
* setup variables and buffers depending on hash_mode
|
||||
*/
|
||||
|
||||
hashconfig_t *hashconfig = (hashconfig_t *) mymalloc (sizeof (hashconfig_t));
|
||||
|
||||
data.hashconfig = hashconfig;
|
||||
|
||||
const int rc_hashconfig = hashconfig_init (hashconfig, user_options);
|
||||
|
||||
if (rc_hashconfig == -1) return -1;
|
||||
@ -3689,6 +3689,8 @@ int main (int argc, char **argv)
|
||||
|
||||
hashes_destroy (hashes);
|
||||
|
||||
hashconfig_destroy (hashconfig);
|
||||
|
||||
local_free (all_kernel_rules_cnt);
|
||||
local_free (all_kernel_rules_buf);
|
||||
|
||||
@ -3729,14 +3731,16 @@ int main (int argc, char **argv)
|
||||
|
||||
local_free (rd);
|
||||
|
||||
hashconfig_destroy (hashconfig);
|
||||
|
||||
tuning_db_destroy (tuning_db);
|
||||
|
||||
induct_ctx_destroy (induct_ctx);
|
||||
|
||||
outcheck_ctx_destroy (outcheck_ctx);
|
||||
|
||||
folder_config_destroy (folder_config);
|
||||
|
||||
user_options_extra_destroy (user_options_extra);
|
||||
|
||||
time_t proc_stop;
|
||||
|
||||
time (&proc_stop);
|
||||
@ -3753,6 +3757,8 @@ int main (int argc, char **argv)
|
||||
if (user_options->quiet == false) log_info_nn ("Started: %s", ctime (&proc_start));
|
||||
if (user_options->quiet == false) log_info_nn ("Stopped: %s", ctime (&proc_stop));
|
||||
|
||||
user_options_destroy (user_options);
|
||||
|
||||
u32 rc_final = -1;
|
||||
|
||||
if (opencl_ctx->devices_status == STATUS_ABORTED) rc_final = 2;
|
||||
@ -3762,11 +3768,5 @@ int main (int argc, char **argv)
|
||||
|
||||
opencl_ctx_destroy (opencl_ctx);
|
||||
|
||||
folder_config_destroy (folder_config);
|
||||
|
||||
user_options_extra_destroy (user_options_extra);
|
||||
|
||||
user_options_destroy (user_options);
|
||||
|
||||
return rc_final;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user