1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-27 02:18:21 +00:00

Solved --wordlist-autohex-disable not working correcly.

This commit is contained in:
b0lek 2021-12-11 21:14:45 +01:00 committed by GitHub
parent 8804c62d49
commit 2a3a840146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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); 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 // check if not $HEX[..] format
bool hex = true; 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) void get_next_word_uc (char *buf, u64 sz, u64 *len, u64 *off)
{ {
char *ptr = buf; 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_LM)
{ {
if (hashconfig->opts_type & OPTS_TYPE_PT_HEX){ 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 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
}
} }
} }