2015-12-04 14:47:52 +00:00
|
|
|
/**
|
|
|
|
* Author......: Jens Steube <jens.steube@gmail.com>
|
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TYPES_H
|
|
|
|
#define TYPES_H
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[16];
|
|
|
|
uint salt_buf_pc[8];
|
|
|
|
|
|
|
|
uint salt_len;
|
|
|
|
uint salt_iter;
|
|
|
|
uint salt_sign[2];
|
|
|
|
|
|
|
|
uint keccak_mdlen;
|
|
|
|
uint truecrypt_mdlen;
|
|
|
|
|
|
|
|
uint digests_cnt;
|
|
|
|
uint digests_done;
|
|
|
|
|
|
|
|
uint digests_offset;
|
|
|
|
|
|
|
|
uint scrypt_N;
|
|
|
|
uint scrypt_r;
|
|
|
|
uint scrypt_p;
|
|
|
|
uint scrypt_tmto;
|
|
|
|
uint scrypt_phy;
|
|
|
|
|
|
|
|
} salt_t;
|
|
|
|
|
2016-01-09 20:35:29 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint iv[4];
|
|
|
|
|
|
|
|
} rar5_t;
|
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
int V;
|
|
|
|
int R;
|
|
|
|
int P;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
int enc_md;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint id_buf[8];
|
|
|
|
uint u_buf[32];
|
|
|
|
uint o_buf[32];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
int id_len;
|
|
|
|
int o_len;
|
|
|
|
int u_len;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint rc4key[2];
|
|
|
|
uint rc4data[2];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pdf_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint pke[25];
|
|
|
|
uint eapol[64];
|
|
|
|
int eapol_size;
|
|
|
|
int keyver;
|
|
|
|
|
|
|
|
} wpa_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint cry_master_buf[64];
|
|
|
|
uint ckey_buf[64];
|
|
|
|
uint public_key_buf[64];
|
|
|
|
|
|
|
|
uint cry_master_len;
|
|
|
|
uint ckey_len;
|
|
|
|
uint public_key_len;
|
|
|
|
|
|
|
|
} bitcoin_wallet_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[30];
|
|
|
|
uint salt_len;
|
|
|
|
|
|
|
|
uint esalt_buf[38];
|
|
|
|
uint esalt_len;
|
|
|
|
|
|
|
|
} sip_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint data[384];
|
|
|
|
|
|
|
|
} androidfde_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint nr_buf[16];
|
|
|
|
uint nr_len;
|
|
|
|
|
|
|
|
uint msg_buf[128];
|
|
|
|
uint msg_len;
|
|
|
|
|
|
|
|
} ikepsk_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint user_len;
|
|
|
|
uint domain_len;
|
|
|
|
uint srvchall_len;
|
|
|
|
uint clichall_len;
|
|
|
|
|
|
|
|
uint userdomain_buf[64];
|
|
|
|
uint chall_buf[256];
|
|
|
|
|
|
|
|
} netntlm_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint user[16];
|
|
|
|
uint realm[16];
|
|
|
|
uint salt[32];
|
|
|
|
uint timestamp[16];
|
|
|
|
uint checksum[4];
|
|
|
|
|
|
|
|
} krb5pa_t;
|
|
|
|
|
2016-02-16 15:34:46 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint account_info[512];
|
|
|
|
uint checksum[4];
|
|
|
|
uint edata2[2560];
|
|
|
|
uint edata2_len;
|
|
|
|
|
|
|
|
} krb5tgs_t;
|
|
|
|
|
2016-04-02 12:36:02 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u32 version;
|
|
|
|
u32 algorithm;
|
|
|
|
|
2016-04-06 12:59:00 +00:00
|
|
|
/* key-file handling */
|
|
|
|
u32 keyfile_len;
|
|
|
|
u32 keyfile[8];
|
|
|
|
|
2016-04-02 12:36:02 +00:00
|
|
|
u32 final_random_seed[8];
|
|
|
|
u32 transf_random_seed[8];
|
|
|
|
u32 enc_iv[4];
|
|
|
|
u32 contents_hash[8];
|
|
|
|
|
|
|
|
/* specific to version 1 */
|
|
|
|
u32 contents_len;
|
|
|
|
u32 contents[12500];
|
|
|
|
|
|
|
|
/* specific to version 2 */
|
|
|
|
u32 expected_bytes[8];
|
|
|
|
|
|
|
|
} keepass_t;
|
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[16];
|
|
|
|
uint data_buf[112];
|
|
|
|
uint keyfile_buf[16];
|
|
|
|
|
|
|
|
} tc_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[16];
|
|
|
|
|
|
|
|
} pbkdf2_md5_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[16];
|
|
|
|
|
|
|
|
} pbkdf2_sha1_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[16];
|
|
|
|
|
|
|
|
} pbkdf2_sha256_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[32];
|
|
|
|
|
|
|
|
} pbkdf2_sha512_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u8 cipher[1040];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} agilekey_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint salt_buf[128];
|
|
|
|
uint salt_len;
|
|
|
|
|
|
|
|
} rakp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2015-12-06 10:29:29 +00:00
|
|
|
uint data_len;
|
|
|
|
uint data_buf[512];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} cloudkey_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint encryptedVerifier[4];
|
|
|
|
uint encryptedVerifierHash[5];
|
|
|
|
|
|
|
|
uint keySize;
|
|
|
|
|
|
|
|
} office2007_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint encryptedVerifier[4];
|
|
|
|
uint encryptedVerifierHash[8];
|
|
|
|
|
|
|
|
} office2010_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint encryptedVerifier[4];
|
|
|
|
uint encryptedVerifierHash[8];
|
|
|
|
|
|
|
|
} office2013_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint version;
|
|
|
|
uint encryptedVerifier[4];
|
|
|
|
uint encryptedVerifierHash[4];
|
|
|
|
uint rc4key[2];
|
|
|
|
|
|
|
|
} oldoffice01_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint version;
|
|
|
|
uint encryptedVerifier[4];
|
|
|
|
uint encryptedVerifierHash[5];
|
|
|
|
uint rc4key[2];
|
|
|
|
|
|
|
|
} oldoffice34_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint P[256];
|
|
|
|
|
|
|
|
} scrypt_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest[4];
|
|
|
|
uint out[4];
|
|
|
|
|
|
|
|
} pdf14_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
uint dgst32[16];
|
|
|
|
u64 dgst64[8];
|
2016-01-27 00:08:35 +00:00
|
|
|
} d;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint dgst_len;
|
|
|
|
uint W_len;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pdf17l8_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest_buf[4];
|
|
|
|
|
|
|
|
} phpass_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest_buf[4];
|
|
|
|
|
|
|
|
} md5crypt_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 l_alt_result[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 l_p_bytes[2];
|
|
|
|
u64 l_s_bytes[2];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} sha512crypt_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint alt_result[8];
|
|
|
|
|
|
|
|
uint p_bytes[4];
|
|
|
|
uint s_bytes[4];
|
|
|
|
|
|
|
|
} sha256crypt_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst[10];
|
|
|
|
uint out[10];
|
|
|
|
|
|
|
|
} wpa_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 dgst[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} bitcoin_wallet_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst[5];
|
|
|
|
uint out[4];
|
|
|
|
|
|
|
|
} dcc2_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2015-12-22 22:43:39 +00:00
|
|
|
uint E[18];
|
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
uint P[18];
|
|
|
|
|
|
|
|
uint S0[256];
|
|
|
|
uint S1[256];
|
|
|
|
uint S2[256];
|
|
|
|
uint S3[256];
|
|
|
|
|
|
|
|
} bcrypt_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest[2];
|
|
|
|
|
|
|
|
uint P[18];
|
|
|
|
|
|
|
|
uint S0[256];
|
|
|
|
uint S1[256];
|
|
|
|
uint S2[256];
|
|
|
|
uint S3[256];
|
|
|
|
|
|
|
|
} pwsafe2_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest_buf[8];
|
|
|
|
|
|
|
|
} pwsafe3_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest_buf[5];
|
|
|
|
|
|
|
|
} androidpin_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst[10];
|
|
|
|
uint out[10];
|
|
|
|
|
|
|
|
} androidfde_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[16];
|
|
|
|
uint opad[16];
|
|
|
|
|
|
|
|
uint dgst[64];
|
|
|
|
uint out[64];
|
|
|
|
|
|
|
|
} tc_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 ipad[8];
|
|
|
|
u64 opad[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 dgst[32];
|
|
|
|
u64 out[32];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} tc64_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst[5];
|
|
|
|
uint out[5];
|
|
|
|
|
|
|
|
} agilekey_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst1[5];
|
|
|
|
uint out1[5];
|
|
|
|
|
|
|
|
uint dgst2[5];
|
|
|
|
uint out2[5];
|
|
|
|
|
|
|
|
} mywallet_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst[5];
|
|
|
|
uint out[5];
|
|
|
|
|
|
|
|
} sha1aix_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[8];
|
|
|
|
uint opad[8];
|
|
|
|
|
|
|
|
uint dgst[8];
|
|
|
|
uint out[8];
|
|
|
|
|
|
|
|
} sha256aix_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 ipad[8];
|
|
|
|
u64 opad[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 dgst[8];
|
|
|
|
u64 out[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} sha512aix_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[8];
|
|
|
|
uint opad[8];
|
|
|
|
|
|
|
|
uint dgst[8];
|
|
|
|
uint out[8];
|
|
|
|
|
|
|
|
} lastpass_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 digest_buf[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} drupal7_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint ipad[5];
|
|
|
|
uint opad[5];
|
|
|
|
|
|
|
|
uint dgst[5];
|
|
|
|
uint out[5];
|
|
|
|
|
|
|
|
} lotus8_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint out[5];
|
|
|
|
|
|
|
|
} office2007_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint out[5];
|
|
|
|
|
|
|
|
} office2010_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 out[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} office2013_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint digest_buf[5];
|
|
|
|
|
|
|
|
} saph_sha1_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 ipad[4];
|
|
|
|
u32 opad[4];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 dgst[32];
|
|
|
|
u32 out[32];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pbkdf2_md5_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 ipad[5];
|
|
|
|
u32 opad[5];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 dgst[32];
|
|
|
|
u32 out[32];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pbkdf2_sha1_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 ipad[8];
|
|
|
|
u32 opad[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 dgst[32];
|
|
|
|
u32 out[32];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pbkdf2_sha256_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 ipad[8];
|
|
|
|
u64 opad[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 dgst[16];
|
|
|
|
u64 out[16];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} pbkdf2_sha512_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 out[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} ecryptfs_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 ipad[8];
|
|
|
|
u64 opad[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 dgst[16];
|
|
|
|
u64 out[16];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} oraclet_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint block[16];
|
|
|
|
|
|
|
|
uint dgst[8];
|
|
|
|
|
|
|
|
uint block_len;
|
|
|
|
uint final_len;
|
|
|
|
|
|
|
|
} seven_zip_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint Kc[16];
|
|
|
|
uint Kd[16];
|
|
|
|
|
|
|
|
uint iv[2];
|
|
|
|
|
|
|
|
} bsdicrypt_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint dgst[17][5];
|
|
|
|
|
|
|
|
} rar3_tmp_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint user[16];
|
|
|
|
|
|
|
|
} cram_md5_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint iv_buf[4];
|
|
|
|
uint iv_len;
|
|
|
|
|
|
|
|
uint salt_buf[4];
|
|
|
|
uint salt_len;
|
|
|
|
|
|
|
|
uint crc;
|
|
|
|
|
|
|
|
uint data_buf[96];
|
|
|
|
uint data_len;
|
|
|
|
|
|
|
|
uint unpack_size;
|
|
|
|
|
|
|
|
} seven_zip_t;
|
|
|
|
|
2016-03-01 17:56:46 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u32 KEK[5];
|
|
|
|
|
|
|
|
u32 lsb[4];
|
|
|
|
u32 cipher[4];
|
|
|
|
|
|
|
|
} axcrypt_tmp_t;
|
|
|
|
|
2016-04-02 12:36:02 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u32 tmp_digest[8];
|
|
|
|
|
|
|
|
} keepass_tmp_t;
|
|
|
|
|
2016-01-21 16:20:02 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u32 random[2];
|
|
|
|
u32 hash[5];
|
|
|
|
u32 salt[5]; // unused, but makes better valid check
|
|
|
|
u32 iv[2]; // unused, but makes better valid check
|
|
|
|
|
|
|
|
} psafe2_hdr;
|
|
|
|
|
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-01-25 11:28:06 +00:00
|
|
|
uint key;
|
|
|
|
u64 val;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} hcstat_table_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint cs_buf[0x100];
|
|
|
|
uint cs_len;
|
|
|
|
|
|
|
|
} cs_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-21 16:20:02 +00:00
|
|
|
char essid[36];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-21 16:20:02 +00:00
|
|
|
u8 mac1[6];
|
|
|
|
u8 mac2[6];
|
|
|
|
u8 nonce1[32];
|
|
|
|
u8 nonce2[32];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-21 16:20:02 +00:00
|
|
|
u8 eapol[256];
|
|
|
|
int eapol_size;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-21 16:20:02 +00:00
|
|
|
int keyver;
|
|
|
|
u8 keymic[16];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} hccap_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-21 16:20:02 +00:00
|
|
|
char signature[4];
|
|
|
|
u32 salt_buf[8];
|
|
|
|
u32 iterations;
|
|
|
|
u32 hash_buf[8];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} psafe3_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char plain_buf[256];
|
|
|
|
int plain_len;
|
|
|
|
|
|
|
|
hash_t hash;
|
|
|
|
|
|
|
|
} pot_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 cnt;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
#ifdef _POSIX
|
|
|
|
struct stat stat;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _WIN
|
|
|
|
struct __stat64 stat;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} dictstat_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint len;
|
|
|
|
|
|
|
|
char buf[0x100];
|
|
|
|
|
|
|
|
} cpu_rule_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-03 18:49:47 +00:00
|
|
|
uint cmds[0x100];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-05 07:26:44 +00:00
|
|
|
} kernel_rule_t;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 version_bin;
|
2016-04-03 12:41:03 +00:00
|
|
|
char cwd[256];
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 pid;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 dictpos;
|
|
|
|
u32 maskpos;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 words_cur;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u32 argc;
|
|
|
|
char **argv;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} restore_data_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
char *file_name;
|
|
|
|
long seek;
|
|
|
|
time_t ctime;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} outfile_data_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-25 11:28:06 +00:00
|
|
|
char *buf;
|
2016-01-15 16:16:43 +00:00
|
|
|
u32 incr;
|
|
|
|
u32 avail;
|
|
|
|
u32 cnt;
|
|
|
|
u32 pos;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} wl_data_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint bitmap_shift;
|
|
|
|
uint collisions;
|
|
|
|
|
|
|
|
} bitmap_result_t;
|
|
|
|
|
|
|
|
#define CPT_BUF 0x20000
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint cracked;
|
|
|
|
time_t timestamp;
|
|
|
|
|
|
|
|
} cpt_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint plain_buf[16];
|
|
|
|
uint plain_len;
|
|
|
|
|
|
|
|
} plain_t;
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint gidvid;
|
|
|
|
uint il_pos;
|
|
|
|
|
|
|
|
} plain_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint word_buf[16];
|
|
|
|
|
|
|
|
} wordl_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint word_buf[1];
|
|
|
|
|
|
|
|
} wordr_t;
|
|
|
|
|
2016-02-10 19:40:21 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char *device_name;
|
|
|
|
char *alias_name;
|
|
|
|
|
|
|
|
} tuning_db_alias_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char *device_name;
|
|
|
|
int attack_mode;
|
|
|
|
int hash_type;
|
|
|
|
int workload_profile;
|
|
|
|
int vector_width;
|
|
|
|
int kernel_accel;
|
|
|
|
int kernel_loops;
|
|
|
|
|
|
|
|
} tuning_db_entry_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
tuning_db_alias_t *alias_buf;
|
|
|
|
int alias_cnt;
|
|
|
|
|
|
|
|
tuning_db_entry_t *entry_buf;
|
|
|
|
int entry_cnt;
|
|
|
|
|
|
|
|
} tuning_db_t;
|
|
|
|
|
2016-01-03 18:49:47 +00:00
|
|
|
#define RULES_MAX 256
|
2015-12-04 14:47:52 +00:00
|
|
|
#define PW_MIN 0
|
|
|
|
#define PW_MAX 54
|
|
|
|
#define PW_MAX1 (PW_MAX + 1)
|
|
|
|
#define PW_DICTMAX 31
|
|
|
|
#define PW_DICTMAX1 (PW_DICTMAX + 1)
|
2016-01-25 11:28:06 +00:00
|
|
|
#define PARAMCNT 32
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
struct __hc_device_param
|
|
|
|
{
|
2016-01-15 16:23:07 +00:00
|
|
|
cl_device_id device;
|
|
|
|
cl_device_type device_type;
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint device_id;
|
|
|
|
uint platform_devices_id; // for mapping with hms devices
|
|
|
|
|
2016-02-07 20:20:10 +00:00
|
|
|
bool skipped;
|
2016-01-15 16:23:07 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint sm_major;
|
|
|
|
uint sm_minor;
|
|
|
|
uint kernel_exec_timeout;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint device_processors;
|
|
|
|
uint device_processor_cores;
|
|
|
|
u64 device_maxmem_alloc;
|
|
|
|
u64 device_global_mem;
|
|
|
|
u32 device_maxclock_frequency;
|
2015-12-15 11:04:22 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint vector_width;
|
2016-01-05 07:26:44 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint kernel_threads;
|
2016-02-05 14:27:09 +00:00
|
|
|
uint kernel_loops;
|
2016-01-25 11:28:06 +00:00
|
|
|
uint kernel_accel;
|
2016-02-13 15:07:58 +00:00
|
|
|
uint kernel_loops_min;
|
|
|
|
uint kernel_loops_max;
|
|
|
|
uint kernel_accel_min;
|
|
|
|
uint kernel_accel_max;
|
|
|
|
uint kernel_power;
|
2016-01-25 11:28:06 +00:00
|
|
|
uint kernel_power_user;
|
2016-01-17 21:17:50 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint size_pws;
|
|
|
|
uint size_tmps;
|
|
|
|
uint size_hooks;
|
2016-02-23 09:36:43 +00:00
|
|
|
uint size_bfs;
|
|
|
|
uint size_combs;
|
|
|
|
uint size_rules;
|
|
|
|
uint size_rules_c;
|
2016-01-25 11:28:06 +00:00
|
|
|
uint size_root_css;
|
|
|
|
uint size_markov_css;
|
|
|
|
uint size_digests;
|
|
|
|
uint size_salts;
|
|
|
|
uint size_shown;
|
|
|
|
uint size_results;
|
|
|
|
uint size_plains;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
FILE *combs_fp;
|
|
|
|
comb_t *combs_buf;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
void *hooks_buf;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
pw_t *pws_buf;
|
|
|
|
uint pws_cnt;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 words_off;
|
|
|
|
u64 words_done;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint *result;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint outerloop_pos;
|
|
|
|
uint outerloop_left;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint innerloop_pos;
|
|
|
|
uint innerloop_left;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-02-11 08:54:50 +00:00
|
|
|
uint exec_pos;
|
|
|
|
double exec_ms[EXEC_CACHE];
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint speed_pos;
|
|
|
|
u64 speed_cnt[SPEED_CACHE];
|
|
|
|
float speed_ms[SPEED_CACHE];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
hc_timer_t speed_rec[SPEED_CACHE];
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
hc_timer_t timer_speed;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
// device specific attributes starting
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
char *device_name;
|
|
|
|
char *device_name_chksum;
|
|
|
|
char *device_version;
|
|
|
|
char *driver_version;
|
|
|
|
|
2016-02-04 20:06:19 +00:00
|
|
|
bool opencl_v12;
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
cl_uint vendor_id;
|
|
|
|
|
|
|
|
cl_kernel kernel1;
|
|
|
|
cl_kernel kernel12;
|
|
|
|
cl_kernel kernel2;
|
|
|
|
cl_kernel kernel23;
|
|
|
|
cl_kernel kernel3;
|
|
|
|
cl_kernel kernel_mp;
|
|
|
|
cl_kernel kernel_mp_l;
|
|
|
|
cl_kernel kernel_mp_r;
|
|
|
|
cl_kernel kernel_amp;
|
|
|
|
cl_kernel kernel_tm;
|
|
|
|
cl_kernel kernel_weak;
|
|
|
|
|
|
|
|
cl_context context;
|
|
|
|
|
|
|
|
cl_program program;
|
|
|
|
cl_program program_mp;
|
|
|
|
cl_program program_amp;
|
|
|
|
cl_program program_weak;
|
|
|
|
|
|
|
|
cl_command_queue command_queue;
|
|
|
|
|
|
|
|
cl_mem d_pws_buf;
|
|
|
|
cl_mem d_pws_amp_buf;
|
|
|
|
cl_mem d_words_buf_l;
|
|
|
|
cl_mem d_words_buf_r;
|
|
|
|
cl_mem d_rules;
|
|
|
|
cl_mem d_rules_c;
|
|
|
|
cl_mem d_combs;
|
|
|
|
cl_mem d_combs_c;
|
|
|
|
cl_mem d_bfs;
|
|
|
|
cl_mem d_bfs_c;
|
|
|
|
cl_mem d_tm_c;
|
|
|
|
cl_mem d_bitmap_s1_a;
|
|
|
|
cl_mem d_bitmap_s1_b;
|
|
|
|
cl_mem d_bitmap_s1_c;
|
|
|
|
cl_mem d_bitmap_s1_d;
|
|
|
|
cl_mem d_bitmap_s2_a;
|
|
|
|
cl_mem d_bitmap_s2_b;
|
|
|
|
cl_mem d_bitmap_s2_c;
|
|
|
|
cl_mem d_bitmap_s2_d;
|
|
|
|
cl_mem d_plain_bufs;
|
|
|
|
cl_mem d_digests_buf;
|
|
|
|
cl_mem d_digests_shown;
|
|
|
|
cl_mem d_salt_bufs;
|
|
|
|
cl_mem d_esalt_bufs;
|
|
|
|
cl_mem d_bcrypt_bufs;
|
|
|
|
cl_mem d_tmps;
|
|
|
|
cl_mem d_hooks;
|
|
|
|
cl_mem d_result;
|
|
|
|
cl_mem d_scryptV_buf;
|
|
|
|
cl_mem d_root_css_buf;
|
|
|
|
cl_mem d_markov_css_buf;
|
|
|
|
|
|
|
|
void *kernel_params[PARAMCNT];
|
|
|
|
void *kernel_params_mp[PARAMCNT];
|
|
|
|
void *kernel_params_mp_r[PARAMCNT];
|
|
|
|
void *kernel_params_mp_l[PARAMCNT];
|
|
|
|
void *kernel_params_amp[PARAMCNT];
|
|
|
|
void *kernel_params_tm[PARAMCNT];
|
|
|
|
|
|
|
|
u32 kernel_params_buf32[PARAMCNT];
|
|
|
|
|
|
|
|
u32 kernel_params_mp_buf32[PARAMCNT];
|
|
|
|
u64 kernel_params_mp_buf64[PARAMCNT];
|
|
|
|
|
|
|
|
u32 kernel_params_mp_r_buf32[PARAMCNT];
|
|
|
|
u64 kernel_params_mp_r_buf64[PARAMCNT];
|
|
|
|
|
|
|
|
u32 kernel_params_mp_l_buf32[PARAMCNT];
|
|
|
|
u64 kernel_params_mp_l_buf64[PARAMCNT];
|
|
|
|
|
|
|
|
u32 kernel_params_amp_buf32[PARAMCNT];
|
2015-12-04 14:47:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct __hc_device_param hc_device_param_t;
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
#ifdef HAVE_HWMON
|
2015-12-04 14:47:52 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2016-01-13 16:10:40 +00:00
|
|
|
union
|
|
|
|
{
|
2016-01-20 19:55:09 +00:00
|
|
|
#ifdef HAVE_ADL
|
2015-12-15 17:41:11 +00:00
|
|
|
HM_ADAPTER_AMD amd;
|
2016-01-20 19:55:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_NVML) || defined(HAVE_NVAPI)
|
2015-12-15 17:41:11 +00:00
|
|
|
HM_ADAPTER_NV nv;
|
2016-01-20 19:55:09 +00:00
|
|
|
#endif
|
2016-01-13 16:10:40 +00:00
|
|
|
|
2015-12-15 17:41:11 +00:00
|
|
|
} adapter_index;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
int od_version;
|
|
|
|
int fan_supported;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
// int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
|
|
|
|
// int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
} hm_attrs_t;
|
2016-01-20 19:55:09 +00:00
|
|
|
#endif // HAVE_HWMON
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* threads
|
|
|
|
*/
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint devices_status;
|
|
|
|
uint devices_cnt;
|
|
|
|
uint devices_active;
|
|
|
|
|
|
|
|
hc_device_param_t *devices_param;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-02-13 15:07:58 +00:00
|
|
|
/**
|
|
|
|
* workload specific
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint kernel_power_all;
|
|
|
|
float kernel_power_div;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* attack specific
|
|
|
|
*/
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint wordlist_mode;
|
|
|
|
uint hashlist_mode;
|
|
|
|
uint hashlist_format;
|
|
|
|
|
|
|
|
uint attack_mode;
|
|
|
|
uint attack_kern;
|
|
|
|
uint attack_exec;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint kernel_rules_cnt;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
kernel_rule_t *kernel_rules_buf;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint combs_mode;
|
|
|
|
uint combs_cnt;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint bfs_cnt;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint css_cnt;
|
|
|
|
cs_t *css_buf;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
cs_t *root_css_buf;
|
|
|
|
cs_t *markov_css_buf;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
char *rule_buf_l;
|
|
|
|
char *rule_buf_r;
|
|
|
|
int rule_len_l;
|
|
|
|
int rule_len_r;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-26 20:40:49 +00:00
|
|
|
/**
|
2016-01-31 22:48:38 +00:00
|
|
|
* opencl library stuff
|
2016-01-26 20:40:49 +00:00
|
|
|
*/
|
|
|
|
|
2016-01-31 22:48:38 +00:00
|
|
|
void *ocl;
|
2016-01-26 20:40:49 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
/**
|
|
|
|
* hardware watchdog
|
|
|
|
*/
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
#ifdef HAVE_HWMON
|
2016-02-02 00:14:33 +00:00
|
|
|
void *hm_nv;
|
|
|
|
void *hm_amd;
|
2016-01-25 11:28:06 +00:00
|
|
|
hm_attrs_t hm_device[DEVICES_MAX];
|
2016-01-20 19:55:09 +00:00
|
|
|
#endif
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* hashes
|
|
|
|
*/
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint digests_cnt;
|
|
|
|
uint digests_done;
|
|
|
|
uint digests_saved;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
void *digests_buf;
|
|
|
|
uint *digests_shown;
|
|
|
|
uint *digests_shown_tmp;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
uint salts_cnt;
|
|
|
|
uint salts_done;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
salt_t *salts_buf;
|
|
|
|
uint *salts_shown;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
void *esalts_buf;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* logging
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint logfile_disable;
|
|
|
|
char *logfile;
|
|
|
|
char *topid;
|
|
|
|
char *subid;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* crack-per-time
|
|
|
|
*/
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
cpt_t cpt_buf[CPT_BUF];
|
|
|
|
int cpt_pos;
|
|
|
|
time_t cpt_start;
|
|
|
|
u64 cpt_total;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* user
|
|
|
|
*/
|
|
|
|
|
|
|
|
char *dictfile;
|
|
|
|
char *dictfile2;
|
|
|
|
char *mask;
|
|
|
|
uint maskcnt;
|
|
|
|
uint maskpos;
|
|
|
|
char *session;
|
|
|
|
char separator;
|
|
|
|
char *hashfile;
|
2015-12-13 11:21:36 +00:00
|
|
|
char *homedir;
|
2015-12-04 14:47:52 +00:00
|
|
|
char *install_dir;
|
2015-12-13 11:21:36 +00:00
|
|
|
char *profile_dir;
|
|
|
|
char *session_dir;
|
2016-01-02 23:40:31 +00:00
|
|
|
char *shared_dir;
|
2015-12-04 14:47:52 +00:00
|
|
|
char *outfile;
|
|
|
|
uint outfile_format;
|
|
|
|
uint outfile_autohex;
|
|
|
|
uint outfile_check_timer;
|
|
|
|
char *eff_restore_file;
|
|
|
|
char *new_restore_file;
|
|
|
|
char *induction_directory;
|
|
|
|
char *outfile_check_directory;
|
|
|
|
uint loopback;
|
|
|
|
char *loopback_file;
|
|
|
|
uint restore;
|
|
|
|
uint restore_timer;
|
|
|
|
uint restore_disable;
|
|
|
|
uint status;
|
|
|
|
uint status_timer;
|
|
|
|
uint status_automat;
|
|
|
|
uint quiet;
|
|
|
|
uint force;
|
|
|
|
uint benchmark;
|
2016-02-15 16:42:09 +00:00
|
|
|
uint benchmark_repeats;
|
2015-12-04 14:47:52 +00:00
|
|
|
uint runtime;
|
|
|
|
uint remove;
|
|
|
|
uint remove_timer;
|
|
|
|
uint debug_mode;
|
|
|
|
char *debug_file;
|
|
|
|
uint hex_charset;
|
|
|
|
uint hex_salt;
|
|
|
|
uint hex_wordlist;
|
|
|
|
uint pw_min;
|
|
|
|
uint pw_max;
|
|
|
|
uint powertune_enable;
|
|
|
|
uint scrypt_tmto;
|
|
|
|
uint segment_size;
|
|
|
|
char *truecrypt_keyfiles;
|
2016-02-13 15:07:58 +00:00
|
|
|
uint workload_profile;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
uint hash_mode;
|
|
|
|
uint hash_type;
|
|
|
|
uint kern_type;
|
|
|
|
uint opts_type;
|
|
|
|
uint salt_type;
|
|
|
|
uint esalt_size;
|
|
|
|
uint isSalted;
|
|
|
|
uint dgst_size;
|
|
|
|
uint opti_type;
|
|
|
|
uint dgst_pos0;
|
|
|
|
uint dgst_pos1;
|
|
|
|
uint dgst_pos2;
|
|
|
|
uint dgst_pos3;
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
#ifdef HAVE_HWMON
|
2015-12-04 14:47:52 +00:00
|
|
|
uint gpu_temp_disable;
|
|
|
|
uint gpu_temp_abort;
|
|
|
|
uint gpu_temp_retain;
|
2016-01-20 19:55:09 +00:00
|
|
|
#endif
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
char **rp_files;
|
|
|
|
uint rp_files_cnt;
|
|
|
|
uint rp_gen;
|
|
|
|
uint rp_gen_seed;
|
|
|
|
|
|
|
|
FILE *pot_fp;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* used for restore
|
|
|
|
*/
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 skip;
|
|
|
|
u64 limit;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
restore_data_t *rd;
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 checkpoint_cur_words; // used for the "stop at next checkpoint" feature
|
2015-12-07 17:31:45 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
/**
|
|
|
|
* status, timer
|
|
|
|
*/
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
time_t runtime_start;
|
|
|
|
time_t runtime_stop;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
time_t proc_start;
|
|
|
|
time_t proc_stop;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 words_cnt;
|
|
|
|
u64 words_cur;
|
|
|
|
u64 words_base;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
u64 *words_progress_done; // progress number of words done per salt
|
|
|
|
u64 *words_progress_rejected; // progress number of words rejected per salt
|
|
|
|
u64 *words_progress_restored; // progress number of words restored per salt
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
hc_timer_t timer_running; // timer on current dict
|
|
|
|
hc_timer_t timer_paused; // timer on current dict
|
|
|
|
|
2016-01-25 11:28:06 +00:00
|
|
|
float ms_paused; // timer on current dict
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* hash_info and username
|
|
|
|
*/
|
|
|
|
|
|
|
|
hashinfo_t **hash_info;
|
2016-01-25 11:28:06 +00:00
|
|
|
uint username;
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
int (*sort_by_digest) (const void *, const void *);
|
|
|
|
|
|
|
|
int (*parse_func) (char *, uint, hash_t *);
|
|
|
|
|
|
|
|
} hc_global_data_t;
|
|
|
|
|
|
|
|
extern hc_global_data_t data;
|
|
|
|
|
|
|
|
#endif
|