mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-24 23:48:39 +00:00
Fix reported speed for slow hashes which was broken somewhere between hashcat (v3.10-809-g7fe575e) to hashcat (v3.10-820-g899413f)
This commit is contained in:
parent
425031c9c3
commit
a56aa30754
43
src/opencl.c
43
src/opencl.c
@ -1938,32 +1938,31 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
|
||||
|
||||
if (rc == -1) return -1;
|
||||
|
||||
/**
|
||||
* benchmark
|
||||
*/
|
||||
|
||||
if (user_options->speed_only == true) break;
|
||||
|
||||
/**
|
||||
* speed
|
||||
*/
|
||||
|
||||
const u64 perf_sum_all = (u64) pws_cnt * (u64) innerloop_left;
|
||||
|
||||
if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
|
||||
const double speed_msec = hc_timer_get (device_param->timer_speed);
|
||||
|
||||
hc_timer_set (&device_param->timer_speed);
|
||||
|
||||
device_param->speed_cnt[speed_pos] = perf_sum_all;
|
||||
|
||||
device_param->speed_msec[speed_pos] = speed_msec;
|
||||
|
||||
speed_pos++;
|
||||
|
||||
if (speed_pos == SPEED_CACHE)
|
||||
{
|
||||
const double speed_msec = hc_timer_get (device_param->timer_speed);
|
||||
|
||||
hc_timer_set (&device_param->timer_speed);
|
||||
|
||||
device_param->speed_cnt[speed_pos] = perf_sum_all;
|
||||
|
||||
device_param->speed_msec[speed_pos] = speed_msec;
|
||||
|
||||
speed_pos++;
|
||||
|
||||
if (speed_pos == SPEED_CACHE)
|
||||
{
|
||||
speed_pos = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// speed for slow hashes is set inside choose_kernel()
|
||||
speed_pos = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1976,12 +1975,6 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
|
||||
|
||||
hc_thread_mutex_unlock (status_ctx->mux_counter);
|
||||
|
||||
/**
|
||||
* benchmark
|
||||
*/
|
||||
|
||||
if (user_options->speed_only == true) break;
|
||||
|
||||
/**
|
||||
* result
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user