1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-21 23:58:07 +00:00

Refactor markov_disable variable to just markov, same idea as outfile_autohex variable

This commit is contained in:
jsteube 2023-10-17 12:17:05 +00:00
parent e498138bb6
commit bf04a158aa
4 changed files with 13 additions and 13 deletions

View File

@ -667,7 +667,7 @@ typedef enum user_options_defaults
LOOPBACK = false, LOOPBACK = false,
MACHINE_READABLE = false, MACHINE_READABLE = false,
MARKOV_CLASSIC = false, MARKOV_CLASSIC = false,
MARKOV_DISABLE = false, MARKOV = true,
MARKOV_INVERSE = false, MARKOV_INVERSE = false,
MARKOV_THRESHOLD = 0, MARKOV_THRESHOLD = 0,
METAL_COMPILER_RUNTIME = 120, METAL_COMPILER_RUNTIME = 120,
@ -2345,7 +2345,7 @@ typedef struct user_options
bool loopback; bool loopback;
bool machine_readable; bool machine_readable;
bool markov_classic; bool markov_classic;
bool markov_disable; bool markov;
bool markov_inverse; bool markov_inverse;
bool backend_ignore_cuda; bool backend_ignore_cuda;
bool backend_ignore_hip; bool backend_ignore_hip;

View File

@ -302,12 +302,12 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_charset, sizeof (hex_charset)); XXH64_update (state, &hex_charset, sizeof (hex_charset));
const int markov_classic = user_options->markov_classic; const int markov_classic = user_options->markov_classic;
const int markov_disable = user_options->markov_disable; const int markov = user_options->markov;
const int markov_inverse = user_options->markov_inverse; const int markov_inverse = user_options->markov_inverse;
const int markov_threshold = user_options->markov_threshold; const int markov_threshold = user_options->markov_threshold;
XXH64_update (state, &markov_classic, sizeof (markov_classic)); XXH64_update (state, &markov_classic, sizeof (markov_classic));
XXH64_update (state, &markov_disable, sizeof (markov_disable)); XXH64_update (state, &markov, sizeof (markov));
XXH64_update (state, &markov_inverse, sizeof (markov_inverse)); XXH64_update (state, &markov_inverse, sizeof (markov_inverse));
XXH64_update (state, &markov_threshold, sizeof (markov_threshold)); XXH64_update (state, &markov_threshold, sizeof (markov_threshold));
@ -361,12 +361,12 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_charset, sizeof (hex_charset)); XXH64_update (state, &hex_charset, sizeof (hex_charset));
const int markov_classic = user_options->markov_classic; const int markov_classic = user_options->markov_classic;
const int markov_disable = user_options->markov_disable; const int markov = user_options->markov;
const int markov_inverse = user_options->markov_inverse; const int markov_inverse = user_options->markov_inverse;
const int markov_threshold = user_options->markov_threshold; const int markov_threshold = user_options->markov_threshold;
XXH64_update (state, &markov_classic, sizeof (markov_classic)); XXH64_update (state, &markov_classic, sizeof (markov_classic));
XXH64_update (state, &markov_disable, sizeof (markov_disable)); XXH64_update (state, &markov, sizeof (markov));
XXH64_update (state, &markov_inverse, sizeof (markov_inverse)); XXH64_update (state, &markov_inverse, sizeof (markov_inverse));
XXH64_update (state, &markov_threshold, sizeof (markov_threshold)); XXH64_update (state, &markov_threshold, sizeof (markov_threshold));
@ -456,12 +456,12 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_charset, sizeof (hex_charset)); XXH64_update (state, &hex_charset, sizeof (hex_charset));
const int markov_classic = user_options->markov_classic; const int markov_classic = user_options->markov_classic;
const int markov_disable = user_options->markov_disable; const int markov = user_options->markov;
const int markov_inverse = user_options->markov_inverse; const int markov_inverse = user_options->markov_inverse;
const int markov_threshold = user_options->markov_threshold; const int markov_threshold = user_options->markov_threshold;
XXH64_update (state, &markov_classic, sizeof (markov_classic)); XXH64_update (state, &markov_classic, sizeof (markov_classic));
XXH64_update (state, &markov_disable, sizeof (markov_disable)); XXH64_update (state, &markov, sizeof (markov));
XXH64_update (state, &markov_inverse, sizeof (markov_inverse)); XXH64_update (state, &markov_inverse, sizeof (markov_inverse));
XXH64_update (state, &markov_threshold, sizeof (markov_threshold)); XXH64_update (state, &markov_threshold, sizeof (markov_threshold));

View File

@ -657,7 +657,7 @@ static int sp_setup_tbl (hashcat_ctx_t *hashcat_ctx)
char *shared_dir = folder_config->shared_dir; char *shared_dir = folder_config->shared_dir;
char *hcstat = user_options->markov_hcstat2; char *hcstat = user_options->markov_hcstat2;
u32 disable = user_options->markov_disable; u32 markov = user_options->markov;
u32 classic = user_options->markov_classic; u32 classic = user_options->markov_classic;
bool inverse = user_options->markov_inverse; bool inverse = user_options->markov_inverse;
@ -826,7 +826,7 @@ static int sp_setup_tbl (hashcat_ctx_t *hashcat_ctx)
* Markov modifier of hcstat_table on user request * Markov modifier of hcstat_table on user request
*/ */
if (disable) if (markov == false)
{ {
memset (root_stats_buf, 0, SP_ROOT_CNT * sizeof (u64)); memset (root_stats_buf, 0, SP_ROOT_CNT * sizeof (u64));
memset (markov_stats_buf, 0, SP_MARKOV_CNT * sizeof (u64)); memset (markov_stats_buf, 0, SP_MARKOV_CNT * sizeof (u64));

View File

@ -234,7 +234,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
user_options->loopback = LOOPBACK; user_options->loopback = LOOPBACK;
user_options->machine_readable = MACHINE_READABLE; user_options->machine_readable = MACHINE_READABLE;
user_options->markov_classic = MARKOV_CLASSIC; user_options->markov_classic = MARKOV_CLASSIC;
user_options->markov_disable = MARKOV_DISABLE; user_options->markov = MARKOV;
user_options->markov_hcstat2 = NULL; user_options->markov_hcstat2 = NULL;
user_options->markov_inverse = MARKOV_INVERSE; user_options->markov_inverse = MARKOV_INVERSE;
user_options->markov_threshold = MARKOV_THRESHOLD; user_options->markov_threshold = MARKOV_THRESHOLD;
@ -456,7 +456,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
user_options->rule_buf_l_chgd = true; break; user_options->rule_buf_l_chgd = true; break;
case IDX_RULE_BUF_R: user_options->rule_buf_r = optarg; case IDX_RULE_BUF_R: user_options->rule_buf_r = optarg;
user_options->rule_buf_r_chgd = true; break; user_options->rule_buf_r_chgd = true; break;
case IDX_MARKOV_DISABLE: user_options->markov_disable = true; break; case IDX_MARKOV_DISABLE: user_options->markov = false; break;
case IDX_MARKOV_CLASSIC: user_options->markov_classic = true; break; case IDX_MARKOV_CLASSIC: user_options->markov_classic = true; break;
case IDX_MARKOV_INVERSE: user_options->markov_inverse = true; break; case IDX_MARKOV_INVERSE: user_options->markov_inverse = true; break;
case IDX_MARKOV_THRESHOLD: user_options->markov_threshold = hc_strtoul (optarg, NULL, 10); break; case IDX_MARKOV_THRESHOLD: user_options->markov_threshold = hc_strtoul (optarg, NULL, 10); break;
@ -3251,7 +3251,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
logfile_top_uint (user_options->loopback); logfile_top_uint (user_options->loopback);
logfile_top_uint (user_options->machine_readable); logfile_top_uint (user_options->machine_readable);
logfile_top_uint (user_options->markov_classic); logfile_top_uint (user_options->markov_classic);
logfile_top_uint (user_options->markov_disable); logfile_top_uint (user_options->markov);
logfile_top_uint (user_options->markov_inverse); logfile_top_uint (user_options->markov_inverse);
logfile_top_uint (user_options->markov_threshold); logfile_top_uint (user_options->markov_threshold);
logfile_top_uint (user_options->metal_compiler_runtime); logfile_top_uint (user_options->metal_compiler_runtime);