1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-13 19:28:56 +00:00

Fix for -m 1100

This commit is contained in:
jsteube 2019-02-10 09:40:52 +01:00
parent a1cad1108e
commit a183b5132b

View File

@ -135,9 +135,25 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
out_len += 1;
memcpy (out_buf + out_len, salt->salt_buf, salt->salt_len);
const u8 *ptr = (const u8 *) salt->salt_buf;
out_len += salt->salt_len;
if (hashconfig->opts_type & OPTS_TYPE_ST_UTF16LE)
{
for (u32 i = 0; i < salt->salt_len; i += 2)
{
out_buf[out_len] = ptr[i];
out_len++;
}
out_buf[out_len] = 0;
}
else
{
memcpy (out_buf + out_len, salt->salt_buf, salt->salt_len);
out_len += salt->salt_len;
}
return out_len;
}