mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 07:08:19 +00:00
Update mpsp.c function parameters
This commit is contained in:
parent
d9c1c89a57
commit
1610a3565c
@ -41,9 +41,8 @@ void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_tabl
|
||||
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
|
||||
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);
|
||||
|
||||
int mask_ctx_init (mask_ctx_t *mask_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const folder_config_t *folder_config, const hashconfig_t *hashconfig);
|
||||
void mask_ctx_destroy (mask_ctx_t *mask_ctx);
|
||||
|
||||
int mask_ctx_parse_maskfile (mask_ctx_t *mask_ctx, user_options_t *user_options, const hashconfig_t *hashconfig);
|
||||
int mask_ctx_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void mask_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
int mask_ctx_parse_maskfile (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
#endif // _MPSP_H
|
||||
|
@ -621,7 +621,7 @@ static int inner1_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
mask_ctx->mask = mask_ctx->masks[mask_ctx->masks_pos];
|
||||
|
||||
const int rc_mask_file = mask_ctx_parse_maskfile (mask_ctx, user_options, hashconfig);
|
||||
const int rc_mask_file = mask_ctx_parse_maskfile (hashcat_ctx);
|
||||
|
||||
if (rc_mask_file == -1) return -1;
|
||||
|
||||
@ -648,7 +648,7 @@ static int inner1_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
mask_ctx->mask = mask_ctx->masks[mask_ctx->masks_pos];
|
||||
|
||||
const int rc_mask_file = mask_ctx_parse_maskfile (mask_ctx, user_options, hashconfig);
|
||||
const int rc_mask_file = mask_ctx_parse_maskfile (hashcat_ctx);
|
||||
|
||||
if (rc_mask_file == -1) return -1;
|
||||
|
||||
@ -941,7 +941,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
* charsets : keep them together for more easy maintainnce
|
||||
*/
|
||||
|
||||
const int rc_mask_init = mask_ctx_init (mask_ctx, user_options, user_options_extra, folder_config, hashconfig);
|
||||
const int rc_mask_init = mask_ctx_init (hashcat_ctx);
|
||||
|
||||
if (rc_mask_init == -1) return -1;
|
||||
|
||||
@ -1220,7 +1220,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
bitmap_ctx_destroy (hashcat_ctx);
|
||||
|
||||
mask_ctx_destroy (mask_ctx);
|
||||
mask_ctx_destroy (hashcat_ctx);
|
||||
|
||||
combinator_ctx_destroy (hashcat_ctx);
|
||||
|
||||
|
18
src/mpsp.c
18
src/mpsp.c
@ -964,8 +964,14 @@ static void mask_append (mask_ctx_t *mask_ctx, const user_options_t *user_option
|
||||
}
|
||||
}
|
||||
|
||||
int mask_ctx_init (mask_ctx_t *mask_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const folder_config_t *folder_config, const hashconfig_t *hashconfig)
|
||||
int mask_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
folder_config_t *folder_config = hashcat_ctx->folder_config;
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
||||
user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra;
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
mask_ctx->enabled = false;
|
||||
|
||||
if (user_options->left == true) return 0;
|
||||
@ -1206,8 +1212,10 @@ int mask_ctx_init (mask_ctx_t *mask_ctx, const user_options_t *user_options, con
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mask_ctx_destroy (mask_ctx_t *mask_ctx)
|
||||
void mask_ctx_destroy (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
||||
|
||||
if (mask_ctx->enabled == false) return;
|
||||
|
||||
myfree (mask_ctx->css_buf);
|
||||
@ -1230,8 +1238,12 @@ void mask_ctx_destroy (mask_ctx_t *mask_ctx)
|
||||
memset (mask_ctx, 0, sizeof (mask_ctx_t));
|
||||
}
|
||||
|
||||
int mask_ctx_parse_maskfile (mask_ctx_t *mask_ctx, user_options_t *user_options, const hashconfig_t *hashconfig)
|
||||
int mask_ctx_parse_maskfile (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
if (mask_ctx->enabled == false) return 0;
|
||||
|
||||
if (mask_ctx->mask_from_file == false) return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user