1 /** 2 * Author......: See docs/credits.txt 3 * License.....: MIT 4 */ 5 6 #ifndef _POTFILE_H 7 #define _POTFILE_H 8 9 #include <stdio.h> 10 #include <stddef.h> 11 #include <errno.h> 12 #include <search.h> 13 14 #define INCR_POT 1000 15 16 int potfile_init (hashcat_ctx_t *hashcat_ctx); 17 int potfile_read_open (hashcat_ctx_t *hashcat_ctx); 18 void potfile_read_close (hashcat_ctx_t *hashcat_ctx); 19 int potfile_write_open (hashcat_ctx_t *hashcat_ctx); 20 void potfile_write_close (hashcat_ctx_t *hashcat_ctx); 21 void potfile_write_append (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const int out_len, u8 *plain_ptr, unsigned int plain_len); 22 int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx); 23 void potfile_destroy (hashcat_ctx_t *hashcat_ctx); 24 int potfile_handle_show (hashcat_ctx_t *hashcat_ctx); 25 int potfile_handle_left (hashcat_ctx_t *hashcat_ctx); 26 27 void potfile_update_hash (hashcat_ctx_t *hashcat_ctx, hash_t *found, char *line_pw_buf, int line_pw_len); 28 void potfile_update_hashes (hashcat_ctx_t *hashcat_ctx, hash_t *hash_buf, char *line_pw_buf, int line_pw_len, pot_tree_entry_t *tree); 29 30 void pot_tree_destroy (pot_tree_entry_t *tree); 31 32 int sort_pot_tree_by_hash (const void *v1, const void *v2); 33 int sort_pot_orig_line (const void *v1, const void *v2); 34 35 #endif // _POTFILE_H 36