Fixed a logic error in storing temporary progress for slow hashes,leading to invalid speeds in status view

pull/1518/head
Jens Steube 6 years ago
parent b0ff625844
commit fa379074b6

@ -27,6 +27,7 @@
- Fixed a configuration setting for -m 400 which said it's capable of doing SIMD while it is not
- Fixed a hash parsing problem for 7-Zip hashes: allow a longer crc32 data length field within the hash format
- Fixed a hash parsing problem when using --show/--left with hashes with long salts that required pure kernels
- Fixed a logic error in storing temporary progress for slow hashes,leading to invalid speeds in status view
- Fixed a mask-length check issue: Return -1 in case the mask-length is not within the password-length range
- Fixed a missing check for returncode in case hashcat.hcstat2 was not found
- Fixed a race condition in combinator- and hybrid-mode where the same scratch buffer was used by multiple threads

@ -2111,8 +2111,6 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
// init speed timer
u32 speed_pos = device_param->speed_pos;
#if defined (_WIN)
if (device_param->timer_speed.QuadPart == 0)
{
@ -2491,32 +2489,39 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
* speed
*/
const u64 perf_sum_all = (u64) pws_cnt * innerloop_left;
if (status_ctx->run_thread_level2 == true)
{
const u64 perf_sum_all = (u64) pws_cnt * innerloop_left;
const double speed_msec = hc_timer_get (device_param->timer_speed);
const double speed_msec = hc_timer_get (device_param->timer_speed);
hc_timer_set (&device_param->timer_speed);
hc_timer_set (&device_param->timer_speed);
device_param->speed_cnt[speed_pos] = perf_sum_all;
u32 speed_pos = device_param->speed_pos;
device_param->speed_msec[speed_pos] = speed_msec;
device_param->speed_cnt[speed_pos] = perf_sum_all;
speed_pos++;
device_param->speed_msec[speed_pos] = speed_msec;
if (speed_pos == SPEED_CACHE)
{
speed_pos = 0;
}
speed_pos++;
/**
* progress
*/
if (speed_pos == SPEED_CACHE)
{
speed_pos = 0;
}
device_param->speed_pos = speed_pos;
/**
* progress
*/
hc_thread_mutex_lock (status_ctx->mux_counter);
hc_thread_mutex_lock (status_ctx->mux_counter);
status_ctx->words_progress_done[salt_pos] += perf_sum_all;
status_ctx->words_progress_done[salt_pos] += perf_sum_all;
hc_thread_mutex_unlock (status_ctx->mux_counter);
hc_thread_mutex_unlock (status_ctx->mux_counter);
}
/**
* benchmark, part2
@ -2553,8 +2558,6 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
//device_param->outerloop_pos = 0;
//device_param->outerloop_left = 0;
device_param->speed_pos = speed_pos;
return 0;
}

Loading…
Cancel
Save