1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-31 10:58:49 +00:00

Merge pull request #3921 from roycewilliams/master

summarize invalid rule chains warnings
This commit is contained in:
Jens Steube 2025-06-14 22:39:51 +02:00 committed by GitHub
commit 681988ab8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -906,6 +906,7 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
}
u32 invalid_cnt = 0;
u32 valid_cnt = 0;
for (u32 i = 0; i < kernel_rules_cnt; i++)
{
@ -924,18 +925,27 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
{
if (out_pos == RULES_MAX - 1)
{
event_log_warning (hashcat_ctx, "Maximum functions per rule exceeded during chaining of rules, skipping...");
invalid_cnt++;
break;
}
else
{
valid_cnt++;
}
out->cmds[out_pos] = in->cmds[in_pos];
}
}
}
if (invalid_cnt > 0)
{
event_log_warning (hashcat_ctx, "Maximum functions per rule exceeded during chaining of rules.");
event_log_warning (hashcat_ctx, "Skipped %u rule chains, %u valid chains remain.", invalid_cnt, valid_cnt);
event_log_warning (hashcat_ctx, NULL);
}
hcfree (repeats);
kernel_rules_cnt -= invalid_cnt;