mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-11 00:01:16 +00:00
Make wordlist support modular
This commit is contained in:
parent
eb6dffd52a
commit
fe289da141
@ -1003,6 +1003,8 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
char *buf;
|
||||
u32 incr;
|
||||
u32 avail;
|
||||
|
@ -1779,10 +1779,10 @@ int main (int argc, char **argv)
|
||||
|
||||
tuning_db_t *tuning_db = (tuning_db_t *) mymalloc (sizeof (tuning_db_t));
|
||||
|
||||
const int rc_tuning_db = tuning_db_init (tuning_db, user_options, folder_config);
|
||||
|
||||
data.tuning_db = tuning_db;
|
||||
|
||||
const int rc_tuning_db = tuning_db_init (tuning_db, user_options, folder_config);
|
||||
|
||||
if (rc_tuning_db == -1) return -1;
|
||||
|
||||
/**
|
||||
|
@ -402,6 +402,17 @@ u64 count_words (wl_data_t *wl_data, const user_options_t *user_options, const u
|
||||
|
||||
void wl_data_init (wl_data_t *wl_data, const user_options_t *user_options, const hashconfig_t *hashconfig)
|
||||
{
|
||||
wl_data->enabled = false;
|
||||
|
||||
if (user_options->benchmark == true) return;
|
||||
if (user_options->keyspace == true) return;
|
||||
if (user_options->left == true) return;
|
||||
if (user_options->show == true) return;
|
||||
if (user_options->usage == true) return;
|
||||
if (user_options->version == true) return;
|
||||
|
||||
wl_data->enabled = true;
|
||||
|
||||
wl_data->buf = (char *) mymalloc (user_options->segment_size);
|
||||
wl_data->avail = user_options->segment_size;
|
||||
wl_data->incr = user_options->segment_size;
|
||||
@ -427,6 +438,8 @@ void wl_data_init (wl_data_t *wl_data, const user_options_t *user_options, const
|
||||
|
||||
void wl_data_destroy (wl_data_t *wl_data)
|
||||
{
|
||||
if (wl_data->enabled == false) return;
|
||||
|
||||
myfree (wl_data->buf);
|
||||
|
||||
wl_data->func = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user