From 306d40a13a68a687f8530fad1438df600707855c Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Sat, 23 Feb 2019 12:24:32 +0100 Subject: [PATCH] Fixed incorrect progress-only result in a special race condition --- docs/changes.txt | 1 + src/opencl.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index d2bae07fa..0be640eff 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -18,6 +18,7 @@ - Fixed the validation of the --brain-client-features command line argument (only values 1, 2 or 3 are allowed) - Fixed cracking of Cisco-PIX and Cisco-ASA MD5 passwords in mask-attack mode if mask > length 16 - Fixed the 7-Zip parser to allow the entire supported range of encrypted and decrypted data lengths +- Fixed incorrect progress-only result in a special race condition ## ## Improvements diff --git a/src/opencl.c b/src/opencl.c index 4450634f2..1f94db0b6 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -2325,6 +2325,16 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co device_param->outerloop_pos = 0; device_param->outerloop_left = pws_cnt; + // we ignore the time to copy data over pci bus in this case + + if (user_options->speed_only == true) + { + choose_kernel (hashcat_ctx, device_param, highest_pw_len, pws_cnt, 0, 0); + choose_kernel (hashcat_ctx, device_param, highest_pw_len, pws_cnt, 0, 0); + + hc_timer_set (&device_param->timer_speed); + } + // loop start: most outer loop = salt iteration, then innerloops (if multi) for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) @@ -2845,6 +2855,8 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co } device_param->outerloop_msec = total_msec * hashes->salts_cnt * device_param->outerloop_multi; + + device_param->speed_only_finish = true; } return 0;