hcstat2: allow to use option --markov-hcstat2 instead of just --markov-hcstat

This commit is contained in:
philsmd
2018-08-23 09:10:54 +02:00
parent fe04ccc1fd
commit 0f449b6440
6 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -631,7 +631,7 @@ static int sp_setup_tbl (hashcat_ctx_t *hashcat_ctx)
char *shared_dir = folder_config->shared_dir;
char *hcstat = user_options->markov_hcstat;
char *hcstat = user_options->markov_hcstat2;
u32 disable = user_options->markov_disable;
u32 classic = user_options->markov_classic;
+1 -1
View File
@@ -41,7 +41,7 @@ static const char *const USAGE_BIG[] =
" --keep-guessing | | Keep guessing the hash after it has been cracked |",
" --self-test-disable | | Disable self-test functionality on startup |",
" --loopback | | Add new plains to induct directory |",
" --markov-hcstat | File | Specify hcstat file to use | --markov-hc=my.hcstat",
" --markov-hcstat2 | File | Specify hcstat2 file to use | --markov-hcstat2=my.hcstat2",
" --markov-disable | | Disables markov-chains, emulates classic brute-force |",
" --markov-classic | | Enables classic markov-chains, no per-position |",
" -t, --markov-threshold | Num | Threshold X when to stop accepting new markov-chains | -t 50",
+7 -7
View File
@@ -62,7 +62,7 @@ static const struct option long_options[] =
{"machine-readable", no_argument, NULL, IDX_MACHINE_READABLE},
{"markov-classic", no_argument, NULL, IDX_MARKOV_CLASSIC},
{"markov-disable", no_argument, NULL, IDX_MARKOV_DISABLE},
{"markov-hcstat", required_argument, NULL, IDX_MARKOV_HCSTAT},
{"markov-hcstat2", required_argument, NULL, IDX_MARKOV_HCSTAT2},
{"markov-threshold", required_argument, NULL, IDX_MARKOV_THRESHOLD},
{"nonce-error-corrections", required_argument, NULL, IDX_NONCE_ERROR_CORRECTIONS},
{"nvidia-spin-damp", required_argument, NULL, IDX_NVIDIA_SPIN_DAMP},
@@ -165,7 +165,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
user_options->machine_readable = MACHINE_READABLE;
user_options->markov_classic = MARKOV_CLASSIC;
user_options->markov_disable = MARKOV_DISABLE;
user_options->markov_hcstat = NULL;
user_options->markov_hcstat2 = NULL;
user_options->markov_threshold = MARKOV_THRESHOLD;
user_options->nonce_error_corrections = NONCE_ERROR_CORRECTIONS;
user_options->nvidia_spin_damp = NVIDIA_SPIN_DAMP;
@@ -365,7 +365,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
case IDX_MARKOV_DISABLE: user_options->markov_disable = true; break;
case IDX_MARKOV_CLASSIC: user_options->markov_classic = true; break;
case IDX_MARKOV_THRESHOLD: user_options->markov_threshold = hc_strtoul (optarg, NULL, 10); break;
case IDX_MARKOV_HCSTAT: user_options->markov_hcstat = optarg; break;
case IDX_MARKOV_HCSTAT2: user_options->markov_hcstat2 = optarg; break;
case IDX_OUTFILE: user_options->outfile = optarg; break;
case IDX_OUTFILE_FORMAT: user_options->outfile_format = hc_strtoul (optarg, NULL, 10);
user_options->outfile_format_chgd = true; break;
@@ -854,11 +854,11 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
}
}
if (user_options->markov_hcstat != NULL)
if (user_options->markov_hcstat2 != NULL)
{
if (strlen (user_options->markov_hcstat) == 0)
if (strlen (user_options->markov_hcstat2) == 0)
{
event_log_error (hashcat_ctx, "Invalid --markov-hcstat value - must not be empty.");
event_log_error (hashcat_ctx, "Invalid --markov-hcstat2 value - must not be empty.");
return -1;
}
@@ -2268,7 +2268,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
logfile_top_string (user_options->encoding_from);
logfile_top_string (user_options->encoding_to);
logfile_top_string (user_options->induction_dir);
logfile_top_string (user_options->markov_hcstat);
logfile_top_string (user_options->markov_hcstat2);
logfile_top_string (user_options->opencl_devices);
logfile_top_string (user_options->opencl_device_types);
logfile_top_string (user_options->opencl_platforms);