1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 01:50:10 +00:00

Fix -a 7 of fast hashes in optimized mode

This commit is contained in:
Jens Steube 2018-02-14 10:21:44 +01:00
parent 68ab3277d6
commit 07f119c28b

View File

@ -6231,15 +6231,23 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
device_param->kernel_params[ 4] = &device_param->d_tmps;
device_param->kernel_params[ 5] = &device_param->d_hooks;
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
{
device_param->kernel_params_mp[0] = (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
? &device_param->d_pws_buf
: &device_param->d_pws_amp_buf;
CL_rc = hc_clSetKernelArg (hashcat_ctx, device_param->kernel_mp, 0, sizeof (cl_mem), device_param->kernel_params_mp[0]); if (CL_rc == -1) return -1;
// nothing to do
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
else
{
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
device_param->kernel_params_mp[0] = (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
? &device_param->d_pws_buf
: &device_param->d_pws_amp_buf;
CL_rc = hc_clSetKernelArg (hashcat_ctx, device_param->kernel_mp, 0, sizeof (cl_mem), device_param->kernel_params_mp[0]); if (CL_rc == -1) return -1;
}
}
if (user_options->attack_mode == ATTACK_MODE_BF)
{
device_param->kernel_params_mp_l[0] = (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
? &device_param->d_pws_buf