mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-11 16:21:12 +00:00
Skip unstable hash modes (OSX only)
This commit is contained in:
parent
834a6c296b
commit
28ec87aa2b
28
src/opencl.c
28
src/opencl.c
@ -92,7 +92,7 @@ static int ocl_check_dri (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
fclose (fd_dri);
|
||||
|
||||
#endif
|
||||
#endif // __linux__
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3148,6 +3148,32 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (device_param->skipped) continue;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
/**
|
||||
* If '--force' is not set, we proceed to excluding unstable hash modes,
|
||||
* because some of them cause segfault or inconclusive attack.
|
||||
*
|
||||
* common: 1500, 3000, 14000
|
||||
* gpu-only: 14100
|
||||
* cpu-only: 3200, 9000
|
||||
*/
|
||||
bool checks = false;
|
||||
|
||||
checks |= (user_options->hash_mode == 1500 || user_options->hash_mode == 3000 || user_options->hash_mode == 14000);
|
||||
checks |= ((device_param->device_type & CL_DEVICE_TYPE_GPU) == CL_DEVICE_TYPE_GPU && user_options->hash_mode == 14100);
|
||||
checks |= ((device_param->device_type & CL_DEVICE_TYPE_CPU) == CL_DEVICE_TYPE_CPU && (user_options->hash_mode == 3200 || user_options->hash_mode == 9000));
|
||||
|
||||
if (!user_options->force && checks)
|
||||
{
|
||||
event_log_warning (hashcat_ctx, "* Device #%u: hashmode %u is unstable for this Apple %s Device, skipping (use --force to override)\n",
|
||||
device_id+1, user_options->hash_mode, (device_param->device_type & CL_DEVICE_TYPE_GPU) ? "GPU" : "CPU");
|
||||
|
||||
device_param->skipped = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
#endif // __APPLE__
|
||||
|
||||
// vector_width
|
||||
|
||||
cl_uint vector_width;
|
||||
|
Loading…
Reference in New Issue
Block a user