1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-25 16:08:18 +00:00

Enable automatic fallback to optimized kernel if pure kernel is not found

This commit is contained in:
jsteube 2017-07-18 20:32:56 +02:00
parent 920911b56e
commit 08a3fc2bb3

View File

@ -24302,7 +24302,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
{
char source_file[256] = { 0 };
generate_source_kernel_filename (hashconfig->attack_exec, user_options_extra->attack_kern, hashconfig->kern_type, user_options->optimized_kernel_enable, folder_config->shared_dir, source_file);
generate_source_kernel_filename (hashconfig->attack_exec, user_options_extra->attack_kern, hashconfig->kern_type, true, folder_config->shared_dir, source_file);
if (hc_path_read (source_file) == false)
{
@ -24313,6 +24313,23 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->opti_type |= OPTI_TYPE_OPTIMIZED_KERNEL;
}
}
else
{
char source_file[256] = { 0 };
generate_source_kernel_filename (hashconfig->attack_exec, user_options_extra->attack_kern, hashconfig->kern_type, false, folder_config->shared_dir, source_file);
if (hc_path_read (source_file) == false)
{
if (user_options->quiet == false) event_log_warning (hashcat_ctx, "%s: Pure kernel not found, falling back to optimized kernel", source_file);
hashconfig->opti_type |= OPTI_TYPE_OPTIMIZED_KERNEL;
}
else
{
// nothing to do
}
}
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{