From 2a3a840146638e6433b8daa5f667451172173c57 Mon Sep 17 00:00:00 2001 From: b0lek <95943440+b0lek@users.noreply.github.com> Date: Sat, 11 Dec 2021 21:14:45 +0100 Subject: [PATCH] Solved --wordlist-autohex-disable not working correcly. --- src/wordlist.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/wordlist.c b/src/wordlist.c index f8bfb2d53..099537c74 100644 --- a/src/wordlist.c +++ b/src/wordlist.c @@ -134,7 +134,7 @@ void get_next_word_lm_hex (char *buf, u64 sz, u64 *len, u64 *off) get_next_word_lm_gen(buf, sz, len, off, 14); } -void get_next_word_lm_text (char *buf, u64 sz, u64 *len, u64 *off) +void get_next_word_lm_hex_or_text (char *buf, u64 sz, u64 *len, u64 *off) { // check if not $HEX[..] format bool hex = true; @@ -168,6 +168,11 @@ void get_next_word_lm_text (char *buf, u64 sz, u64 *len, u64 *off) } } +void get_next_word_lm_text (char *buf, u64 sz, u64 *len, u64 *off) +{ + get_next_word_lm_gen(buf, sz, len, off, 7); +} + void get_next_word_uc (char *buf, u64 sz, u64 *len, u64 *off) { char *ptr = buf; @@ -656,11 +661,16 @@ int wl_data_init (hashcat_ctx_t *hashcat_ctx) if (hashconfig->opts_type & OPTS_TYPE_PT_LM) { if (hashconfig->opts_type & OPTS_TYPE_PT_HEX){ - wl_data->func = get_next_word_lm_hex; + wl_data->func = get_next_word_lm_hex; // all hex in file } else { - wl_data->func = get_next_word_lm_text; + if (user_options->wordlist_autohex_disable == false) + { + wl_data->func = get_next_word_lm_hex_or_text; // might be $HEX[] notation + }else{ + wl_data->func = get_next_word_lm_text; // treat as nromal text + } } }