1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Move speed timer initialization from run_cracker() to run_copy()

This commit is contained in:
jsteube 2018-02-11 22:28:17 +01:00
parent c4f30220a0
commit 240652a0ff

View File

@ -1962,6 +1962,20 @@ int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const
user_options_t *user_options = hashcat_ctx->user_options;
user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra;
// init speed timer
#if defined (_WIN)
if (device_param->timer_speed.QuadPart == 0)
{
hc_timer_set (&device_param->timer_speed);
}
#else
if (device_param->timer_speed.tv_sec == 0)
{
hc_timer_set (&device_param->timer_speed);
}
#endif
if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT)
{
int CL_rc;
@ -2109,20 +2123,6 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
user_options_t *user_options = hashcat_ctx->user_options;
user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra;
// init speed timer
#if defined (_WIN)
if (device_param->timer_speed.QuadPart == 0)
{
hc_timer_set (&device_param->timer_speed);
}
#else
if (device_param->timer_speed.tv_sec == 0)
{
hc_timer_set (&device_param->timer_speed);
}
#endif
// find higest password length, this is for optimization stuff
u32 highest_pw_len = 0;