1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-27 10:28:17 +00:00
hashcat/include/types.h

222 lines
2.6 KiB
C
Raw Normal View History

2015-12-04 14:47:52 +00:00
/**
* Author......: See docs/credits.txt
2015-12-04 14:47:52 +00:00
* License.....: MIT
*/
#ifndef _TYPES_H
#define _TYPES_H
#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
#define OUTFILES_DIR "outfiles"
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;
typedef struct
{
char *file_name;
long seek;
time_t ctime;
} outfile_data_t;
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
/**
* status
*/
2015-12-04 14:47:52 +00:00
2015-12-04 14:47:52 +00:00
typedef struct
{
uint salt_buf[16];
uint salt_buf_pc[8];
2015-12-04 14:47:52 +00:00
uint salt_len;
uint salt_iter;
uint salt_sign[2];
2015-12-04 14:47:52 +00:00
uint keccak_mdlen;
uint truecrypt_mdlen;
2016-03-01 17:56:46 +00:00
uint digests_cnt;
uint digests_done;
uint digests_offset;
uint scrypt_N;
uint scrypt_r;
uint scrypt_p;
} salt_t;
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
{
u32 i[16];
2015-12-04 14:47:52 +00:00
u32 pw_len;
2015-12-04 14:47:52 +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
{
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;
#define RULES_MAX 256
2015-12-04 14:47:52 +00:00
#define PW_DICTMAX 31
#define PW_DICTMAX1 (PW_DICTMAX + 1)
#endif // _TYPES_H