1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Fixed 'E' rule in pure kernel mode which was ignoring letters that are in positions that are multiples of 4

This commit is contained in:
Jens Steube 2021-06-13 15:49:11 +02:00
parent c6b10bb0b6
commit 8ebf4b9858
2 changed files with 18 additions and 13 deletions

View File

@ -688,7 +688,9 @@ DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const
DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len)
{
if ((len + 4) >= RP_PASSWORD_SIZE) return (len); // cheap way to not need to check for overflow of i + 1
if (len >= RP_PASSWORD_SIZE) return (len);
u32 rem = 0xff;
for (int i = 0, idx = 0; i < len; i += 4, idx += 1)
{
@ -696,22 +698,18 @@ DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p
buf[idx] = t | generate_cmask (t);
u32 out0 = 0;
u32 out1 = 0;
u32 out = rem;
if (((t >> 0) & 0xff) == p0) out0 |= 0x0000ff00;
if (((t >> 8) & 0xff) == p0) out0 |= 0x00ff0000;
if (((t >> 16) & 0xff) == p0) out0 |= 0xff000000;
if (((t >> 24) & 0xff) == p0) out1 |= 0x000000ff;
rem = 0;
buf[idx + 0] &= ~(generate_cmask (buf[idx + 0]) & out0);
buf[idx + 1] &= ~(generate_cmask (buf[idx + 1]) & out1);
if (((t >> 0) & 0xff) == p0) out |= 0x0000ff00;
if (((t >> 8) & 0xff) == p0) out |= 0x00ff0000;
if (((t >> 16) & 0xff) == p0) out |= 0xff000000;
if (((t >> 24) & 0xff) == p0) rem |= 0x000000ff;
buf[idx] &= ~(generate_cmask (buf[idx]) & out);
}
const u32 t = buf[0];
buf[0] = t & ~(0x00000020 & generate_cmask (t));
return (len);
}

View File

@ -1,5 +1,12 @@
* changes v6.2.2 -> v6.2.x
##
## Bugs
##
- Fixed 'E' rule in pure kernel mode which was ignoring letters that are in positions that are multiples of 4
* changes v6.2.1 -> v6.2.2
##