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:
parent
a1cad1108e
commit
a183b5132b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user