mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 09:58:16 +00:00
Allow words of length > 32 in wordlists for -a 0 for slow hashes if no rules are in use or a : rule is in the rulefile
This commit is contained in:
parent
bc75ba70a1
commit
30371bef10
@ -18,6 +18,28 @@ __kernel void amp (__global pw_t *pws, __global pw_t *pws_amp, __global kernel_r
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
if (rules_buf[0].cmds[0] == RULE_OP_MANGLE_NOOP && rules_buf[0].cmds[1] == 0)
|
||||
{
|
||||
pws_amp[gid].i[ 0] = pws[gid].i[ 0];
|
||||
pws_amp[gid].i[ 1] = pws[gid].i[ 1];
|
||||
pws_amp[gid].i[ 2] = pws[gid].i[ 2];
|
||||
pws_amp[gid].i[ 3] = pws[gid].i[ 3];
|
||||
pws_amp[gid].i[ 4] = pws[gid].i[ 4];
|
||||
pws_amp[gid].i[ 5] = pws[gid].i[ 5];
|
||||
pws_amp[gid].i[ 6] = pws[gid].i[ 6];
|
||||
pws_amp[gid].i[ 7] = pws[gid].i[ 7];
|
||||
pws_amp[gid].i[ 8] = pws[gid].i[ 8];
|
||||
pws_amp[gid].i[ 9] = pws[gid].i[ 9];
|
||||
pws_amp[gid].i[10] = pws[gid].i[10];
|
||||
pws_amp[gid].i[11] = pws[gid].i[11];
|
||||
pws_amp[gid].i[12] = pws[gid].i[12];
|
||||
pws_amp[gid].i[13] = pws[gid].i[13];
|
||||
pws_amp[gid].i[14] = pws[gid].i[14];
|
||||
pws_amp[gid].i[15] = pws[gid].i[15];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
u32 w0[4];
|
||||
u32 w1[4];
|
||||
|
||||
|
@ -3683,17 +3683,6 @@ int main (int argc, char **argv)
|
||||
uint pw_min = hashconfig_general_pw_min (hashconfig);
|
||||
uint pw_max = hashconfig_general_pw_max (hashconfig);
|
||||
|
||||
if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
|
||||
{
|
||||
switch (attack_kern)
|
||||
{
|
||||
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
|
||||
break;
|
||||
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* charsets : keep them together for more easy maintainnce
|
||||
*/
|
||||
@ -4988,6 +4977,48 @@ int main (int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* If we have a NOOP rule then we can process words from wordlists > length 32 for slow hashes
|
||||
*/
|
||||
|
||||
int has_noop = 0;
|
||||
|
||||
for (uint kernel_rules_pos = 0; kernel_rules_pos < kernel_rules_cnt; kernel_rules_pos++)
|
||||
{
|
||||
if (kernel_rules_buf[kernel_rules_pos].cmds[0] != RULE_OP_MANGLE_NOOP) continue;
|
||||
if (kernel_rules_buf[kernel_rules_pos].cmds[1] != 0) continue;
|
||||
|
||||
has_noop = 1;
|
||||
}
|
||||
|
||||
if (has_noop == 0)
|
||||
{
|
||||
switch (attack_kern)
|
||||
{
|
||||
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
|
||||
break;
|
||||
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
|
||||
{
|
||||
switch (attack_kern)
|
||||
{
|
||||
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
|
||||
break;
|
||||
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// in this case we can process > 32
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OpenCL platforms: detect
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user