From aec6a3bc99b7477f21eb59046c02d516e8688e09 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 6 Jan 2019 12:04:42 +0100 Subject: [PATCH] Get rid of hash_mode depending branches in potfile.c --- src/potfile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/potfile.c b/src/potfile.c index f96375b49..f6972f5f6 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -617,8 +617,11 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx) u32 salts_cnt = hashes->salts_cnt; salt_t *salts_buf = hashes->salts_buf; - if (hashconfig->hash_mode == 3000) + if (hashconfig->opts_type & OPTS_TYPE_HASH_SPLIT) { + // this implementation will work for LM only + // however, LM is the only hash support which splits the password into multiple hashes + for (u32 salt_idx = 0; salt_idx < salts_cnt; salt_idx++) { salt_t *salt_buf = salts_buf + salt_idx; @@ -822,8 +825,11 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx) u32 salts_cnt = hashes->salts_cnt; salt_t *salts_buf = hashes->salts_buf; - if (hashconfig->hash_mode == 3000) + if (hashconfig->opts_type & OPTS_TYPE_HASH_SPLIT) { + // this implementation will work for LM only + // however, LM is the only hash support which splits the password into multiple hashes + for (u32 salt_idx = 0; salt_idx < salts_cnt; salt_idx++) { salt_t *salt_buf = salts_buf + salt_idx;