2015-12-04 14:47:52 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2015-12-04 14:47:52 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
2016-09-06 16:44:05 +00:00
|
|
|
#ifndef _TYPES_H
|
|
|
|
#define _TYPES_H
|
2016-09-05 19:47:26 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2016-09-06 20:25:54 +00:00
|
|
|
#include <string.h>
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-10 15:35:58 +00:00
|
|
|
#define OUTFILES_DIR "outfiles"
|
2016-09-08 07:21:25 +00:00
|
|
|
|
|
|
|
typedef enum wl_mode
|
|
|
|
{
|
|
|
|
WL_MODE_STDIN = 1,
|
|
|
|
WL_MODE_FILE = 2,
|
|
|
|
WL_MODE_MASK = 3
|
|
|
|
|
|
|
|
} wl_mode_t;
|
|
|
|
|
|
|
|
typedef enum hl_mode
|
|
|
|
{
|
|
|
|
HL_MODE_FILE = 4,
|
|
|
|
HL_MODE_ARG = 5
|
|
|
|
|
|
|
|
} hl_mode_t;
|
|
|
|
|
|
|
|
|
2016-09-10 15:35:58 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char *file_name;
|
|
|
|
long seek;
|
|
|
|
time_t ctime;
|
|
|
|
|
|
|
|
} outfile_data_t;
|
2016-09-09 21:17:43 +00:00
|
|
|
|
2016-09-08 07:21:25 +00:00
|
|
|
|
|
|
|
typedef enum attack_mode
|
|
|
|
{
|
|
|
|
ATTACK_MODE_STRAIGHT = 0,
|
|
|
|
ATTACK_MODE_COMBI = 1,
|
|
|
|
ATTACK_MODE_TOGGLE = 2,
|
|
|
|
ATTACK_MODE_BF = 3,
|
|
|
|
ATTACK_MODE_PERM = 4,
|
|
|
|
ATTACK_MODE_TABLE = 5,
|
|
|
|
ATTACK_MODE_HYBRID1 = 6,
|
|
|
|
ATTACK_MODE_HYBRID2 = 7,
|
|
|
|
ATTACK_MODE_NONE = 100
|
|
|
|
|
|
|
|
} attack_mode_t;
|
|
|
|
|
|
|
|
typedef enum attack_kern
|
|
|
|
{
|
|
|
|
ATTACK_KERN_STRAIGHT = 0,
|
|
|
|
ATTACK_KERN_COMBI = 1,
|
|
|
|
ATTACK_KERN_BF = 3,
|
|
|
|
ATTACK_KERN_NONE = 100
|
|
|
|
|
|
|
|
} attack_kern_t;
|
|
|
|
|
|
|
|
typedef enum combinator_mode
|
|
|
|
{
|
|
|
|
COMBINATOR_MODE_BASE_LEFT = 10001,
|
|
|
|
COMBINATOR_MODE_BASE_RIGHT = 10002
|
|
|
|
|
|
|
|
} combinator_mode_t;
|
|
|
|
|
|
|
|
typedef enum kern_run
|
|
|
|
{
|
|
|
|
KERN_RUN_1 = 1000,
|
|
|
|
KERN_RUN_12 = 1500,
|
|
|
|
KERN_RUN_2 = 2000,
|
|
|
|
KERN_RUN_23 = 2500,
|
|
|
|
KERN_RUN_3 = 3000
|
|
|
|
|
|
|
|
} kern_run_t;
|
|
|
|
|
|
|
|
typedef enum kern_run_mp
|
|
|
|
{
|
|
|
|
KERN_RUN_MP = 101,
|
|
|
|
KERN_RUN_MP_L = 102,
|
|
|
|
KERN_RUN_MP_R = 103
|
|
|
|
|
|
|
|
} kern_run_mp_t;
|
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
|
2016-09-06 09:49:26 +00:00
|
|
|
/**
|
|
|
|
* status
|
|
|
|
*/
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-08 07:21:25 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[16];
|
2016-09-06 09:49:26 +00:00
|
|
|
uint salt_buf_pc[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
uint salt_len;
|
2016-09-06 09:49:26 +00:00
|
|
|
uint salt_iter;
|
|
|
|
uint salt_sign[2];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-06 09:49:26 +00:00
|
|
|
uint keccak_mdlen;
|
|
|
|
uint truecrypt_mdlen;
|
2016-03-01 17:56:46 +00:00
|
|
|
|
2016-09-06 09:49:26 +00:00
|
|
|
uint digests_cnt;
|
|
|
|
uint digests_done;
|
2016-04-02 12:36:02 +00:00
|
|
|
|
2016-09-06 09:49:26 +00:00
|
|
|
uint digests_offset;
|
2016-04-02 12:36:02 +00:00
|
|
|
|
2016-09-06 09:49:26 +00:00
|
|
|
uint scrypt_N;
|
|
|
|
uint scrypt_r;
|
|
|
|
uint scrypt_p;
|
2016-01-21 16:20:02 +00:00
|
|
|
|
2016-09-06 09:49:26 +00:00
|
|
|
} salt_t;
|
2016-01-21 16:20:02 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char *user_name;
|
|
|
|
uint user_len;
|
|
|
|
|
|
|
|
} user_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
user_t *user;
|
|
|
|
char *orighash;
|
|
|
|
|
|
|
|
} hashinfo_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void *digest;
|
|
|
|
salt_t *salt;
|
|
|
|
void *esalt;
|
|
|
|
int cracked;
|
|
|
|
hashinfo_t *hash_info;
|
|
|
|
|
|
|
|
} hash_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-02-22 10:57:37 +00:00
|
|
|
u32 i[16];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-02-22 10:57:37 +00:00
|
|
|
u32 pw_len;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-02-22 10:57:37 +00:00
|
|
|
u32 alignment_placeholder_1;
|
|
|
|
u32 alignment_placeholder_2;
|
|
|
|
u32 alignment_placeholder_3;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pw_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint i;
|
|
|
|
|
|
|
|
} bf_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint b[32];
|
|
|
|
|
|
|
|
} bs_word_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint i[8];
|
|
|
|
|
|
|
|
uint pw_len;
|
|
|
|
|
|
|
|
} comb_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define CPT_BUF 0x20000
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint cracked;
|
|
|
|
time_t timestamp;
|
|
|
|
|
|
|
|
} cpt_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-05-20 16:24:33 +00:00
|
|
|
uint salt_pos;
|
|
|
|
uint digest_pos;
|
|
|
|
uint hash_pos;
|
2015-12-04 14:47:52 +00:00
|
|
|
uint gidvid;
|
|
|
|
uint il_pos;
|
|
|
|
|
|
|
|
} plain_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint word_buf[16];
|
|
|
|
|
|
|
|
} wordl_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint word_buf[1];
|
|
|
|
|
|
|
|
} wordr_t;
|
|
|
|
|
2016-01-03 18:49:47 +00:00
|
|
|
#define RULES_MAX 256
|
2015-12-04 14:47:52 +00:00
|
|
|
#define PW_DICTMAX 31
|
|
|
|
#define PW_DICTMAX1 (PW_DICTMAX + 1)
|
2016-09-06 16:44:05 +00:00
|
|
|
|
|
|
|
#endif // _TYPES_H
|