| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
#ifndef OPHCRACK_H |
| 33 |
#define OPHCRACK_H |
| 34 |
|
| 35 |
#include "misc.h" |
| 36 |
#include "scheduler.h" |
| 37 |
#include "list.h" |
| 38 |
#include "table.h" |
| 39 |
#include "hash.h" |
| 40 |
#include "ophtask.h" |
| 41 |
#include "ophstat.h" |
| 42 |
#include "arg.h" |
| 43 |
|
| 44 |
#ifdef __cplusplus |
| 45 |
extern "C" { |
| 46 |
#endif |
| 47 |
|
| 48 |
typedef struct ophcrack_t_ { |
| 49 |
scheduler_t *sched; |
| 50 |
|
| 51 |
list_t *tables; |
| 52 |
list_t *hashes; |
| 53 |
list_t *active; |
| 54 |
list_t *enabled; |
| 55 |
list_t *remaining; |
| 56 |
|
| 57 |
list_nd_t *hnd; |
| 58 |
ophstat_t *stat; |
| 59 |
|
| 60 |
int maxtid; |
| 61 |
int maxhid; |
| 62 |
table_kind_t maxtkind; |
| 63 |
|
| 64 |
int npwds_total; |
| 65 |
int npwds_found; |
| 66 |
|
| 67 |
uint64_t (*find_freeram)(void); |
| 68 |
uint64_t freeram; |
| 69 |
|
| 70 |
arg_t *arg; |
| 71 |
} ophcrack_t; |
| 72 |
|
| 73 |
ophcrack_t *ophcrack_alloc(int nthreads, arg_t *arg); |
| 74 |
void ophcrack_free(ophcrack_t *crack); |
| 75 |
void ophcrack_start(ophcrack_t *crack); |
| 76 |
void ophcrack_stop(ophcrack_t *crack); |
| 77 |
|
| 78 |
int ophcrack_setup_table(table_t *tbl); |
| 79 |
void ophcrack_add_table(ophcrack_t *crack, table_t *tbl); |
| 80 |
void ophcrack_add_hash(ophcrack_t *crack, hash_t *hsh); |
| 81 |
void ophcrack_associate(ophcrack_t *crack, hash_t *hsh, table_t *tbl); |
| 82 |
void ophcrack_reset(ophcrack_t *crack, int kind_mask, int remove); |
| 83 |
|
| 84 |
void *ophcrack_run(void *arg); |
| 85 |
void ophcrack_preload_check(ophcrack_t *crack); |
| 86 |
|
| 87 |
ophtask_t *ophcrack_find(ophcrack_t *crack, ophtask_t *task, int id); |
| 88 |
ophtask_t *ophcrack_lookup_idx(ophcrack_t *crack, ophtask_t *task, int id); |
| 89 |
ophtask_t *ophcrack_lookup_end(ophcrack_t *crack, ophtask_t *task, int id); |
| 90 |
ophtask_t *ophcrack_lookup_srt(ophcrack_t *crack, ophtask_t *task, int id); |
| 91 |
ophtask_t *ophcrack_check(ophcrack_t *crack, ophtask_t *task, int id); |
| 92 |
ophtask_t *ophcrack_preload_all(ophcrack_t *crack, ophtask_t *task, int id); |
| 93 |
ophtask_t *ophcrack_preload_one(ophcrack_t *crack, ophtask_t *task, int id); |
| 94 |
ophtask_t *ophcrack_bforce_all(ophcrack_t *crack, ophtask_t *task, int id); |
| 95 |
ophtask_t *ophcrack_resolve_nt(ophcrack_t *crack, ophtask_t *task, int id); |
| 96 |
ophtask_t *ophcrack_bforce_nt(ophcrack_t *crack, ophtask_t *task, int id); |
| 97 |
ophtask_t *ophcrack_bforce_lm(ophcrack_t *crack, ophtask_t *task, int id); |
| 98 |
ophtask_t *ophcrack_unload(ophcrack_t *crack, ophtask_t *task, int id); |
| 99 |
|
| 100 |
void ophcrack_update(ophcrack_t *crack); |
| 101 |
void ophcrack_found(ophcrack_t *crack, hash_t *hsh, table_t *tbl, int col, char *pwd); |
| 102 |
void ophcrack_notfound(ophcrack_t *crack, hash_t *hsh); |
| 103 |
|
| 104 |
int ophcrack_has_next(ophcrack_t *crack); |
| 105 |
ophtask_t *ophcrack_next(ophcrack_t *crack); |
| 106 |
void ophcrack_save(ophcrack_t *crack, FILE *file, int nice, int status); |
| 107 |
void ophcrack_export_csv(ophcrack_t *crack, FILE *file, int *fields, char separator, char quote); |
| 108 |
|
| 109 |
int ophcrack_pwd_cmp(const void *a, const void *b); |
| 110 |
int ophcrack_col_cmp(const void *a, const void *b); |
| 111 |
char *lm_from_nt(const char *pwd, int n, const uchar_t *lmhash); |
| 112 |
|
| 113 |
#ifdef __cplusplus |
| 114 |
} |
| 115 |
#endif |
| 116 |
#endif |