mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-31 18:11:01 +00:00
Update rp.c function parameters
This commit is contained in:
parent
0ea8b6f3d0
commit
29942f5fb3
@ -12,7 +12,7 @@
|
||||
|
||||
#define INCR_RULES 10000
|
||||
|
||||
#define RULES_MAX 32
|
||||
#define RULES_MAX 32
|
||||
#define MAX_KERNEL_RULES (RULES_MAX - 1)
|
||||
|
||||
bool class_num (const u8 c);
|
||||
@ -30,7 +30,7 @@ int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule);
|
||||
|
||||
bool kernel_rules_has_noop (const kernel_rule_t *kernel_rules_buf, const u32 kernel_rules_cnt);
|
||||
|
||||
int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options_t *user_options);
|
||||
int kernel_rules_generate (kernel_rule_t **out_buf, u32 *out_cnt, const user_options_t *user_options);
|
||||
int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32 *out_cnt);
|
||||
int kernel_rules_generate (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32 *out_cnt);
|
||||
|
||||
#endif // _RP_H
|
||||
|
8
src/rp.c
8
src/rp.c
@ -714,8 +714,10 @@ bool kernel_rules_has_noop (const kernel_rule_t *kernel_rules_buf, const u32 ker
|
||||
return false;
|
||||
}
|
||||
|
||||
int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options_t *user_options)
|
||||
int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32 *out_cnt)
|
||||
{
|
||||
const user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
/**
|
||||
* load rules
|
||||
*/
|
||||
@ -872,8 +874,10 @@ int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options
|
||||
return 0;
|
||||
}
|
||||
|
||||
int kernel_rules_generate (kernel_rule_t **out_buf, u32 *out_cnt, const user_options_t *user_options)
|
||||
int kernel_rules_generate (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32 *out_cnt)
|
||||
{
|
||||
const user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
u32 kernel_rules_cnt = 0;
|
||||
kernel_rule_t *kernel_rules_buf = mycalloc (user_options->rp_gen, sizeof (kernel_rule_t));
|
||||
|
||||
|
@ -67,13 +67,13 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
if (user_options->rp_files_cnt)
|
||||
{
|
||||
const int rc_kernel_load = kernel_rules_load (&straight_ctx->kernel_rules_buf, &straight_ctx->kernel_rules_cnt, user_options);
|
||||
const int rc_kernel_load = kernel_rules_load (hashcat_ctx, &straight_ctx->kernel_rules_buf, &straight_ctx->kernel_rules_cnt);
|
||||
|
||||
if (rc_kernel_load == -1) return -1;
|
||||
}
|
||||
else if (user_options->rp_gen)
|
||||
{
|
||||
const int rc_kernel_generate = kernel_rules_generate (&straight_ctx->kernel_rules_buf, &straight_ctx->kernel_rules_cnt, user_options);
|
||||
const int rc_kernel_generate = kernel_rules_generate (hashcat_ctx, &straight_ctx->kernel_rules_buf, &straight_ctx->kernel_rules_cnt);
|
||||
|
||||
if (rc_kernel_generate == -1) return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user