Refactor advise_disable variable to just advise, same idea as outfile_autohex variable

pull/3895/head
jsteube 7 months ago
parent 4dceea914f
commit 652b66e642

@ -621,7 +621,7 @@ typedef enum progress_mode
typedef enum user_options_defaults
{
ADVICE_DISABLE = false,
ADVICE = true,
ATTACK_MODE = ATTACK_MODE_STRAIGHT,
AUTODETECT = false,
BACKEND_DEVICES_VIRTUAL = 1,
@ -2323,7 +2323,7 @@ typedef struct user_options
bool rule_buf_l_chgd;
bool rule_buf_r_chgd;
bool advice_disable;
bool advice;
bool benchmark;
bool benchmark_all;
#ifdef WITH_BRAIN

@ -154,7 +154,7 @@ static void main_log_advice (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUS
{
const user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->advice_disable == true) return;
if (user_options->advice == false) return;
main_log (hashcat_ctx, stdout, LOGLEVEL_ADVICE);
}

@ -170,7 +170,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
{
user_options_t *user_options = hashcat_ctx->user_options;
user_options->advice_disable = ADVICE_DISABLE;
user_options->advice = ADVICE;
user_options->attack_mode = ATTACK_MODE;
user_options->autodetect = AUTODETECT;
user_options->backend_devices = NULL;
@ -399,7 +399,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
case IDX_SHOW: user_options->show = true; break;
case IDX_DEPRECATED_CHECK_DISABLE: user_options->deprecated_check_disable = true; break;
case IDX_LEFT: user_options->left = true; break;
case IDX_ADVICE_DISABLE: user_options->advice_disable = true; break;
case IDX_ADVICE_DISABLE: user_options->advice = false; break;
case IDX_USERNAME: user_options->username = true; break;
case IDX_REMOVE: user_options->remove = true; break;
case IDX_REMOVE_TIMER: user_options->remove_timer = hc_strtoul (optarg, NULL, 10);

Loading…
Cancel
Save