From 7557f884c50b0113ac3780d15114575184a47926 Mon Sep 17 00:00:00 2001 From: philsmd <921533+philsmd@users.noreply.github.com> Date: Sat, 13 Apr 2019 09:28:14 +0200 Subject: [PATCH] outfile remove: fix hash parsing The feature to add cracks to hashcat.outfiles/ wasn't working correctly with the latest betas because the hash:pass was not split correctly and therefore not correctly passed to the parsing function. The whole line was passed instead of only the hash. This should fix the problem of splitting the lines and therefore correctly parsing the outfiles. Thanks --- src/outfile_check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/outfile_check.c b/src/outfile_check.c index 28fa4ff11..4a63e77c8 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -230,7 +230,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) { void *tmps = hcmalloc (hashconfig->tmp_size); - parser_status = module_ctx->module_hash_decode_potfile (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_len - 1, tmps); + parser_status = module_ctx->module_hash_decode_potfile (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len, tmps); hcfree (tmps); } @@ -238,7 +238,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) { // "normal" case: hash in the outfile is the same as the hash in the original hash file - parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_len - 1); + parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len); } if (parser_status != PARSER_OK) continue;