|
|
|
@ -481,11 +481,22 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const u32 loop_step = hashconfig->kernel_loops_min + ((hashconfig->kernel_loops_max - hashconfig->kernel_loops_min) / 32);
|
|
|
|
|
|
|
|
|
|
const u32 salt_pos = 0;
|
|
|
|
|
|
|
|
|
|
salt_t *salt_buf = &hashes->st_salts_buf[salt_pos];
|
|
|
|
|
|
|
|
|
|
const u32 loop_step = hashconfig->kernel_loops_min + ((hashconfig->kernel_loops_max - hashconfig->kernel_loops_min) / 32);
|
|
|
|
|
const u32 salt_repeats = hashes->salts_buf[salt_pos].salt_repeats;
|
|
|
|
|
|
|
|
|
|
for (u32 salt_repeat = 0; salt_repeat <= salt_repeats; salt_repeat++)
|
|
|
|
|
{
|
|
|
|
|
device_param->kernel_params_buf32[34] = salt_repeat;
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_LOOP_PREPARE)
|
|
|
|
|
{
|
|
|
|
|
if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2P, 0, 1, false, 0) == -1) return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const u32 iter = salt_buf->salt_iter;
|
|
|
|
|
|
|
|
|
@ -532,12 +543,22 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL) == -1) return -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_INIT2)
|
|
|
|
|
{
|
|
|
|
|
if (run_kernel (hashcat_ctx, device_param, KERN_RUN_INIT2, 0, 1, false, 0) == -1) return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (u32 salt_repeat = 0; salt_repeat <= salt_repeats; salt_repeat++)
|
|
|
|
|
{
|
|
|
|
|
device_param->kernel_params_buf32[34] = salt_repeat;
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_LOOP2_PREPARE)
|
|
|
|
|
{
|
|
|
|
|
if (run_kernel (hashcat_ctx, device_param, KERN_RUN_LOOP2P, 0, 1, false, 0) == -1) return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_LOOP2)
|
|
|
|
|
{
|
|
|
|
|
const u32 iter2 = salt_buf->salt_iter2;
|
|
|
|
@ -554,6 +575,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
if (run_kernel (hashcat_ctx, device_param, KERN_RUN_LOOP2, 0, 1, false, 0) == -1) return -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_DEEP_COMP_KERNEL)
|
|
|
|
|
{
|
|
|
|
@ -602,14 +624,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
|
|
|
|
|
// finish : cleanup and restore
|
|
|
|
|
|
|
|
|
|
device_param->kernel_params_buf32[27] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[28] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[29] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[30] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[31] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[32] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[33] = 0;
|
|
|
|
|
device_param->kernel_params_buf64[34] = 0;
|
|
|
|
|
device_param->kernel_params_buf32[34] = 0;
|
|
|
|
|
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|