From f218e85c4d977716adbffb5eee06006e7ff66fd5 Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 1 Dec 2016 17:28:19 +0100 Subject: [PATCH] Fix -m 7300 hash output from ascii_digest() --- src/interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interface.c b/src/interface.c index 20eb33983..2f1e08582 100644 --- a/src/interface.c +++ b/src/interface.c @@ -14099,9 +14099,11 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_le u32 i; u32 j; - for (i = 0, j = 0; (i * 4) < rakp->salt_len; i += 1, j += 8) + u8 *ptr = (u8 *) rakp->salt_buf; + + for (i = 0, j = 0; i < rakp->salt_len; i += 1, j += 2) { - snprintf (out_buf + j, out_len - 1 - j, "%08x", rakp->salt_buf[i]); + snprintf (out_buf + j, out_len - 1 - j, "%02x", ptr[i ^ 3]); // the ^ 3 index converts LE -> BE } snprintf (out_buf + j, out_len - 1 - j, ":%08x%08x%08x%08x%08x",