mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 06:38:11 +00:00
Refactor optimized_kernel_enable variable to just optimized_kernel, same idea as outfile_autohex variable
This commit is contained in:
parent
686bc227cf
commit
adbcef6909
@ -680,7 +680,7 @@ typedef enum user_options_defaults
|
||||
BACKEND_IGNORE_OPENCL = false,
|
||||
BACKEND_INFO = 0,
|
||||
BACKEND_VECTOR_WIDTH = 0,
|
||||
OPTIMIZED_KERNEL_ENABLE = false,
|
||||
OPTIMIZED_KERNEL = false,
|
||||
MULTIPLY_ACCEL = true,
|
||||
OUTFILE_AUTOHEX = true,
|
||||
OUTFILE_CHECK_TIMER = 5,
|
||||
@ -2351,7 +2351,7 @@ typedef struct user_options
|
||||
bool backend_ignore_hip;
|
||||
bool backend_ignore_metal;
|
||||
bool backend_ignore_opencl;
|
||||
bool optimized_kernel_enable;
|
||||
bool optimized_kernel;
|
||||
bool multiply_accel;
|
||||
bool outfile_autohex;
|
||||
bool outfile_json;
|
||||
|
@ -357,7 +357,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (user_options->hash_info == false)
|
||||
{
|
||||
if (user_options->optimized_kernel_enable == true)
|
||||
if (user_options->optimized_kernel == true)
|
||||
{
|
||||
if (hashconfig->has_optimized_kernel == false)
|
||||
{
|
||||
|
@ -786,7 +786,7 @@ static void main_monitor_performance_hint (MAYBE_UNUSED hashcat_ctx_t *hashcat_c
|
||||
event_log_advice (hashcat_ctx, "Cracking performance lower than expected?");
|
||||
event_log_advice (hashcat_ctx, NULL);
|
||||
|
||||
if (user_options->optimized_kernel_enable == false)
|
||||
if (user_options->optimized_kernel == false)
|
||||
{
|
||||
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ static const char *SIGNATURE_RAR3 = "$RAR3$";
|
||||
|
||||
u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const bool optimized_kernel = user_options->optimized_kernel_enable;
|
||||
const bool optimized_kernel = user_options->optimized_kernel;
|
||||
|
||||
u64 tmp_size = (u64) sizeof (rar3_tmp_t);
|
||||
|
||||
|
@ -356,7 +356,7 @@ u64 module_hook_extra_param_size (MAYBE_UNUSED const hashconfig_t *hashconfig, M
|
||||
|
||||
u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const bool optimized_kernel = user_options->optimized_kernel_enable;
|
||||
const bool optimized_kernel = user_options->optimized_kernel;
|
||||
|
||||
u64 tmp_size = (u64) sizeof (rar3_tmp_t);
|
||||
|
||||
|
@ -81,7 +81,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
|
||||
|
||||
u32 pw_max = PW_MAX - 4;
|
||||
|
||||
if (user_options->optimized_kernel_enable == true && hashconfig->has_optimized_kernel == true)
|
||||
if (user_options->optimized_kernel == true && hashconfig->has_optimized_kernel == true)
|
||||
{
|
||||
pw_max = PW_MAX_OLD - 4;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
|
||||
user_options->metal_compiler_runtime = METAL_COMPILER_RUNTIME;
|
||||
user_options->nonce_error_corrections = NONCE_ERROR_CORRECTIONS;
|
||||
user_options->opencl_device_types = NULL;
|
||||
user_options->optimized_kernel_enable = OPTIMIZED_KERNEL_ENABLE;
|
||||
user_options->optimized_kernel = OPTIMIZED_KERNEL;
|
||||
user_options->multiply_accel = MULTIPLY_ACCEL;
|
||||
user_options->outfile_autohex = OUTFILE_AUTOHEX;
|
||||
user_options->outfile_check_dir = NULL;
|
||||
@ -485,7 +485,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
||||
case IDX_BACKEND_VECTOR_WIDTH: user_options->backend_vector_width = hc_strtoul (optarg, NULL, 10);
|
||||
user_options->backend_vector_width_chgd = true; break;
|
||||
case IDX_OPENCL_DEVICE_TYPES: user_options->opencl_device_types = optarg; break;
|
||||
case IDX_OPTIMIZED_KERNEL_ENABLE: user_options->optimized_kernel_enable = true; break;
|
||||
case IDX_OPTIMIZED_KERNEL_ENABLE: user_options->optimized_kernel = true; break;
|
||||
case IDX_MULTIPLY_ACCEL_DISABLE: user_options->multiply_accel = false; break;
|
||||
case IDX_WORKLOAD_PROFILE: user_options->workload_profile = hc_strtoul (optarg, NULL, 10);
|
||||
user_options->workload_profile_chgd = true; break;
|
||||
@ -1900,8 +1900,8 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (user_options->workload_profile_chgd == false)
|
||||
{
|
||||
user_options->optimized_kernel_enable = true;
|
||||
user_options->workload_profile = 3;
|
||||
user_options->optimized_kernel = true;
|
||||
user_options->workload_profile = 3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2133,7 +2133,7 @@ void user_options_info (hashcat_ctx_t *hashcat_ctx)
|
||||
event_log_info (hashcat_ctx, "* --opencl-device-types=%s", user_options->opencl_device_types);
|
||||
}
|
||||
|
||||
if (user_options->optimized_kernel_enable == true)
|
||||
if (user_options->optimized_kernel == true)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "* --optimized-kernel-enable");
|
||||
}
|
||||
@ -2197,7 +2197,7 @@ void user_options_info (hashcat_ctx_t *hashcat_ctx)
|
||||
event_log_info (hashcat_ctx, "# option: --opencl-device-types=%s", user_options->opencl_device_types);
|
||||
}
|
||||
|
||||
if (user_options->optimized_kernel_enable == true)
|
||||
if (user_options->optimized_kernel == true)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "# option: --optimized-kernel-enable");
|
||||
}
|
||||
@ -3258,7 +3258,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
|
||||
logfile_top_uint (user_options->multiply_accel);
|
||||
logfile_top_uint (user_options->backend_info);
|
||||
logfile_top_uint (user_options->backend_vector_width);
|
||||
logfile_top_uint (user_options->optimized_kernel_enable);
|
||||
logfile_top_uint (user_options->optimized_kernel);
|
||||
logfile_top_uint (user_options->outfile_autohex);
|
||||
logfile_top_uint (user_options->outfile_check_timer);
|
||||
logfile_top_uint (user_options->outfile_format);
|
||||
|
Loading…
Reference in New Issue
Block a user