mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-05 15:48:48 +00:00
Skip generated rule that was the result of chaining rule operation and caused this generated rule to exceed the maximum number of function calls
This commit is contained in:
parent
6d437a6430
commit
42f574646e
@ -36,6 +36,7 @@
|
|||||||
- Fixed keys extraction in luks2hashcat - now extracts all active keys
|
- Fixed keys extraction in luks2hashcat - now extracts all active keys
|
||||||
- Prevent Hashcat from hanging by checking during startup that the output file is a named pipe
|
- Prevent Hashcat from hanging by checking during startup that the output file is a named pipe
|
||||||
- Fixed debug mode 5 by adding the missing colon between original-word and finding-rule
|
- Fixed debug mode 5 by adding the missing colon between original-word and finding-rule
|
||||||
|
- Skip generated rule that was the result of chaining rule operation and caused this generated rule to exceed the maximum number of function calls
|
||||||
|
|
||||||
##
|
##
|
||||||
## Technical
|
## Technical
|
||||||
|
10
src/rp.c
10
src/rp.c
@ -905,11 +905,13 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 invalid_cnt = 0;
|
||||||
|
|
||||||
for (u32 i = 0; i < kernel_rules_cnt; i++)
|
for (u32 i = 0; i < kernel_rules_cnt; i++)
|
||||||
{
|
{
|
||||||
u32 out_pos = 0;
|
u32 out_pos = 0;
|
||||||
|
|
||||||
kernel_rule_t *out = &kernel_rules_buf[i];
|
kernel_rule_t *out = &kernel_rules_buf[i - invalid_cnt];
|
||||||
|
|
||||||
for (u32 j = 0; j < user_options->rp_files_cnt; j++)
|
for (u32 j = 0; j < user_options->rp_files_cnt; j++)
|
||||||
{
|
{
|
||||||
@ -922,7 +924,9 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
|
|||||||
{
|
{
|
||||||
if (out_pos == RULES_MAX - 1)
|
if (out_pos == RULES_MAX - 1)
|
||||||
{
|
{
|
||||||
// event_log_warning (hashcat_ctx, "Truncated chaining of rules %d and %d - maximum functions per rule exceeded.", i, in_off);
|
event_log_warning (hashcat_ctx, "Maximum functions per rule exceeded during chaining of rules, skipping...");
|
||||||
|
|
||||||
|
invalid_cnt++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -934,6 +938,8 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
|
|||||||
|
|
||||||
hcfree (repeats);
|
hcfree (repeats);
|
||||||
|
|
||||||
|
kernel_rules_cnt -= invalid_cnt;
|
||||||
|
|
||||||
hcfree (all_kernel_rules_cnt);
|
hcfree (all_kernel_rules_cnt);
|
||||||
hcfree (all_kernel_rules_buf);
|
hcfree (all_kernel_rules_buf);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user