Move maskprocessor and statusprocessor specific functions into their own source file
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Author......: Jens Steube <jens.steube@gmail.com>
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define CHARSIZ 0x100
|
||||
|
||||
#define SP_HCSTAT "hashcat.hcstat"
|
||||
#define SP_PW_MIN 2
|
||||
#define SP_PW_MAX 64
|
||||
#define SP_ROOT_CNT (SP_PW_MAX * CHARSIZ)
|
||||
#define SP_MARKOV_CNT (SP_PW_MAX * CHARSIZ * CHARSIZ)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint cs_buf[0x100];
|
||||
uint cs_len;
|
||||
|
||||
} cs_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint key;
|
||||
u64 val;
|
||||
|
||||
} hcstat_table_t;
|
||||
|
||||
void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
void mp_cut_at (char *mask, uint max);
|
||||
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);
|
||||
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);
|
||||
void mp_reset_usr (cs_t *mp_usr, uint index);
|
||||
char *mp_get_truncated_mask (char *mask_buf, size_t mask_len, uint len);
|
||||
|
||||
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);
|
||||
int sp_comp_val (const void *p1, const void *p2);
|
||||
void sp_setup_tbl (const char *install_dir, char *hcstat, uint disable, uint classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf);
|
||||
void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint threshold, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
|
||||
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);
|
||||
@@ -66,22 +66,14 @@ static inline int CPU_ISSET (int num, cpu_set_t *cs) { return (cs->count & (1 <
|
||||
|
||||
#define BLOCK_SIZE 64
|
||||
|
||||
#define CHARSIZ 0x100
|
||||
#define INFOSZ CHARSIZ
|
||||
|
||||
#define SP_HCSTAT "hashcat.hcstat"
|
||||
#define SP_PW_MIN 2
|
||||
#define SP_PW_MAX 64
|
||||
#define SP_ROOT_CNT (SP_PW_MAX * CHARSIZ)
|
||||
#define SP_MARKOV_CNT (SP_PW_MAX * CHARSIZ * CHARSIZ)
|
||||
|
||||
#define TUNING_DB_FILE "hashcat.hctune"
|
||||
|
||||
#define INDUCT_DIR "induct"
|
||||
#define OUTFILES_DIR "outfiles"
|
||||
|
||||
#define LOOPBACK_FILE "hashcat.loopback"
|
||||
|
||||
#define DICTSTAT_FILENAME "hashcat.dictstat"
|
||||
#define POTFILE_FILENAME "hashcat.pot"
|
||||
|
||||
@@ -222,24 +214,6 @@ void set_cpu_affinity (char *cpu_affinity);
|
||||
void usage_mini_print (const char *progname);
|
||||
void usage_big_print (const char *progname);
|
||||
|
||||
void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
void mp_cut_at (char *mask, uint max);
|
||||
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);
|
||||
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);
|
||||
void mp_reset_usr (cs_t *mp_usr, uint index);
|
||||
char *mp_get_truncated_mask (char *mask_buf, size_t mask_len, uint len);
|
||||
|
||||
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);
|
||||
int sp_comp_val (const void *p1, const void *p2);
|
||||
void sp_setup_tbl (const char *install_dir, char *hcstat, uint disable, uint classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf);
|
||||
void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint threshold, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
|
||||
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);
|
||||
|
||||
void tuning_db_destroy (tuning_db_t *tuning_db);
|
||||
tuning_db_t *tuning_db_alloc (FILE *fp);
|
||||
tuning_db_t *tuning_db_init (const char *tuning_db_file);
|
||||
|
||||
@@ -193,20 +193,6 @@ typedef struct
|
||||
|
||||
} hash_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint key;
|
||||
u64 val;
|
||||
|
||||
} hcstat_table_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint cs_buf[0x100];
|
||||
uint cs_len;
|
||||
|
||||
} cs_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char plain_buf[256];
|
||||
|
||||
Reference in New Issue
Block a user