mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-29 03:18:30 +00:00
Improve Purge rule backwards compatibility (v2)
This commit is contained in:
parent
cedaef797a
commit
157782da66
4
src/rp.c
4
src/rp.c
@ -398,6 +398,10 @@ int cpu_rule_to_kernel_rule (char *rule_buf, u32 rule_len, kernel_rule_t *rule)
|
||||
}
|
||||
|
||||
switch (rule_buf[rule_pos+2]) {
|
||||
case '\'':
|
||||
SET_NAME (rule, rule_buf[rule_pos]);
|
||||
SET_P0 (rule, rule_buf[rule_pos]);
|
||||
break;
|
||||
case ' ':
|
||||
case '?':
|
||||
SET_NAME (rule, rule_buf[rule_pos]);
|
||||
|
@ -822,7 +822,7 @@ int _old_apply_rule (const char *rule, int rule_len, char in[RP_PASSWORD_SIZE],
|
||||
|
||||
if (rule_new[rule_pos] == '?')
|
||||
{
|
||||
if ((rule_pos + 1) == rule_len_new)
|
||||
if ((rule_pos + 1) == rule_len_new || ((rule_pos + 1) < rule_len_new && rule_new[rule_pos+1] == '\''))
|
||||
{
|
||||
out_len = mangle_purgechar (out, out_len, rule_new[rule_pos]);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user