1
mirror of https://github.com/hashcat/hashcat synced 2024-11-24 14:27:14 +01:00

Backport -m 19500 fix to -m 19300

This commit is contained in:
Jens Steube 2019-04-29 12:26:22 +02:00
parent 922fa2e351
commit 6caa78695f

View File

@ -9,6 +9,7 @@
#include "bitops.h"
#include "convert.h"
#include "shared.h"
#include "emu_inc_hash_md5.h"
static const u32 ATTACK_EXEC = ATTACK_EXEC_INSIDE_KERNEL;
static const u32 DGST_POS0 = 3;
@ -125,10 +126,17 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
// make salt sorter happy
salt->salt_buf[0] = sha1_double_salt->salt1_buf[0] ^ sha1_double_salt->salt2_buf[0];
salt->salt_buf[1] = sha1_double_salt->salt1_buf[1] ^ sha1_double_salt->salt2_buf[1];
salt->salt_buf[2] = sha1_double_salt->salt1_buf[2] ^ sha1_double_salt->salt2_buf[2];
salt->salt_buf[3] = sha1_double_salt->salt1_buf[3] ^ sha1_double_salt->salt2_buf[3];
md5_ctx_t md5_ctx;
md5_init (&md5_ctx);
md5_update (&md5_ctx, sha1_double_salt->salt1_buf, sha1_double_salt->salt1_len);
md5_update (&md5_ctx, sha1_double_salt->salt2_buf, sha1_double_salt->salt2_len);
md5_final (&md5_ctx);
salt->salt_buf[0] = md5_ctx.h[0];
salt->salt_buf[1] = md5_ctx.h[1];
salt->salt_buf[2] = md5_ctx.h[2];
salt->salt_buf[3] = md5_ctx.h[3];
salt->salt_len = 16;