mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 07:08:19 +00:00
Fixed a logic error in storing temporary progress for slow hashes,leading to invalid speeds in status view
This commit is contained in:
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
|
||||
|
59
src/opencl.c
59
src/opencl.c
@ -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,33 +2489,40 @@ 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;
|
||||
|
||||
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)
|
||||
if (status_ctx->run_thread_level2 == true)
|
||||
{
|
||||
speed_pos = 0;
|
||||
const u64 perf_sum_all = (u64) pws_cnt * innerloop_left;
|
||||
|
||||
const double speed_msec = hc_timer_get (device_param->timer_speed);
|
||||
|
||||
hc_timer_set (&device_param->timer_speed);
|
||||
|
||||
u32 speed_pos = device_param->speed_pos;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
device_param->speed_pos = speed_pos;
|
||||
|
||||
/**
|
||||
* progress
|
||||
*/
|
||||
|
||||
hc_thread_mutex_lock (status_ctx->mux_counter);
|
||||
|
||||
status_ctx->words_progress_done[salt_pos] += perf_sum_all;
|
||||
|
||||
hc_thread_mutex_unlock (status_ctx->mux_counter);
|
||||
}
|
||||
|
||||
/**
|
||||
* progress
|
||||
*/
|
||||
|
||||
hc_thread_mutex_lock (status_ctx->mux_counter);
|
||||
|
||||
status_ctx->words_progress_done[salt_pos] += perf_sum_all;
|
||||
|
||||
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…
Reference in New Issue
Block a user