|
|
|
@ -78,6 +78,7 @@ static const struct option long_options[] =
|
|
|
|
|
{"increment-max", required_argument, NULL, IDX_INCREMENT_MAX},
|
|
|
|
|
{"increment-min", required_argument, NULL, IDX_INCREMENT_MIN},
|
|
|
|
|
{"increment", no_argument, NULL, IDX_INCREMENT},
|
|
|
|
|
{"increment-inverse", no_argument, NULL, IDX_INCREMENT_INVERSE},
|
|
|
|
|
{"induction-dir", required_argument, NULL, IDX_INDUCTION_DIR},
|
|
|
|
|
{"keep-guessing", no_argument, NULL, IDX_KEEP_GUESSING},
|
|
|
|
|
{"kernel-accel", required_argument, NULL, IDX_KERNEL_ACCEL},
|
|
|
|
@ -221,6 +222,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
user_options->hook_threads = HOOK_THREADS;
|
|
|
|
|
user_options->identify = IDENTIFY;
|
|
|
|
|
user_options->increment = INCREMENT;
|
|
|
|
|
user_options->increment = INCREMENT_INVERSE;
|
|
|
|
|
user_options->increment_max = INCREMENT_MAX;
|
|
|
|
|
user_options->increment_min = INCREMENT_MIN;
|
|
|
|
|
user_options->induction_dir = NULL;
|
|
|
|
@ -523,7 +525,8 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
|
|
|
|
case IDX_BITMAP_MIN: user_options->bitmap_min = hc_strtoul (optarg, NULL, 10); break;
|
|
|
|
|
case IDX_BITMAP_MAX: user_options->bitmap_max = hc_strtoul (optarg, NULL, 10); break;
|
|
|
|
|
case IDX_HOOK_THREADS: user_options->hook_threads = hc_strtoul (optarg, NULL, 10); break;
|
|
|
|
|
case IDX_INCREMENT: user_options->increment = true; break;
|
|
|
|
|
case IDX_INCREMENT: increment_parse(hashcat_ctx); break;
|
|
|
|
|
case IDX_INCREMENT_INVERSE: user_options->increment_inverse = true; break;
|
|
|
|
|
case IDX_INCREMENT_MIN: user_options->increment_min = hc_strtoul (optarg, NULL, 10);
|
|
|
|
|
user_options->increment_min_chgd = true; break;
|
|
|
|
|
case IDX_INCREMENT_MAX: user_options->increment_max = hc_strtoul (optarg, NULL, 10);
|
|
|
|
@ -1305,6 +1308,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->increment_inverse == true)
|
|
|
|
|
{
|
|
|
|
|
event_log_error (hashcat_ctx, "Can't change --increment-inverse in benchmark mode.");
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->restore == true)
|
|
|
|
|
{
|
|
|
|
|
event_log_error (hashcat_ctx, "Can't change --restore in benchmark mode.");
|
|
|
|
@ -1883,6 +1893,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
user_options->attack_mode = ATTACK_MODE_BF;
|
|
|
|
|
user_options->hwmon_temp_abort = 0;
|
|
|
|
|
user_options->increment = false;
|
|
|
|
|
user_options->increment_inverse = false;
|
|
|
|
|
user_options->left = false;
|
|
|
|
|
user_options->logfile = false;
|
|
|
|
|
user_options->spin_damp = 0;
|
|
|
|
@ -3186,6 +3197,21 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void increment_parse (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
user_options_t *user_options = hashcat_ctx->user_options;
|
|
|
|
|
|
|
|
|
|
// Set increment inverse when -ii
|
|
|
|
|
if (user_options->increment == true)
|
|
|
|
|
{
|
|
|
|
|
user_options->increment_inverse = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
user_options->increment = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void user_options_logger (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
user_options_t *user_options = hashcat_ctx->user_options;
|
|
|
|
@ -3243,6 +3269,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
logfile_top_uint (user_options->hook_threads);
|
|
|
|
|
logfile_top_uint (user_options->identify);
|
|
|
|
|
logfile_top_uint (user_options->increment);
|
|
|
|
|
logfile_top_uint (user_options->increment_inverse);
|
|
|
|
|
logfile_top_uint (user_options->increment_max);
|
|
|
|
|
logfile_top_uint (user_options->increment_min);
|
|
|
|
|
logfile_top_uint (user_options->keep_guessing);
|
|
|
|
|