Large but needed refactoring of mask handling, maskfiles, default mask, etc., expect smaller bugs
This commit is contained in:
+2
-2
@@ -1542,7 +1542,7 @@ void hashconfig_destroy (hashconfig_t *hashconfig);
|
||||
uint hashconfig_general_pw_min (hashconfig_t *hashconfig);
|
||||
uint hashconfig_general_pw_max (hashconfig_t *hashconfig);
|
||||
void hashconfig_general_defaults (hashconfig_t *hashconfig, hashes_t *hashes, const user_options_t *user_options);
|
||||
void hashconfig_benchmark_defaults (hashconfig_t *hashconfig, salt_t *salt, void *esalt);
|
||||
char *hashconfig_benchmark_mask (hashconfig_t *hashconfig);
|
||||
void hashconfig_benchmark_defaults (const hashconfig_t *hashconfig, salt_t *salt, void *esalt);
|
||||
char *hashconfig_benchmark_mask (const hashconfig_t *hashconfig);
|
||||
|
||||
#endif // _INTERFACE_H
|
||||
|
||||
+5
-3
@@ -24,12 +24,11 @@ void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHA
|
||||
void mp_cut_at (char *mask, uint max);
|
||||
uint mp_get_length (char *mask);
|
||||
void mp_exec (u64 val, char *buf, cs_t *css, int css_cnt);
|
||||
cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, uint *css_cnt, hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, uint *css_cnt, const hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
u64 mp_get_sum (uint css_cnt, cs_t *css);
|
||||
void mp_setup_sys (cs_t *mp_sys);
|
||||
void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, uint index, hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, uint index, const hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
void mp_reset_usr (cs_t *mp_usr, uint index);
|
||||
char *mp_get_truncated_mask (char *mask_buf, size_t mask_len, uint len, const user_options_t *user_options);
|
||||
|
||||
u64 sp_get_sum (uint start, uint stop, cs_t *root_css_buf);
|
||||
void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint start, uint stop);
|
||||
@@ -39,4 +38,7 @@ 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 restore_ctx_t *restore_ctx, const hashconfig_t *hashconfig);
|
||||
void mask_ctx_destroy (mask_ctx_t *mask_ctx);
|
||||
|
||||
#endif // _MPSP_H
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ void writeProgramBin (char *dst, u8 *binary, size_t binary_size);
|
||||
|
||||
int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
|
||||
|
||||
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const rules_ctx_t *rules_ctx, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration);
|
||||
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const rules_ctx_t *rules_ctx, const mask_ctx_t *mask_ctx, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration);
|
||||
int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num, const uint event_update, const uint iteration, hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
int run_kernel_mp (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num);
|
||||
int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param);
|
||||
@@ -33,7 +33,7 @@ int run_kernel_bzero (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
|
||||
|
||||
int run_copy (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const uint pws_cnt);
|
||||
|
||||
int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, hashes_t *hashes, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx, const uint pws_cnt);
|
||||
int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, hashes_t *hashes, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx, const mask_ctx_t *mask_ctx, const uint pws_cnt);
|
||||
|
||||
int opencl_ctx_init (opencl_ctx_t *opencl_ctx, const user_options_t *user_options);
|
||||
void opencl_ctx_destroy (opencl_ctx_t *opencl_ctx);
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
|
||||
double get_avg_exec_time (hc_device_param_t *device_param, const int last_num_entries);
|
||||
|
||||
void status_display_machine_readable (opencl_ctx_t *opencl_ctx, const hashes_t *hashes, const restore_ctx_t *restore_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx);
|
||||
void status_display (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, const hashes_t *hashes, const restore_ctx_t *restore_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx);
|
||||
void status_display_machine_readable (opencl_ctx_t *opencl_ctx, const hashes_t *hashes, const restore_ctx_t *restore_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx, const mask_ctx_t *mask_ctx);
|
||||
void status_display (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, const hashes_t *hashes, const restore_ctx_t *restore_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx, const mask_ctx_t *mask_ctx);
|
||||
void status_benchmark_automate (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig);
|
||||
void status_benchmark (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
|
||||
|
||||
+1
-1
@@ -20,6 +20,6 @@
|
||||
#include <pwd.h>
|
||||
#endif // _POSIX
|
||||
|
||||
void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const rules_ctx_t *rules_ctx, const uint pws_cnt);
|
||||
void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const rules_ctx_t *rules_ctx, const mask_ctx_t *mask_ctx, const uint pws_cnt);
|
||||
|
||||
#endif // _STDOUT_H
|
||||
|
||||
+29
-12
@@ -866,7 +866,7 @@ typedef struct
|
||||
u32 pid;
|
||||
|
||||
u32 dictpos;
|
||||
u32 maskpos;
|
||||
u32 masks_pos;
|
||||
|
||||
u64 words_cur;
|
||||
|
||||
@@ -1114,6 +1114,33 @@ typedef struct
|
||||
|
||||
} induct_ctx_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cs_t mp_sys[6];
|
||||
cs_t mp_usr[4];
|
||||
|
||||
u32 bfs_cnt;
|
||||
|
||||
cs_t *css_buf;
|
||||
u32 css_cnt;
|
||||
|
||||
hcstat_table_t *root_table_buf;
|
||||
hcstat_table_t *markov_table_buf;
|
||||
|
||||
cs_t *root_css_buf;
|
||||
cs_t *markov_css_buf;
|
||||
|
||||
bool mask_from_file;
|
||||
|
||||
char **masks;
|
||||
u32 masks_pos;
|
||||
u32 masks_cnt;
|
||||
u32 masks_avail;
|
||||
|
||||
char *mask;
|
||||
|
||||
} mask_ctx_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
@@ -1153,14 +1180,6 @@ typedef struct
|
||||
u32 combs_mode;
|
||||
u32 combs_cnt;
|
||||
|
||||
u32 bfs_cnt;
|
||||
|
||||
u32 css_cnt;
|
||||
cs_t *css_buf;
|
||||
|
||||
cs_t *root_css_buf;
|
||||
cs_t *markov_css_buf;
|
||||
|
||||
/**
|
||||
* hardware watchdog
|
||||
*/
|
||||
@@ -1186,9 +1205,6 @@ typedef struct
|
||||
|
||||
char *dictfile;
|
||||
char *dictfile2;
|
||||
char *mask;
|
||||
u32 maskcnt;
|
||||
u32 maskpos;
|
||||
u32 pw_min;
|
||||
u32 pw_max;
|
||||
|
||||
@@ -1208,6 +1224,7 @@ typedef struct
|
||||
logfile_ctx_t *logfile_ctx;
|
||||
rules_ctx_t *rules_ctx;
|
||||
restore_ctx_t *restore_ctx;
|
||||
mask_ctx_t *mask_ctx;
|
||||
|
||||
/**
|
||||
* status, timer
|
||||
|
||||
Reference in New Issue
Block a user