mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 07:08:19 +00:00
Get rid of benchmark variable in data. context
This commit is contained in:
parent
59ba4c2d93
commit
21d852b194
@ -73,7 +73,7 @@ void writeProgramBin (char *dst, u8 *binary, size_t binary_size);
|
||||
|
||||
int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
|
||||
|
||||
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration);
|
||||
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration);
|
||||
int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num, const uint event_update, const uint iteration, hashconfig_t *hashconfig);
|
||||
int run_kernel_mp (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num);
|
||||
int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param);
|
||||
|
@ -971,7 +971,6 @@ typedef struct
|
||||
u32 attack_kern;
|
||||
u32 quiet;
|
||||
u32 force;
|
||||
u32 benchmark;
|
||||
u32 runtime;
|
||||
u32 hex_charset;
|
||||
u32 hex_salt;
|
||||
|
@ -282,7 +282,7 @@ void *thread_calc (void *p)
|
||||
|
||||
if (opencl_ctx->run_thread_level1 == false) break;
|
||||
|
||||
if (data.benchmark == true) break;
|
||||
if (user_options->benchmark == true) break;
|
||||
|
||||
device_param->words_done = words_fin;
|
||||
}
|
||||
|
@ -271,7 +271,6 @@ int main (int argc, char **argv)
|
||||
if (1)
|
||||
{
|
||||
data.attack_mode = user_options->attack_mode;
|
||||
data.benchmark = user_options->benchmark;
|
||||
data.force = user_options->force;
|
||||
data.hex_charset = user_options->hex_charset;
|
||||
data.hex_salt = user_options->hex_salt;
|
||||
|
12
src/opencl.c
12
src/opencl.c
@ -244,7 +244,7 @@ int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, con
|
||||
return 0;
|
||||
}
|
||||
|
||||
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration)
|
||||
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration)
|
||||
{
|
||||
cl_int CL_err = CL_SUCCESS;
|
||||
|
||||
@ -357,7 +357,7 @@ int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, ha
|
||||
|
||||
device_param->speed_ms[speed_pos] = speed_ms;
|
||||
|
||||
if (data.benchmark == true)
|
||||
if (user_options->benchmark == true)
|
||||
{
|
||||
if (speed_ms > 4096) myabort (opencl_ctx);
|
||||
}
|
||||
@ -1229,12 +1229,12 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash
|
||||
}
|
||||
}
|
||||
|
||||
if (data.benchmark == true)
|
||||
if (user_options->benchmark == true)
|
||||
{
|
||||
hc_timer_set (&device_param->timer_speed);
|
||||
}
|
||||
|
||||
int rc = choose_kernel (opencl_ctx, device_param, hashconfig, hashconfig->attack_exec, data.attack_mode, hashconfig->opts_type, salt_buf, highest_pw_len, pws_cnt, fast_iteration);
|
||||
int rc = choose_kernel (opencl_ctx, device_param, user_options, hashconfig, hashconfig->attack_exec, data.attack_mode, hashconfig->opts_type, salt_buf, highest_pw_len, pws_cnt, fast_iteration);
|
||||
|
||||
if (rc == -1) return -1;
|
||||
|
||||
@ -1242,7 +1242,7 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash
|
||||
* result
|
||||
*/
|
||||
|
||||
if (data.benchmark == false)
|
||||
if (user_options->benchmark == false)
|
||||
{
|
||||
check_cracked (opencl_ctx, device_param, user_options, hashconfig, hashes, salt_pos);
|
||||
}
|
||||
@ -1290,7 +1290,7 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash
|
||||
* benchmark
|
||||
*/
|
||||
|
||||
if (data.benchmark == true) break;
|
||||
if (user_options->benchmark == true) break;
|
||||
|
||||
if (opencl_ctx->run_thread_level2 == false) break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user