Refactor wordlist_autohex_disable variable to wordlist_autohex, same idea as outfile_autohex variable

pull/3893/head
jsteube 7 months ago
parent 632504d1b0
commit 4dceea914f

@ -717,7 +717,7 @@ typedef enum user_options_defaults
VERSION = false,
VERACRYPT_PIM_START = 485,
VERACRYPT_PIM_STOP = 485,
WORDLIST_AUTOHEX_DISABLE = false,
WORDLIST_AUTOHEX = true,
WORKLOAD_PROFILE = 2,
} user_options_defaults_t;
@ -2373,7 +2373,7 @@ typedef struct user_options
bool veracrypt_pim_start_chgd;
bool veracrypt_pim_stop_chgd;
bool version;
bool wordlist_autohex_disable;
bool wordlist_autohex;
#ifdef WITH_BRAIN
char *brain_host;
char *brain_password;

@ -209,9 +209,9 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_wordlist, sizeof (hex_wordlist));
const int wordlist_autohex_disable = user_options->wordlist_autohex_disable;
const int wordlist_autohex = user_options->wordlist_autohex;
XXH64_update (state, &wordlist_autohex_disable, sizeof (wordlist_autohex_disable));
XXH64_update (state, &wordlist_autohex, sizeof (wordlist_autohex));
if (user_options->encoding_from)
{
@ -259,9 +259,9 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_wordlist, sizeof (hex_wordlist));
const int wordlist_autohex_disable = user_options->wordlist_autohex_disable;
const int wordlist_autohex = user_options->wordlist_autohex;
XXH64_update (state, &wordlist_autohex_disable, sizeof (wordlist_autohex_disable));
XXH64_update (state, &wordlist_autohex, sizeof (wordlist_autohex));
if (user_options->encoding_from)
{
@ -409,9 +409,9 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_wordlist, sizeof (hex_wordlist));
const int wordlist_autohex_disable = user_options->wordlist_autohex_disable;
const int wordlist_autohex = user_options->wordlist_autohex;
XXH64_update (state, &wordlist_autohex_disable, sizeof (wordlist_autohex_disable));
XXH64_update (state, &wordlist_autohex, sizeof (wordlist_autohex));
if (user_options->encoding_from)
{
@ -504,9 +504,9 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_wordlist, sizeof (hex_wordlist));
const int wordlist_autohex_disable = user_options->wordlist_autohex_disable;
const int wordlist_autohex = user_options->wordlist_autohex;
XXH64_update (state, &wordlist_autohex_disable, sizeof (wordlist_autohex_disable));
XXH64_update (state, &wordlist_autohex, sizeof (wordlist_autohex));
if (user_options->encoding_from)
{
@ -549,9 +549,9 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx)
XXH64_update (state, &hex_wordlist, sizeof (hex_wordlist));
const int wordlist_autohex_disable = user_options->wordlist_autohex_disable;
const int wordlist_autohex = user_options->wordlist_autohex;
XXH64_update (state, &wordlist_autohex_disable, sizeof (wordlist_autohex_disable));
XXH64_update (state, &wordlist_autohex, sizeof (wordlist_autohex));
if (user_options->encoding_from)
{

@ -289,7 +289,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
user_options->veracrypt_pim_start = VERACRYPT_PIM_START;
user_options->veracrypt_pim_stop = VERACRYPT_PIM_STOP;
user_options->version = VERSION;
user_options->wordlist_autohex_disable = WORDLIST_AUTOHEX_DISABLE;
user_options->wordlist_autohex = WORDLIST_AUTOHEX;
user_options->workload_profile = WORKLOAD_PROFILE;
user_options->rp_files_cnt = 0;
user_options->rp_files = (char **) hccalloc (256, sizeof (char *));
@ -468,7 +468,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
case IDX_OUTFILE_JSON: user_options->outfile_json = true; break;
case IDX_OUTFILE_AUTOHEX_DISABLE: user_options->outfile_autohex = false; break;
case IDX_OUTFILE_CHECK_TIMER: user_options->outfile_check_timer = hc_strtoul (optarg, NULL, 10); break;
case IDX_WORDLIST_AUTOHEX_DISABLE: user_options->wordlist_autohex_disable = true; break;
case IDX_WORDLIST_AUTOHEX_DISABLE: user_options->wordlist_autohex = false; break;
case IDX_HEX_CHARSET: user_options->hex_charset = true; break;
case IDX_HEX_SALT: user_options->hex_salt = true; break;
case IDX_HEX_WORDLIST: user_options->hex_wordlist = true; break;
@ -3263,7 +3263,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
logfile_top_uint (user_options->outfile_check_timer);
logfile_top_uint (user_options->outfile_format);
logfile_top_uint (user_options->outfile_json);
logfile_top_uint (user_options->wordlist_autohex_disable);
logfile_top_uint (user_options->wordlist_autohex);
logfile_top_uint (user_options->potfile_disable);
logfile_top_uint (user_options->progress_only);
logfile_top_uint (user_options->quiet);

@ -37,7 +37,7 @@ size_t convert_from_hex (hashcat_ctx_t *hashcat_ctx, char *line_buf, const size_
return (i);
}
if (user_options->wordlist_autohex_disable == false)
if (user_options->wordlist_autohex == true)
{
if (is_hexify ((const u8 *) line_buf, line_len) == true)
{
@ -730,7 +730,7 @@ int wl_data_init (hashcat_ctx_t *hashcat_ctx)
}
else
{
if (user_options->wordlist_autohex_disable == false)
if (user_options->wordlist_autohex == true)
{
wl_data->func = get_next_word_lm_hex_or_text; // might be $HEX[] notation
}

Loading…
Cancel
Save