1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-17 12:18:24 +00:00

Merge pull request #526 from coolbry95/master

changed uint to u32
This commit is contained in:
Jens Steube 2016-10-04 06:45:05 +02:00 committed by GitHub
commit d8b25627cc
29 changed files with 1244 additions and 1246 deletions

View File

@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
void md5_64 (uint block[16], uint digest[4]); void md5_64 (u32 block[16], u32 digest[4]);
void md5_complete_no_limit (uint digest[4], uint *plain, uint plain_len); void md5_complete_no_limit (u32 digest[4], u32 *plain, u32 plain_len);
#endif // _CPU_MD5_H #endif // _CPU_MD5_H

View File

@ -6,6 +6,6 @@
#ifndef _CPU_SHA1_H #ifndef _CPU_SHA1_H
#define _CPU_SHA1_H #define _CPU_SHA1_H
void sha1_64 (uint block[16], uint digest[5]); void sha1_64 (u32 block[16], u32 digest[5]);
#endif // _CPU_SHA1_H #endif // _CPU_SHA1_H

View File

@ -6,6 +6,6 @@
#ifndef _CPU_SHA256_H #ifndef _CPU_SHA256_H
#define _CPU_SHA256_H #define _CPU_SHA256_H
void sha256_64 (uint block[16], uint digest[8]); void sha256_64 (u32 block[16], u32 digest[8]);
#endif // _CPU_SHA256_H #endif // _CPU_SHA256_H

View File

@ -15,7 +15,7 @@ void save_hash (const user_options_t *user_options, const hashconfig_t *hashconf
void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain); void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain);
int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const uint salt_pos); int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos);
int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfile_ctx_t *potfile_ctx, outfile_ctx_t *outfile_ctx, user_options_t *user_options, char *hash_or_file); int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfile_ctx_t *potfile_ctx, outfile_ctx_t *outfile_ctx, user_options_t *user_options, char *hash_or_file);
int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_options_t *user_options, status_ctx_t *status_ctx); int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_options_t *user_options, status_ctx_t *status_ctx);

View File

@ -10,11 +10,11 @@
#define HLFMTS_CNT 11 #define HLFMTS_CNT 11
char *strhlfmt (const uint hashfile_format); char *strhlfmt (const u32 hashfile_format);
void hlfmt_hash (uint hashfile_format, char *line_buf, int line_len, char **hashbuf_pos, int *hashbuf_len, const hashconfig_t *hashconfig, const user_options_t *user_options); void hlfmt_hash (u32 hashfile_format, char *line_buf, int line_len, char **hashbuf_pos, int *hashbuf_len, const hashconfig_t *hashconfig, const user_options_t *user_options);
void hlfmt_user (uint hashfile_format, char *line_buf, int line_len, char **userbuf_pos, int *userbuf_len, const hashconfig_t *hashconfig); void hlfmt_user (u32 hashfile_format, char *line_buf, int line_len, char **userbuf_pos, int *userbuf_len, const hashconfig_t *hashconfig);
uint hlfmt_detect (FILE *fp, uint max_check, const hashconfig_t *hashconfig); u32 hlfmt_detect (FILE *fp, u32 max_check, const hashconfig_t *hashconfig);
#endif // _HLFMT_H #endif // _HLFMT_H

View File

@ -6,19 +6,19 @@
#ifndef _HWMON_H #ifndef _HWMON_H
#define _HWMON_H #define _HWMON_H
int hm_get_threshold_slowdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_threshold_slowdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_threshold_shutdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_threshold_shutdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_temperature_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_temperature_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_fanpolicy_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_fanpolicy_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_fanspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_fanspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_buslanes_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_buslanes_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_utilization_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_utilization_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_memoryspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_memoryspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_corespeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_corespeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_get_throttle_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id); int hm_get_throttle_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id);
int hm_set_fanspeed_with_device_id_adl (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy); int hm_set_fanspeed_with_device_id_adl (const hwmon_ctx_t *hwmon_ctx, const u32 device_id, const int fanspeed, const int fanpolicy);
int hm_set_fanspeed_with_device_id_nvapi (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy); int hm_set_fanspeed_with_device_id_nvapi (const hwmon_ctx_t *hwmon_ctx, const u32 device_id, const int fanspeed, const int fanpolicy);
int hm_set_fanspeed_with_device_id_xnvctrl (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed); int hm_set_fanspeed_with_device_id_xnvctrl (const hwmon_ctx_t *hwmon_ctx, const u32 device_id, const int fanspeed);
int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options, const opencl_ctx_t *opencl_ctx); int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options, const opencl_ctx_t *opencl_ctx);
void hwmon_ctx_destroy (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options, const opencl_ctx_t *opencl_ctx); void hwmon_ctx_destroy (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options, const opencl_ctx_t *opencl_ctx);

View File

@ -25,7 +25,7 @@
typedef struct rar5 typedef struct rar5
{ {
uint iv[4]; u32 iv[4];
} rar5_t; } rar5_t;
@ -37,23 +37,23 @@ typedef struct pdf
int enc_md; int enc_md;
uint id_buf[8]; u32 id_buf[8];
uint u_buf[32]; u32 u_buf[32];
uint o_buf[32]; u32 o_buf[32];
int id_len; int id_len;
int o_len; int o_len;
int u_len; int u_len;
uint rc4key[2]; u32 rc4key[2];
uint rc4data[2]; u32 rc4data[2];
} pdf_t; } pdf_t;
typedef struct wpa typedef struct wpa
{ {
uint pke[25]; u32 pke[25];
uint eapol[64]; u32 eapol[64];
int eapol_size; int eapol_size;
int keyver; int keyver;
u8 orig_mac1[6]; u8 orig_mac1[6];
@ -65,70 +65,70 @@ typedef struct wpa
typedef struct bitcoin_wallet typedef struct bitcoin_wallet
{ {
uint cry_master_buf[64]; u32 cry_master_buf[64];
uint ckey_buf[64]; u32 ckey_buf[64];
uint public_key_buf[64]; u32 public_key_buf[64];
uint cry_master_len; u32 cry_master_len;
uint ckey_len; u32 ckey_len;
uint public_key_len; u32 public_key_len;
} bitcoin_wallet_t; } bitcoin_wallet_t;
typedef struct sip typedef struct sip
{ {
uint salt_buf[30]; u32 salt_buf[30];
uint salt_len; u32 salt_len;
uint esalt_buf[38]; u32 esalt_buf[38];
uint esalt_len; u32 esalt_len;
} sip_t; } sip_t;
typedef struct androidfde typedef struct androidfde
{ {
uint data[384]; u32 data[384];
} androidfde_t; } androidfde_t;
typedef struct ikepsk typedef struct ikepsk
{ {
uint nr_buf[16]; u32 nr_buf[16];
uint nr_len; u32 nr_len;
uint msg_buf[128]; u32 msg_buf[128];
uint msg_len; u32 msg_len;
} ikepsk_t; } ikepsk_t;
typedef struct netntlm typedef struct netntlm
{ {
uint user_len; u32 user_len;
uint domain_len; u32 domain_len;
uint srvchall_len; u32 srvchall_len;
uint clichall_len; u32 clichall_len;
uint userdomain_buf[64]; u32 userdomain_buf[64];
uint chall_buf[256]; u32 chall_buf[256];
} netntlm_t; } netntlm_t;
typedef struct krb5pa typedef struct krb5pa
{ {
uint user[16]; u32 user[16];
uint realm[16]; u32 realm[16];
uint salt[32]; u32 salt[32];
uint timestamp[16]; u32 timestamp[16];
uint checksum[4]; u32 checksum[4];
} krb5pa_t; } krb5pa_t;
typedef struct krb5tgs typedef struct krb5tgs
{ {
uint account_info[512]; u32 account_info[512];
uint checksum[4]; u32 checksum[4];
uint edata2[2560]; u32 edata2[2560];
uint edata2_len; u32 edata2_len;
} krb5tgs_t; } krb5tgs_t;
@ -157,34 +157,34 @@ typedef struct keepass
typedef struct tc typedef struct tc
{ {
uint salt_buf[16]; u32 salt_buf[16];
uint data_buf[112]; u32 data_buf[112];
uint keyfile_buf[16]; u32 keyfile_buf[16];
uint signature; u32 signature;
} tc_t; } tc_t;
typedef struct pbkdf2_md5 typedef struct pbkdf2_md5
{ {
uint salt_buf[16]; u32 salt_buf[16];
} pbkdf2_md5_t; } pbkdf2_md5_t;
typedef struct pbkdf2_sha1 typedef struct pbkdf2_sha1
{ {
uint salt_buf[16]; u32 salt_buf[16];
} pbkdf2_sha1_t; } pbkdf2_sha1_t;
typedef struct pbkdf2_sha256 typedef struct pbkdf2_sha256
{ {
uint salt_buf[16]; u32 salt_buf[16];
} pbkdf2_sha256_t; } pbkdf2_sha256_t;
typedef struct pbkdf2_sha512 typedef struct pbkdf2_sha512
{ {
uint salt_buf[32]; u32 salt_buf[32];
} pbkdf2_sha512_t; } pbkdf2_sha512_t;
@ -196,56 +196,56 @@ typedef struct agilekey
typedef struct rakp typedef struct rakp
{ {
uint salt_buf[128]; u32 salt_buf[128];
uint salt_len; u32 salt_len;
} rakp_t; } rakp_t;
typedef struct cloudkey typedef struct cloudkey
{ {
uint data_len; u32 data_len;
uint data_buf[512]; u32 data_buf[512];
} cloudkey_t; } cloudkey_t;
typedef struct office2007 typedef struct office2007
{ {
uint encryptedVerifier[4]; u32 encryptedVerifier[4];
uint encryptedVerifierHash[5]; u32 encryptedVerifierHash[5];
uint keySize; u32 keySize;
} office2007_t; } office2007_t;
typedef struct office2010 typedef struct office2010
{ {
uint encryptedVerifier[4]; u32 encryptedVerifier[4];
uint encryptedVerifierHash[8]; u32 encryptedVerifierHash[8];
} office2010_t; } office2010_t;
typedef struct office2013 typedef struct office2013
{ {
uint encryptedVerifier[4]; u32 encryptedVerifier[4];
uint encryptedVerifierHash[8]; u32 encryptedVerifierHash[8];
} office2013_t; } office2013_t;
typedef struct oldoffice01 typedef struct oldoffice01
{ {
uint version; u32 version;
uint encryptedVerifier[4]; u32 encryptedVerifier[4];
uint encryptedVerifierHash[4]; u32 encryptedVerifierHash[4];
uint rc4key[2]; u32 rc4key[2];
} oldoffice01_t; } oldoffice01_t;
typedef struct oldoffice34 typedef struct oldoffice34
{ {
uint version; u32 version;
uint encryptedVerifier[4]; u32 encryptedVerifier[4];
uint encryptedVerifierHash[5]; u32 encryptedVerifierHash[5];
uint rc4key[2]; u32 rc4key[2];
} oldoffice34_t; } oldoffice34_t;
@ -277,7 +277,7 @@ typedef struct zip2
typedef struct win8phone typedef struct win8phone
{ {
uint salt_buf[32]; u32 salt_buf[32];
} win8phone_t; } win8phone_t;
@ -292,8 +292,8 @@ typedef struct psafe3
typedef struct pdf14_tmp typedef struct pdf14_tmp
{ {
uint digest[4]; u32 digest[4];
uint out[4]; u32 out[4];
} pdf14_tmp_t; } pdf14_tmp_t;
@ -301,24 +301,24 @@ typedef struct pdf17l8_tmp
{ {
union union
{ {
uint dgst32[16]; u32 dgst32[16];
u64 dgst64[8]; u64 dgst64[8];
} d; } d;
uint dgst_len; u32 dgst_len;
uint W_len; u32 W_len;
} pdf17l8_tmp_t; } pdf17l8_tmp_t;
typedef struct phpass_tmp typedef struct phpass_tmp
{ {
uint digest_buf[4]; u32 digest_buf[4];
} phpass_tmp_t; } phpass_tmp_t;
typedef struct md5crypt_tmp typedef struct md5crypt_tmp
{ {
uint digest_buf[4]; u32 digest_buf[4];
} md5crypt_tmp_t; } md5crypt_tmp_t;
@ -333,20 +333,20 @@ typedef struct sha512crypt_tmp
typedef struct sha256crypt_tmp typedef struct sha256crypt_tmp
{ {
uint alt_result[8]; u32 alt_result[8];
uint p_bytes[4]; u32 p_bytes[4];
uint s_bytes[4]; u32 s_bytes[4];
} sha256crypt_tmp_t; } sha256crypt_tmp_t;
typedef struct wpa_tmp typedef struct wpa_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst[10]; u32 dgst[10];
uint out[10]; u32 out[10];
} wpa_tmp_t; } wpa_tmp_t;
@ -358,69 +358,69 @@ typedef struct bitcoin_wallet_tmp
typedef struct dcc2_tmp typedef struct dcc2_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst[5]; u32 dgst[5];
uint out[4]; u32 out[4];
} dcc2_tmp_t; } dcc2_tmp_t;
typedef struct bcrypt_tmp typedef struct bcrypt_tmp
{ {
uint E[18]; u32 E[18];
uint P[18]; u32 P[18];
uint S0[256]; u32 S0[256];
uint S1[256]; u32 S1[256];
uint S2[256]; u32 S2[256];
uint S3[256]; u32 S3[256];
} bcrypt_tmp_t; } bcrypt_tmp_t;
typedef struct pwsafe2_tmp typedef struct pwsafe2_tmp
{ {
uint digest[2]; u32 digest[2];
uint P[18]; u32 P[18];
uint S0[256]; u32 S0[256];
uint S1[256]; u32 S1[256];
uint S2[256]; u32 S2[256];
uint S3[256]; u32 S3[256];
} pwsafe2_tmp_t; } pwsafe2_tmp_t;
typedef struct pwsafe3_tmp typedef struct pwsafe3_tmp
{ {
uint digest_buf[8]; u32 digest_buf[8];
} pwsafe3_tmp_t; } pwsafe3_tmp_t;
typedef struct androidpin_tmp typedef struct androidpin_tmp
{ {
uint digest_buf[5]; u32 digest_buf[5];
} androidpin_tmp_t; } androidpin_tmp_t;
typedef struct androidfde_tmp typedef struct androidfde_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst[10]; u32 dgst[10];
uint out[10]; u32 out[10];
} androidfde_tmp_t; } androidfde_tmp_t;
typedef struct tc_tmp typedef struct tc_tmp
{ {
uint ipad[16]; u32 ipad[16];
uint opad[16]; u32 opad[16];
uint dgst[64]; u32 dgst[64];
uint out[64]; u32 out[64];
} tc_tmp_t; } tc_tmp_t;
@ -436,44 +436,44 @@ typedef struct tc64_tmp
typedef struct agilekey_tmp typedef struct agilekey_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst[5]; u32 dgst[5];
uint out[5]; u32 out[5];
} agilekey_tmp_t; } agilekey_tmp_t;
typedef struct mywallet_tmp typedef struct mywallet_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst1[5]; u32 dgst1[5];
uint out1[5]; u32 out1[5];
uint dgst2[5]; u32 dgst2[5];
uint out2[5]; u32 out2[5];
} mywallet_tmp_t; } mywallet_tmp_t;
typedef struct sha1aix_tmp typedef struct sha1aix_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst[5]; u32 dgst[5];
uint out[5]; u32 out[5];
} sha1aix_tmp_t; } sha1aix_tmp_t;
typedef struct sha256aix_tmp typedef struct sha256aix_tmp
{ {
uint ipad[8]; u32 ipad[8];
uint opad[8]; u32 opad[8];
uint dgst[8]; u32 dgst[8];
uint out[8]; u32 out[8];
} sha256aix_tmp_t; } sha256aix_tmp_t;
@ -489,11 +489,11 @@ typedef struct sha512aix_tmp
typedef struct lastpass_tmp typedef struct lastpass_tmp
{ {
uint ipad[8]; u32 ipad[8];
uint opad[8]; u32 opad[8];
uint dgst[8]; u32 dgst[8];
uint out[8]; u32 out[8];
} lastpass_tmp_t; } lastpass_tmp_t;
@ -505,23 +505,23 @@ typedef struct drupal7_tmp
typedef struct lotus8_tmp typedef struct lotus8_tmp
{ {
uint ipad[5]; u32 ipad[5];
uint opad[5]; u32 opad[5];
uint dgst[5]; u32 dgst[5];
uint out[5]; u32 out[5];
} lotus8_tmp_t; } lotus8_tmp_t;
typedef struct office2007_tmp typedef struct office2007_tmp
{ {
uint out[5]; u32 out[5];
} office2007_tmp_t; } office2007_tmp_t;
typedef struct office2010_tmp typedef struct office2010_tmp
{ {
uint out[5]; u32 out[5];
} office2010_tmp_t; } office2010_tmp_t;
@ -533,7 +533,7 @@ typedef struct office2013_tmp
typedef struct saph_sha1_tmp typedef struct saph_sha1_tmp
{ {
uint digest_buf[5]; u32 digest_buf[5];
} saph_sha1_tmp_t; } saph_sha1_tmp_t;
@ -595,50 +595,50 @@ typedef struct oraclet_tmp
typedef struct seven_zip_tmp typedef struct seven_zip_tmp
{ {
uint block[16]; u32 block[16];
uint dgst[8]; u32 dgst[8];
uint block_len; u32 block_len;
uint final_len; u32 final_len;
} seven_zip_tmp_t; } seven_zip_tmp_t;
typedef struct bsdicrypt_tmp typedef struct bsdicrypt_tmp
{ {
uint Kc[16]; u32 Kc[16];
uint Kd[16]; u32 Kd[16];
uint iv[2]; u32 iv[2];
} bsdicrypt_tmp_t; } bsdicrypt_tmp_t;
typedef struct rar3_tmp typedef struct rar3_tmp
{ {
uint dgst[17][5]; u32 dgst[17][5];
} rar3_tmp_t; } rar3_tmp_t;
typedef struct cram_md5 typedef struct cram_md5
{ {
uint user[16]; u32 user[16];
} cram_md5_t; } cram_md5_t;
typedef struct seven_zip typedef struct seven_zip
{ {
uint iv_buf[4]; u32 iv_buf[4];
uint iv_len; u32 iv_len;
uint salt_buf[4]; u32 salt_buf[4];
uint salt_len; u32 salt_len;
uint crc; u32 crc;
uint data_buf[96]; u32 data_buf[96];
uint data_len; u32 data_len;
uint unpack_size; u32 unpack_size;
} seven_zip_t; } seven_zip_t;
@ -1340,174 +1340,174 @@ typedef enum rounds_count
* input functions * input functions
*/ */
int bcrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int bcrypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int cisco4_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int cisco4_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int dcc_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int dcc_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int dcc2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int dcc2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int descrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int descrypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int des_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int des_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int episerver_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int episerver_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int ipb2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int ipb2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int joomla_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int joomla_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int postgresql_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int postgresql_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int netscreen_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int netscreen_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int keccak_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int keccak_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int lm_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int lm_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md4_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md4_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md4s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md4s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5half_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5half_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5md5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5pix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5pix_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5asa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5asa_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5apr1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5apr1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5crypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5crypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mssql2000_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mssql2000_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mssql2005_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mssql2005_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int netntlmv1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int netntlmv1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int netntlmv2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int netntlmv2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oracleh_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oracleh_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oracles_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oracles_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oraclet_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oraclet_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int osc_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int osc_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int arubaos_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int arubaos_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int osx1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int osx1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int osx512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int osx512_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int phpass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int phpass_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha1b64_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha1b64_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha1b64s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha1b64s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha1s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha1s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha256_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha256s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha256s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha384_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha384_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512crypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512crypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int smf_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int smf_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int vb3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int vb3_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int vb30_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int vb30_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int wpa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int wpa_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int psafe2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int psafe2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int psafe3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int psafe3_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int ikepsk_md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int ikepsk_md5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int ikepsk_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int ikepsk_sha1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int androidpin_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int androidpin_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int ripemd160_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int ripemd160_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int whirlpool_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int whirlpool_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int truecrypt_parse_hash_1k (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int truecrypt_parse_hash_1k (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int truecrypt_parse_hash_2k (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int truecrypt_parse_hash_2k (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int md5aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int md5aix_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha256aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha256aix_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512aix_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int agilekey_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int agilekey_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha1aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha1aix_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int lastpass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int lastpass_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int gost_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int gost_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha256crypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha256crypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mssql2012_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mssql2012_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512osx_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512osx_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int episerver4_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int episerver4_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512grub_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512grub_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha512b64s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha512b64s_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int hmacsha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int hmacsha1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int hmacsha256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int hmacsha256_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int hmacsha512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int hmacsha512_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int hmacmd5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int hmacmd5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int krb5pa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int krb5pa_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int krb5tgs_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int krb5tgs_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sapb_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sapb_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sapg_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sapg_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int drupal7_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int drupal7_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sybasease_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sybasease_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mysql323_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mysql323_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int rakp_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int rakp_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int netscaler_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int netscaler_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int chap_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int chap_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int cloudkey_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int cloudkey_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int nsec3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int nsec3_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int wbb3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int wbb3_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int racf_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int racf_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int lotus5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int lotus5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int lotus6_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int lotus6_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int lotus8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int lotus8_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int hmailserver_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int hmailserver_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int phps_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int phps_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mediawiki_b_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mediawiki_b_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int peoplesoft_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int peoplesoft_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int skype_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int skype_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int androidfde_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int androidfde_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int scrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int scrypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int juniper_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int juniper_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int cisco8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int cisco8_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int cisco9_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int cisco9_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int office2007_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int office2007_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int office2010_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int office2010_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int office2013_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int office2013_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oldoffice01_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oldoffice01_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oldoffice01cm1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oldoffice01cm1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oldoffice01cm2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oldoffice01cm2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oldoffice34_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oldoffice34_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oldoffice34cm1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oldoffice34cm1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int oldoffice34cm2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int oldoffice34cm2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int radmin2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int radmin2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int djangosha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int djangosha1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int djangopbkdf2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int djangopbkdf2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int siphash_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int siphash_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int crammd5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int crammd5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int saph_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int saph_sha1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int redmine_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int redmine_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pdf11_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pdf11_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pdf11cm1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pdf11cm1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pdf11cm2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pdf11cm2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pdf14_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pdf14_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pdf17l3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pdf17l3_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pdf17l8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pdf17l8_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pbkdf2_sha256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pbkdf2_sha256_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int prestashop_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int prestashop_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int postgresql_auth_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int postgresql_auth_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mysql_auth_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mysql_auth_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int bitcoin_wallet_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int bitcoin_wallet_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sip_auth_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sip_auth_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int crc32_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int crc32_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int seven_zip_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int seven_zip_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int gost2012sbog_256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int gost2012sbog_256_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int gost2012sbog_512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int gost2012sbog_512_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pbkdf2_md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pbkdf2_md5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pbkdf2_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pbkdf2_sha1_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pbkdf2_sha512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pbkdf2_sha512_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int ecryptfs_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int ecryptfs_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int bsdicrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int bsdicrypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int rar3hp_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int rar3hp_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int rar5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int rar5_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int cf10_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int cf10_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int mywallet_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int mywallet_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int ms_drsr_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int ms_drsr_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int androidfde_samsung_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int androidfde_samsung_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int axcrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int axcrypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int sha1axcrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int sha1axcrypt_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int keepass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int keepass_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int pstoken_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int pstoken_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int zip2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int zip2_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int veracrypt_parse_hash_200000 (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int veracrypt_parse_hash_200000 (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int veracrypt_parse_hash_500000 (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int veracrypt_parse_hash_500000 (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int veracrypt_parse_hash_327661 (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int veracrypt_parse_hash_327661 (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int veracrypt_parse_hash_655331 (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int veracrypt_parse_hash_655331 (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int win8phone_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int win8phone_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
int opencart_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf, const hashconfig_t *hashconfig); int opencart_parse_hash (char *input_buf, u32 input_len, hash_t *hash_buf, const hashconfig_t *hashconfig);
/** /**
* output functions * output functions
*/ */
char *stroptitype (const uint opti_type); char *stroptitype (const u32 opti_type);
char *strhashtype (const uint hash_mode); char *strhashtype (const u32 hash_mode);
char *strparser (const uint parser_status); char *strparser (const u32 parser_status);
void to_hccap_t (hccap_t *hccap, const uint salt_pos, const uint digest_pos, const hashconfig_t *hashconfig, const hashes_t *hashes); void to_hccap_t (hccap_t *hccap, const u32 salt_pos, const u32 digest_pos, const hashconfig_t *hashconfig, const hashes_t *hashes);
void ascii_digest (char *out_buf, const uint salt_pos, const uint digest_pos, const hashconfig_t *hashconfig, const hashes_t *hashes); void ascii_digest (char *out_buf, const u32 salt_pos, const u32 digest_pos, const hashconfig_t *hashconfig, const hashes_t *hashes);
int hashconfig_init (hashconfig_t *hashconfig, const user_options_t *user_options); int hashconfig_init (hashconfig_t *hashconfig, const user_options_t *user_options);
void hashconfig_destroy (hashconfig_t *hashconfig); void hashconfig_destroy (hashconfig_t *hashconfig);

View File

@ -20,21 +20,21 @@
#define INCR_MASKS 1000 #define INCR_MASKS 1000
void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]); void mp_css_to_uniq_tbl (u32 css_cnt, cs_t *css, u32 uniq_tbls[SP_PW_MAX][CHARSIZ]);
void mp_cut_at (char *mask, uint max); void mp_cut_at (char *mask, u32 max);
uint mp_get_length (char *mask); u32 mp_get_length (char *mask);
void mp_exec (u64 val, char *buf, cs_t *css, int css_cnt); void mp_exec (u64 val, char *buf, cs_t *css, int css_cnt);
cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, uint *css_cnt, const hashconfig_t *hashconfig, const user_options_t *user_options); cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, u32 *css_cnt, const hashconfig_t *hashconfig, const user_options_t *user_options);
u64 mp_get_sum (uint css_cnt, cs_t *css); u64 mp_get_sum (u32 css_cnt, cs_t *css);
void mp_setup_sys (cs_t *mp_sys); void mp_setup_sys (cs_t *mp_sys);
void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, uint index, const hashconfig_t *hashconfig, const user_options_t *user_options); void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, u32 index, const hashconfig_t *hashconfig, const user_options_t *user_options);
void mp_reset_usr (cs_t *mp_usr, uint index); void mp_reset_usr (cs_t *mp_usr, u32 index);
u64 sp_get_sum (uint start, uint stop, cs_t *root_css_buf); u64 sp_get_sum (u32 start, u32 stop, cs_t *root_css_buf);
void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint start, uint stop); void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 start, u32 stop);
int sp_comp_val (const void *p1, const void *p2); int sp_comp_val (const void *p1, const void *p2);
void sp_setup_tbl (const char *install_dir, char *hcstat, uint disable, uint classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf); void sp_setup_tbl (const char *install_dir, char *hcstat, u32 disable, u32 classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf);
void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint threshold, uint uniq_tbls[SP_PW_MAX][CHARSIZ]); void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 threshold, u32 uniq_tbls[SP_PW_MAX][CHARSIZ]);
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out); void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out); void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);

View File

@ -20,18 +20,18 @@ static const char CL_VENDOR_POCL[] = "The pocl project";
int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw); int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, hashconfig_t *hashconfig, const hashes_t *hashes, const outfile_ctx_t *outfile_ctx, status_ctx_t *status_ctx, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration, const uint salt_pos); int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, hashconfig_t *hashconfig, const hashes_t *hashes, const outfile_ctx_t *outfile_ctx, status_ctx_t *status_ctx, const u32 highest_pw_len, const u32 pws_cnt, const u32 fast_iteration, const u32 salt_pos);
int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num, const uint event_update, const uint iteration, hashconfig_t *hashconfig, const user_options_t *user_options, status_ctx_t *status_ctx); int run_kernel (const u32 kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u32 num, const u32 event_update, const u32 iteration, hashconfig_t *hashconfig, const user_options_t *user_options, status_ctx_t *status_ctx);
int run_kernel_mp (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num); int run_kernel_mp (const u32 kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u32 num);
int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param); int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param);
int run_kernel_amp (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num); int run_kernel_amp (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u32 num);
int run_kernel_memset (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, cl_mem buf, const uint value, const uint num); int run_kernel_memset (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, cl_mem buf, const u32 value, const u32 num);
int run_kernel_bzero (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, cl_mem buf, const size_t size); int run_kernel_bzero (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, cl_mem buf, const size_t size);
int run_copy (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const combinator_ctx_t *combinator_ctx, const uint pws_cnt); int run_copy (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const combinator_ctx_t *combinator_ctx, const u32 pws_cnt);
int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const uint pws_cnt); int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 pws_cnt);
int opencl_ctx_init (opencl_ctx_t *opencl_ctx, const user_options_t *user_options); int opencl_ctx_init (opencl_ctx_t *opencl_ctx, const user_options_t *user_options);
void opencl_ctx_destroy (opencl_ctx_t *opencl_ctx); void opencl_ctx_destroy (opencl_ctx_t *opencl_ctx);

View File

@ -12,10 +12,10 @@
void outfile_init (outfile_ctx_t *outfile_ctx, const user_options_t *user_options); void outfile_init (outfile_ctx_t *outfile_ctx, const user_options_t *user_options);
void outfile_destroy (outfile_ctx_t *outfile_ctx); void outfile_destroy (outfile_ctx_t *outfile_ctx);
void outfile_format_plain (outfile_ctx_t *outfile_ctx, const unsigned char *plain_ptr, const uint plain_len); void outfile_format_plain (outfile_ctx_t *outfile_ctx, const unsigned char *plain_ptr, const u32 plain_len);
void outfile_write_open (outfile_ctx_t *outfile_ctx); void outfile_write_open (outfile_ctx_t *outfile_ctx);
void outfile_write_close (outfile_ctx_t *outfile_ctx); void outfile_write_close (outfile_ctx_t *outfile_ctx);
void outfile_write (outfile_ctx_t *outfile_ctx, const char *out_buf, const unsigned char *plain_ptr, const uint plain_len, const u64 crackpos, const unsigned char *username, const uint user_len, const hashconfig_t *hashconfig); void outfile_write (outfile_ctx_t *outfile_ctx, const char *out_buf, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, const hashconfig_t *hashconfig);
int outfile_and_hashfile (outfile_ctx_t *outfile_ctx, const char *hashfile); int outfile_and_hashfile (outfile_ctx_t *outfile_ctx, const char *hashfile);
#endif // _OUTFILE_H #endif // _OUTFILE_H

View File

@ -21,14 +21,14 @@ void hc_qsort_r (void *base, size_t nmemb, size_t size, int (*compar) (const vo
void *hc_bsearch_r (const void *key, const void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *, void *), void *arg); void *hc_bsearch_r (const void *key, const void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *, void *), void *arg);
void potfile_init (potfile_ctx_t *potfile_ctx, const user_options_t *user_options, const folder_config_t *folder_config); void potfile_init (potfile_ctx_t *potfile_ctx, const user_options_t *user_options, const folder_config_t *folder_config);
void potfile_format_plain (potfile_ctx_t *potfile_ctx, const unsigned char *plain_ptr, const uint plain_len); void potfile_format_plain (potfile_ctx_t *potfile_ctx, const unsigned char *plain_ptr, const u32 plain_len);
int potfile_read_open (potfile_ctx_t *potfile_ctx); int potfile_read_open (potfile_ctx_t *potfile_ctx);
void potfile_read_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig); void potfile_read_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig);
void potfile_read_close (potfile_ctx_t *potfile_ctx); void potfile_read_close (potfile_ctx_t *potfile_ctx);
int potfile_write_open (potfile_ctx_t *potfile_ctx); int potfile_write_open (potfile_ctx_t *potfile_ctx);
void potfile_write_close (potfile_ctx_t *potfile_ctx); void potfile_write_close (potfile_ctx_t *potfile_ctx);
void potfile_write_append (potfile_ctx_t *potfile_ctx, const char *out_buf, u8 *plain_ptr, unsigned int plain_len); void potfile_write_append (potfile_ctx_t *potfile_ctx, const char *out_buf, u8 *plain_ptr, unsigned int plain_len);
void potfile_hash_alloc (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, const uint num); void potfile_hash_alloc (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, const u32 num);
void potfile_hash_free (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig); void potfile_hash_free (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig);
void potfile_show_request (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, outfile_ctx_t *outfile_ctx, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *, void *)); void potfile_show_request (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, outfile_ctx_t *outfile_ctx, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *, void *));
void potfile_left_request (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, outfile_ctx_t *outfile_ctx, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *, void *)); void potfile_left_request (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, outfile_ctx_t *outfile_ctx, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *, void *));

View File

@ -25,7 +25,7 @@ int conv_itoc (const u8 c);
int generate_random_rule (char rule_buf[RP_RULE_BUFSIZ], const u32 rp_gen_func_min, const u32 rp_gen_func_max); int generate_random_rule (char rule_buf[RP_RULE_BUFSIZ], const u32 rp_gen_func_min, const u32 rp_gen_func_max);
int cpu_rule_to_kernel_rule (char *rule_buf, uint rule_len, kernel_rule_t *rule); int cpu_rule_to_kernel_rule (char *rule_buf, u32 rule_len, kernel_rule_t *rule);
int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule); int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule);
bool kernel_rules_has_noop (const kernel_rule_t *kernel_rules_buf, const u32 kernel_rules_cnt); bool kernel_rules_has_noop (const kernel_rule_t *kernel_rules_buf, const u32 kernel_rules_cnt);

View File

@ -20,6 +20,6 @@
#include <pwd.h> #include <pwd.h>
#endif // _POSIX #endif // _POSIX
void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const hashconfig_t *hashconfig, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, const outfile_ctx_t *outfile_ctx, const uint pws_cnt); void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const hashconfig_t *hashconfig, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, const outfile_ctx_t *outfile_ctx, const u32 pws_cnt);
#endif // _STDOUT_H #endif // _STDOUT_H

View File

@ -19,7 +19,7 @@
#if defined (_WIN) #if defined (_WIN)
#define hc_thread_create(t,f,a) t = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &f, a, 0, NULL) #define hc_thread_create(t,f,a) t = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &f, a, 0, NULL)
#define hc_thread_wait(n,a) for (uint i = 0; i < n; i++) WaitForSingleObject ((a)[i], INFINITE) #define hc_thread_wait(n,a) for (u32 i = 0; i < n; i++) WaitForSingleObject ((a)[i], INFINITE)
#define hc_thread_exit(t) ExitThread (t) #define hc_thread_exit(t) ExitThread (t)
#define hc_thread_mutex_lock(m) EnterCriticalSection (&m) #define hc_thread_mutex_lock(m) EnterCriticalSection (&m)
@ -30,7 +30,7 @@
#elif defined (_POSIX) #elif defined (_POSIX)
#define hc_thread_create(t,f,a) pthread_create (&t, NULL, f, a) #define hc_thread_create(t,f,a) pthread_create (&t, NULL, f, a)
#define hc_thread_wait(n,a) for (uint i = 0; i < n; i++) pthread_join ((a)[i], NULL) #define hc_thread_wait(n,a) for (u32 i = 0; i < n; i++) pthread_join ((a)[i], NULL)
#define hc_thread_exit(t) pthread_exit (&t) #define hc_thread_exit(t) pthread_exit (&t)
#define hc_thread_mutex_lock(m) pthread_mutex_lock (&m) #define hc_thread_mutex_lock(m) pthread_mutex_lock (&m)

View File

@ -37,8 +37,6 @@ typedef uint16_t u16;
typedef uint32_t u32; typedef uint32_t u32;
typedef uint64_t u64; typedef uint64_t u64;
typedef uint32_t uint; // we need to get rid of this sooner or later, for consistency
#include "ext_OpenCL.h" #include "ext_OpenCL.h"
#include "ext_ADL.h" #include "ext_ADL.h"
#include "ext_nvapi.h" #include "ext_nvapi.h"

View File

@ -6,6 +6,6 @@
#ifndef _WEAK_HASH_H #ifndef _WEAK_HASH_H
#define _WEAK_HASH_H #define _WEAK_HASH_H
void weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const uint salt_pos); void weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos);
#endif // _WEAK_HASH_H #endif // _WEAK_HASH_H

View File

@ -9,7 +9,7 @@
#include <time.h> #include <time.h>
#include <inttypes.h> #include <inttypes.h>
uint convert_from_hex (char *line_buf, const uint line_len, const user_options_t *user_options); u32 convert_from_hex (char *line_buf, const u32 line_len, const user_options_t *user_options);
void load_segment (wl_data_t *wl_data, FILE *fd); void load_segment (wl_data_t *wl_data, FILE *fd);
@ -17,7 +17,7 @@ void get_next_word_lm (char *buf, u64 sz, u64 *len, u64 *off);
void get_next_word_uc (char *buf, u64 sz, u64 *len, u64 *off); void get_next_word_uc (char *buf, u64 sz, u64 *len, u64 *off);
void get_next_word_std (char *buf, u64 sz, u64 *len, u64 *off); void get_next_word_std (char *buf, u64 sz, u64 *len, u64 *off);
void get_next_word (wl_data_t *wl_data, const user_options_t *user_options, const user_options_extra_t *user_options_extra, FILE *fd, char **out_buf, uint *out_len); void get_next_word (wl_data_t *wl_data, const user_options_t *user_options, const user_options_extra_t *user_options_extra, FILE *fd, char **out_buf, u32 *out_len);
void pw_add (hc_device_param_t *device_param, const u8 *pw_buf, const int pw_len); void pw_add (hc_device_param_t *device_param, const u8 *pw_buf, const int pw_len);

View File

@ -32,10 +32,10 @@ int sort_by_digest_p0p1 (const void *v1, const void *v2, void *v3)
hashconfig_t *hashconfig = (hashconfig_t *) v3; hashconfig_t *hashconfig = (hashconfig_t *) v3;
const uint dgst_pos0 = hashconfig->dgst_pos0; const u32 dgst_pos0 = hashconfig->dgst_pos0;
const uint dgst_pos1 = hashconfig->dgst_pos1; const u32 dgst_pos1 = hashconfig->dgst_pos1;
const uint dgst_pos2 = hashconfig->dgst_pos2; const u32 dgst_pos2 = hashconfig->dgst_pos2;
const uint dgst_pos3 = hashconfig->dgst_pos3; const u32 dgst_pos3 = hashconfig->dgst_pos3;
if (d1[dgst_pos3] > d2[dgst_pos3]) return 1; if (d1[dgst_pos3] > d2[dgst_pos3]) return 1;
if (d1[dgst_pos3] < d2[dgst_pos3]) return -1; if (d1[dgst_pos3] < d2[dgst_pos3]) return -1;
@ -62,7 +62,7 @@ int sort_by_salt (const void *v1, const void *v2)
if (res2 != 0) return (res2); if (res2 != 0) return (res2);
uint n; u32 n;
n = 16; n = 16;
@ -140,15 +140,15 @@ void save_hash (const user_options_t *user_options, const hashconfig_t *hashconf
exit (-1); exit (-1);
} }
for (uint salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
{ {
if (hashes->salts_shown[salt_pos] == 1) continue; if (hashes->salts_shown[salt_pos] == 1) continue;
salt_t *salt_buf = &hashes->salts_buf[salt_pos]; salt_t *salt_buf = &hashes->salts_buf[salt_pos];
for (uint digest_pos = 0; digest_pos < salt_buf->digests_cnt; digest_pos++) for (u32 digest_pos = 0; digest_pos < salt_buf->digests_cnt; digest_pos++)
{ {
uint idx = salt_buf->digests_offset + digest_pos; u32 idx = salt_buf->digests_offset + digest_pos;
if (hashes->digests_shown[idx] == 1) continue; if (hashes->digests_shown[idx] == 1) continue;
@ -158,7 +158,7 @@ void save_hash (const user_options_t *user_options, const hashconfig_t *hashconf
{ {
user_t *user = hashes->hash_info[idx]->user; user_t *user = hashes->hash_info[idx]->user;
uint i; u32 i;
for (i = 0; i < user->user_len; i++) fputc (user->user_name[i], fp); for (i = 0; i < user->user_len; i++) fputc (user->user_name[i], fp);
@ -250,7 +250,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
u64 crackpos = device_param->words_off; u64 crackpos = device_param->words_off;
uint plain_buf[16] = { 0 }; u32 plain_buf[16] = { 0 };
u8 *plain_ptr = (u8 *) plain_buf; u8 *plain_ptr = (u8 *) plain_buf;
int plain_len = 0; int plain_len = 0;
@ -268,9 +268,9 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
plain_len = (int) pw.pw_len; plain_len = (int) pw.pw_len;
const uint off = device_param->innerloop_pos + il_pos; const u32 off = device_param->innerloop_pos + il_pos;
const uint debug_mode = debugfile_ctx->mode; const u32 debug_mode = debugfile_ctx->mode;
if (debug_mode > 0) if (debug_mode > 0)
{ {
@ -346,11 +346,11 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
u64 l_off = device_param->kernel_params_mp_l_buf64[3] + gidvid; u64 l_off = device_param->kernel_params_mp_l_buf64[3] + gidvid;
u64 r_off = device_param->kernel_params_mp_r_buf64[3] + il_pos; u64 r_off = device_param->kernel_params_mp_r_buf64[3] + il_pos;
uint l_start = device_param->kernel_params_mp_l_buf32[5]; u32 l_start = device_param->kernel_params_mp_l_buf32[5];
uint r_start = device_param->kernel_params_mp_r_buf32[5]; u32 r_start = device_param->kernel_params_mp_r_buf32[5];
uint l_stop = device_param->kernel_params_mp_l_buf32[4]; u32 l_stop = device_param->kernel_params_mp_l_buf32[4];
uint r_stop = device_param->kernel_params_mp_r_buf32[4]; u32 r_stop = device_param->kernel_params_mp_r_buf32[4];
sp_exec (l_off, (char *) plain_ptr + l_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, l_start, l_start + l_stop); sp_exec (l_off, (char *) plain_ptr + l_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, l_start, l_start + l_stop);
sp_exec (r_off, (char *) plain_ptr + r_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, r_start, r_start + r_stop); sp_exec (r_off, (char *) plain_ptr + r_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, r_start, r_start + r_stop);
@ -376,8 +376,8 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
u64 off = device_param->kernel_params_mp_buf64[3] + il_pos; u64 off = device_param->kernel_params_mp_buf64[3] + il_pos;
uint start = 0; u32 start = 0;
uint stop = device_param->kernel_params_mp_buf32[4]; u32 stop = device_param->kernel_params_mp_buf32[4];
sp_exec (off, (char *) plain_ptr + plain_len, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, start, start + stop); sp_exec (off, (char *) plain_ptr + plain_len, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, start, start + stop);
@ -407,8 +407,8 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
u64 off = device_param->kernel_params_mp_buf64[3] + il_pos; u64 off = device_param->kernel_params_mp_buf64[3] + il_pos;
uint start = 0; u32 start = 0;
uint stop = device_param->kernel_params_mp_buf32[4]; u32 stop = device_param->kernel_params_mp_buf32[4];
memmove (plain_ptr + stop, plain_ptr, plain_len); memmove (plain_ptr + stop, plain_ptr, plain_len);
@ -498,7 +498,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
} }
} }
int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const uint salt_pos) int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos)
{ {
cpt_ctx_t *cpt_ctx = hashcat_ctx->cpt_ctx; cpt_ctx_t *cpt_ctx = hashcat_ctx->cpt_ctx;
hashconfig_t *hashconfig = hashcat_ctx->hashconfig; hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
@ -538,13 +538,13 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
return -1; return -1;
} }
uint cpt_cracked = 0; u32 cpt_cracked = 0;
hc_thread_mutex_lock (status_ctx->mux_display); hc_thread_mutex_lock (status_ctx->mux_display);
for (uint i = 0; i < num_cracked; i++) for (u32 i = 0; i < num_cracked; i++)
{ {
const uint hash_pos = cracked[i].hash_pos; const u32 hash_pos = cracked[i].hash_pos;
if (hashes->digests_shown[hash_pos] == 1) continue; if (hashes->digests_shown[hash_pos] == 1) continue;
@ -597,9 +597,9 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
// otherwise host thinks again and again the hash was cracked // otherwise host thinks again and again the hash was cracked
// and returns invalid password each time // and returns invalid password each time
memset (hashes->digests_shown_tmp, 0, salt_buf->digests_cnt * sizeof (uint)); memset (hashes->digests_shown_tmp, 0, salt_buf->digests_cnt * sizeof (u32));
CL_err = hc_clEnqueueWriteBuffer (opencl_ctx->ocl, device_param->command_queue, device_param->d_digests_shown, CL_TRUE, salt_buf->digests_offset * sizeof (uint), salt_buf->digests_cnt * sizeof (uint), &hashes->digests_shown_tmp[salt_buf->digests_offset], 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (opencl_ctx->ocl, device_param->command_queue, device_param->d_digests_shown, CL_TRUE, salt_buf->digests_offset * sizeof (u32), salt_buf->digests_cnt * sizeof (u32), &hashes->digests_shown_tmp[salt_buf->digests_offset], 0, NULL, NULL);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -630,10 +630,10 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
* load hashes, part I: find input mode, count hashes * load hashes, part I: find input mode, count hashes
*/ */
uint hashlist_mode = 0; u32 hashlist_mode = 0;
uint hashlist_format = HLFMT_HASHCAT; u32 hashlist_format = HLFMT_HASHCAT;
uint hashes_avail = 0; u32 hashes_avail = 0;
if ((user_options->benchmark == false) && (user_options->stdout_flag == false)) if ((user_options->benchmark == false) && (user_options->stdout_flag == false))
{ {
@ -779,7 +779,7 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
salts_buf = (salt_t *) mycalloc (1, sizeof (salt_t)); salts_buf = (salt_t *) mycalloc (1, sizeof (salt_t));
} }
for (uint hash_pos = 0; hash_pos < hashes_avail; hash_pos++) for (u32 hash_pos = 0; hash_pos < hashes_avail; hash_pos++)
{ {
hashes_buf[hash_pos].digest = ((char *) digests_buf) + (hash_pos * hashconfig->dgst_size); hashes_buf[hash_pos].digest = ((char *) digests_buf) + (hash_pos * hashconfig->dgst_size);
@ -807,7 +807,7 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
* load hashes, part III: parse hashes or generate them if benchmark * load hashes, part III: parse hashes or generate them if benchmark
*/ */
uint hashes_cnt = 0; u32 hashes_cnt = 0;
if (user_options->benchmark == true) if (user_options->benchmark == true)
{ {
@ -836,7 +836,7 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
{ {
char *input_buf = hash_or_file; char *input_buf = hash_or_file;
uint input_len = strlen (input_buf); u32 input_len = strlen (input_buf);
char *hash_buf = NULL; char *hash_buf = NULL;
int hash_len = 0; int hash_len = 0;
@ -899,7 +899,7 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
return -1; return -1;
} }
uint hccap_size = sizeof (hccap_t); u32 hccap_size = sizeof (hccap_t);
char *in = (char *) mymalloc (hccap_size); char *in = (char *) mymalloc (hccap_size);
@ -1070,7 +1070,7 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
return -1; return -1;
} }
uint line_num = 0; u32 line_num = 0;
char *line_buf = (char *) mymalloc (HCBUFSIZ_LARGE); char *line_buf = (char *) mymalloc (HCBUFSIZ_LARGE);
@ -1242,7 +1242,7 @@ int hashes_init_stage1 (hashes_t *hashes, const hashconfig_t *hashconfig, potfil
int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_options_t *user_options, status_ctx_t *status_ctx) int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_options_t *user_options, status_ctx_t *status_ctx)
{ {
hash_t *hashes_buf = hashes->hashes_buf; hash_t *hashes_buf = hashes->hashes_buf;
uint hashes_cnt = hashes->hashes_cnt; u32 hashes_cnt = hashes->hashes_cnt;
/** /**
* Remove duplicates * Remove duplicates
@ -1252,7 +1252,7 @@ int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_o
hashes_cnt = 1; hashes_cnt = 1;
for (uint hashes_pos = 1; hashes_pos < hashes->hashes_cnt; hashes_pos++) for (u32 hashes_pos = 1; hashes_pos < hashes->hashes_cnt; hashes_pos++)
{ {
if (hashconfig->is_salted) if (hashconfig->is_salted)
{ {
@ -1300,14 +1300,14 @@ int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_o
if (user_options->quiet == false) log_info_nn ("Structuring salts for cracking task..."); if (user_options->quiet == false) log_info_nn ("Structuring salts for cracking task...");
uint digests_cnt = hashes_cnt; u32 digests_cnt = hashes_cnt;
uint digests_done = 0; u32 digests_done = 0;
uint *digests_shown = (uint *) mycalloc (digests_cnt, sizeof (uint)); u32 *digests_shown = (u32 *) mycalloc (digests_cnt, sizeof (u32));
uint *digests_shown_tmp = (uint *) mycalloc (digests_cnt, sizeof (uint)); u32 *digests_shown_tmp = (u32 *) mycalloc (digests_cnt, sizeof (u32));
uint salts_cnt = 0; u32 salts_cnt = 0;
uint salts_done = 0; u32 salts_done = 0;
hashinfo_t **hash_info = NULL; hashinfo_t **hash_info = NULL;
@ -1317,7 +1317,7 @@ int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_o
if (user_options->username && (user_options->remove || user_options->show)) if (user_options->username && (user_options->remove || user_options->show))
{ {
uint user_pos; u32 user_pos;
for (user_pos = 0; user_pos < hashes_cnt; user_pos++) for (user_pos = 0; user_pos < hashes_cnt; user_pos++)
{ {
@ -1328,7 +1328,7 @@ int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_o
} }
} }
uint *salts_shown = (uint *) mycalloc (digests_cnt, sizeof (uint)); u32 *salts_shown = (u32 *) mycalloc (digests_cnt, sizeof (u32));
salt_t *salt_buf; salt_t *salt_buf;
@ -1371,7 +1371,7 @@ int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_o
// copy from inner loop // copy from inner loop
for (uint hashes_pos = 1; hashes_pos < hashes_cnt; hashes_pos++) for (u32 hashes_pos = 1; hashes_pos < hashes_cnt; hashes_pos++)
{ {
if (hashconfig->is_salted) if (hashconfig->is_salted)
{ {
@ -1413,7 +1413,7 @@ int hashes_init_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, user_o
} }
} }
for (uint salt_pos = 0; salt_pos < salts_cnt; salt_pos++) for (u32 salt_pos = 0; salt_pos < salts_cnt; salt_pos++)
{ {
salt_t *salt_buf = &salts_buf_new[salt_pos]; salt_t *salt_buf = &salts_buf_new[salt_pos];

View File

@ -285,7 +285,7 @@ static void hlfmt_user_shadow (char *line_buf, int line_len, char **userbuf_pos,
// hlfmt main // hlfmt main
char *strhlfmt (const uint hashfile_format) char *strhlfmt (const u32 hashfile_format)
{ {
switch (hashfile_format) switch (hashfile_format)
{ {
@ -304,7 +304,7 @@ char *strhlfmt (const uint hashfile_format)
return ((char *) "Unknown"); return ((char *) "Unknown");
} }
void hlfmt_hash (uint hashfile_format, char *line_buf, int line_len, char **hashbuf_pos, int *hashbuf_len, const hashconfig_t *hashconfig, const user_options_t *user_options) void hlfmt_hash (u32 hashfile_format, char *line_buf, int line_len, char **hashbuf_pos, int *hashbuf_len, const hashconfig_t *hashconfig, const user_options_t *user_options)
{ {
switch (hashfile_format) switch (hashfile_format)
{ {
@ -315,7 +315,7 @@ void hlfmt_hash (uint hashfile_format, char *line_buf, int line_len, char **hash
} }
} }
void hlfmt_user (uint hashfile_format, char *line_buf, int line_len, char **userbuf_pos, int *userbuf_len, const hashconfig_t *hashconfig) void hlfmt_user (u32 hashfile_format, char *line_buf, int line_len, char **userbuf_pos, int *userbuf_len, const hashconfig_t *hashconfig)
{ {
switch (hashfile_format) switch (hashfile_format)
{ {
@ -326,16 +326,16 @@ void hlfmt_user (uint hashfile_format, char *line_buf, int line_len, char **user
} }
} }
uint hlfmt_detect (FILE *fp, uint max_check, const hashconfig_t *hashconfig) u32 hlfmt_detect (FILE *fp, u32 max_check, const hashconfig_t *hashconfig)
{ {
// Exception: those formats are wrongly detected as HLFMT_SHADOW, prevent it // Exception: those formats are wrongly detected as HLFMT_SHADOW, prevent it
if (hashconfig->hash_mode == 5300) return HLFMT_HASHCAT; if (hashconfig->hash_mode == 5300) return HLFMT_HASHCAT;
if (hashconfig->hash_mode == 5400) return HLFMT_HASHCAT; if (hashconfig->hash_mode == 5400) return HLFMT_HASHCAT;
uint *formats_cnt = (uint *) mycalloc (HLFMTS_CNT, sizeof (uint)); u32 *formats_cnt = (u32 *) mycalloc (HLFMTS_CNT, sizeof (u32));
uint num_check = 0; u32 num_check = 0;
char *line_buf = (char *) mymalloc (HCBUFSIZ_LARGE); char *line_buf = (char *) mymalloc (HCBUFSIZ_LARGE);

View File

@ -54,7 +54,7 @@ static int hm_get_adapter_index_nvml (const hwmon_ctx_t *hwmon_ctx, HM_ADAPTER_N
{ {
int pGpuCount = 0; int pGpuCount = 0;
for (uint i = 0; i < DEVICES_MAX; i++) for (u32 i = 0; i < DEVICES_MAX; i++)
{ {
if (hm_NVML_nvmlDeviceGetHandleByIndex (hwmon_ctx->hm_nvml, 1, i, &nvmlGPUHandle[i]) != NVML_SUCCESS) break; if (hm_NVML_nvmlDeviceGetHandleByIndex (hwmon_ctx->hm_nvml, 1, i, &nvmlGPUHandle[i]) != NVML_SUCCESS) break;
@ -99,7 +99,7 @@ static void hm_sort_adl_adapters_by_busid_devid (u32 *valid_adl_device_list, int
u32 bus_num_y = info_y.iBusNumber; u32 bus_num_y = info_y.iBusNumber;
u32 dev_num_y = info_y.iDeviceNumber; u32 dev_num_y = info_y.iDeviceNumber;
uint need_swap = 0; u32 need_swap = 0;
if (bus_num_y < bus_num_x) if (bus_num_y < bus_num_x)
{ {
@ -312,7 +312,7 @@ static int hm_get_adapter_index_adl (hm_attrs_t *hm_device, u32 *valid_adl_devic
return num_adl_adapters; return num_adl_adapters;
} }
int hm_get_threshold_slowdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_threshold_slowdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -352,7 +352,7 @@ int hm_get_threshold_slowdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, cons
return -1; return -1;
} }
int hm_get_threshold_shutdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_threshold_shutdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -385,7 +385,7 @@ int hm_get_threshold_shutdown_with_device_id (const hwmon_ctx_t *hwmon_ctx, cons
return -1; return -1;
} }
int hm_get_temperature_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_temperature_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -420,7 +420,7 @@ int hm_get_temperature_with_device_id (const hwmon_ctx_t *hwmon_ctx, const openc
{ {
int temperature = 0; int temperature = 0;
if (hm_NVML_nvmlDeviceGetTemperature (hwmon_ctx->hm_nvml, 1, hwmon_ctx->hm_device[device_id].nvml, NVML_TEMPERATURE_GPU, (uint *) &temperature) != NVML_SUCCESS) return -1; if (hm_NVML_nvmlDeviceGetTemperature (hwmon_ctx->hm_nvml, 1, hwmon_ctx->hm_device[device_id].nvml, NVML_TEMPERATURE_GPU, (u32 *) &temperature) != NVML_SUCCESS) return -1;
return temperature; return temperature;
} }
@ -428,7 +428,7 @@ int hm_get_temperature_with_device_id (const hwmon_ctx_t *hwmon_ctx, const openc
return -1; return -1;
} }
int hm_get_fanpolicy_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_fanpolicy_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -469,7 +469,7 @@ int hm_get_fanpolicy_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_
return -1; return -1;
} }
int hm_get_fanspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_fanspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -512,7 +512,7 @@ int hm_get_fanspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_c
{ {
int speed = 0; int speed = 0;
if (hm_NVML_nvmlDeviceGetFanSpeed (hwmon_ctx->hm_nvml, 0, hwmon_ctx->hm_device[device_id].nvml, (uint *) &speed) != NVML_SUCCESS) return -1; if (hm_NVML_nvmlDeviceGetFanSpeed (hwmon_ctx->hm_nvml, 0, hwmon_ctx->hm_device[device_id].nvml, (u32 *) &speed) != NVML_SUCCESS) return -1;
return speed; return speed;
} }
@ -521,7 +521,7 @@ int hm_get_fanspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_c
return -1; return -1;
} }
int hm_get_buslanes_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_buslanes_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -553,7 +553,7 @@ int hm_get_buslanes_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_c
return -1; return -1;
} }
int hm_get_utilization_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_utilization_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -585,7 +585,7 @@ int hm_get_utilization_with_device_id (const hwmon_ctx_t *hwmon_ctx, const openc
return -1; return -1;
} }
int hm_get_memoryspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_memoryspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -617,7 +617,7 @@ int hm_get_memoryspeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const openc
return -1; return -1;
} }
int hm_get_corespeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_corespeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -649,7 +649,7 @@ int hm_get_corespeed_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_
return -1; return -1;
} }
int hm_get_throttle_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const uint device_id) int hm_get_throttle_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_ctx_t *opencl_ctx, const u32 device_id)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -684,7 +684,7 @@ int hm_get_throttle_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_c
return -1; return -1;
} }
int hm_set_fanspeed_with_device_id_adl (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy) int hm_set_fanspeed_with_device_id_adl (const hwmon_ctx_t *hwmon_ctx, const u32 device_id, const int fanspeed, const int fanpolicy)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -744,7 +744,7 @@ int hm_set_fanspeed_with_device_id_adl (const hwmon_ctx_t *hwmon_ctx, const uint
return -1; return -1;
} }
int hm_set_fanspeed_with_device_id_nvapi (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy) int hm_set_fanspeed_with_device_id_nvapi (const hwmon_ctx_t *hwmon_ctx, const u32 device_id, const int fanspeed, const int fanpolicy)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -779,7 +779,7 @@ int hm_set_fanspeed_with_device_id_nvapi (const hwmon_ctx_t *hwmon_ctx, const ui
return -1; return -1;
} }
int hm_set_fanspeed_with_device_id_xnvctrl (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed) int hm_set_fanspeed_with_device_id_xnvctrl (const hwmon_ctx_t *hwmon_ctx, const u32 device_id, const int fanspeed)
{ {
if (hwmon_ctx->enabled == false) return -1; if (hwmon_ctx->enabled == false) return -1;
@ -898,7 +898,7 @@ int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options,
{ {
if (hm_XNVCTRL_XOpenDisplay (hwmon_ctx->hm_xnvctrl) == 0) if (hm_XNVCTRL_XOpenDisplay (hwmon_ctx->hm_xnvctrl) == 0)
{ {
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -980,7 +980,7 @@ int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options,
* HM devices: copy * HM devices: copy
*/ */
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -988,7 +988,7 @@ int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options,
if ((device_param->device_type & CL_DEVICE_TYPE_GPU) == 0) continue; if ((device_param->device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
const uint platform_devices_id = device_param->platform_devices_id; const u32 platform_devices_id = device_param->platform_devices_id;
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->device_vendor_id == VENDOR_ID_AMD)
{ {
@ -1022,7 +1022,7 @@ int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options,
* powertune on user request * powertune on user request
*/ */
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -1210,7 +1210,7 @@ int hwmon_ctx_init (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_options,
if (user_options->gpu_temp_retain) if (user_options->gpu_temp_retain)
{ {
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -1275,7 +1275,7 @@ void hwmon_ctx_destroy (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_optio
if (user_options->gpu_temp_retain) if (user_options->gpu_temp_retain)
{ {
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -1307,7 +1307,7 @@ void hwmon_ctx_destroy (hwmon_ctx_t *hwmon_ctx, const user_options_t *user_optio
// reset power tuning // reset power tuning
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ static const char DEF_MASK[] = "?1?2?2?2?2?2?2?3?3?3?3?d?d?d?d";
#define MAX_MFS 5 // 4*charset, 1*mask #define MAX_MFS 5 // 4*charset, 1*mask
void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]) void mp_css_to_uniq_tbl (u32 css_cnt, cs_t *css, u32 uniq_tbls[SP_PW_MAX][CHARSIZ])
{ {
/* generates a lookup table where key is the char itself for fastest possible lookup performance */ /* generates a lookup table where key is the char itself for fastest possible lookup performance */
@ -31,44 +31,44 @@ void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHAR
exit (-1); exit (-1);
} }
for (uint css_pos = 0; css_pos < css_cnt; css_pos++) for (u32 css_pos = 0; css_pos < css_cnt; css_pos++)
{ {
uint *uniq_tbl = uniq_tbls[css_pos]; u32 *uniq_tbl = uniq_tbls[css_pos];
uint *cs_buf = css[css_pos].cs_buf; u32 *cs_buf = css[css_pos].cs_buf;
uint cs_len = css[css_pos].cs_len; u32 cs_len = css[css_pos].cs_len;
for (uint cs_pos = 0; cs_pos < cs_len; cs_pos++) for (u32 cs_pos = 0; cs_pos < cs_len; cs_pos++)
{ {
uint c = cs_buf[cs_pos] & 0xff; u32 c = cs_buf[cs_pos] & 0xff;
uniq_tbl[c] = 1; uniq_tbl[c] = 1;
} }
} }
} }
static void mp_add_cs_buf (uint *in_buf, size_t in_len, cs_t *css, uint css_cnt, const hashconfig_t *hashconfig) static void mp_add_cs_buf (u32 *in_buf, size_t in_len, cs_t *css, u32 css_cnt, const hashconfig_t *hashconfig)
{ {
cs_t *cs = &css[css_cnt]; cs_t *cs = &css[css_cnt];
size_t css_uniq_sz = CHARSIZ * sizeof (uint); size_t css_uniq_sz = CHARSIZ * sizeof (u32);
uint *css_uniq = (uint *) mymalloc (css_uniq_sz); u32 *css_uniq = (u32 *) mymalloc (css_uniq_sz);
size_t i; size_t i;
for (i = 0; i < cs->cs_len; i++) for (i = 0; i < cs->cs_len; i++)
{ {
const uint u = cs->cs_buf[i]; const u32 u = cs->cs_buf[i];
css_uniq[u] = 1; css_uniq[u] = 1;
} }
for (i = 0; i < in_len; i++) for (i = 0; i < in_len; i++)
{ {
uint u = in_buf[i] & 0xff; u32 u = in_buf[i] & 0xff;
if (hashconfig->opts_type & OPTS_TYPE_PT_UPPER) u = (uint) toupper (u); if (hashconfig->opts_type & OPTS_TYPE_PT_UPPER) u = (u32) toupper (u);
if (css_uniq[u] == 1) continue; if (css_uniq[u] == 1) continue;
@ -82,13 +82,13 @@ static void mp_add_cs_buf (uint *in_buf, size_t in_len, cs_t *css, uint css_cnt,
myfree (css_uniq); myfree (css_uniq);
} }
static void mp_expand (char *in_buf, size_t in_len, cs_t *mp_sys, cs_t *mp_usr, uint mp_usr_offset, int interpret, const hashconfig_t *hashconfig, const user_options_t *user_options) static void mp_expand (char *in_buf, size_t in_len, cs_t *mp_sys, cs_t *mp_usr, u32 mp_usr_offset, int interpret, const hashconfig_t *hashconfig, const user_options_t *user_options)
{ {
size_t in_pos; size_t in_pos;
for (in_pos = 0; in_pos < in_len; in_pos++) for (in_pos = 0; in_pos < in_len; in_pos++)
{ {
uint p0 = in_buf[in_pos] & 0xff; u32 p0 = in_buf[in_pos] & 0xff;
if (interpret == 1 && p0 == '?') if (interpret == 1 && p0 == '?')
{ {
@ -96,7 +96,7 @@ static void mp_expand (char *in_buf, size_t in_len, cs_t *mp_sys, cs_t *mp_usr,
if (in_pos == in_len) break; if (in_pos == in_len) break;
uint p1 = in_buf[in_pos] & 0xff; u32 p1 = in_buf[in_pos] & 0xff;
switch (p1) switch (p1)
{ {
@ -143,7 +143,7 @@ static void mp_expand (char *in_buf, size_t in_len, cs_t *mp_sys, cs_t *mp_usr,
exit (-1); exit (-1);
} }
uint p1 = in_buf[in_pos] & 0xff; u32 p1 = in_buf[in_pos] & 0xff;
if ((is_valid_hex_char ((u8) p0) == false) || (is_valid_hex_char ((u8) p1) == false)) if ((is_valid_hex_char ((u8) p0) == false) || (is_valid_hex_char ((u8) p1) == false))
{ {
@ -152,16 +152,16 @@ static void mp_expand (char *in_buf, size_t in_len, cs_t *mp_sys, cs_t *mp_usr,
exit (-1); exit (-1);
} }
uint chr = 0; u32 chr = 0;
chr = (uint) hex_convert ((u8) p1) << 0; chr = (u32) hex_convert ((u8) p1) << 0;
chr |= (uint) hex_convert ((u8) p0) << 4; chr |= (u32) hex_convert ((u8) p0) << 4;
mp_add_cs_buf (&chr, 1, mp_usr, mp_usr_offset, hashconfig); mp_add_cs_buf (&chr, 1, mp_usr, mp_usr_offset, hashconfig);
} }
else else
{ {
uint chr = p0; u32 chr = p0;
mp_add_cs_buf (&chr, 1, mp_usr, mp_usr_offset, hashconfig); mp_add_cs_buf (&chr, 1, mp_usr, mp_usr_offset, hashconfig);
} }
@ -169,11 +169,11 @@ static void mp_expand (char *in_buf, size_t in_len, cs_t *mp_sys, cs_t *mp_usr,
} }
} }
u64 mp_get_sum (uint css_cnt, cs_t *css) u64 mp_get_sum (u32 css_cnt, cs_t *css)
{ {
u64 sum = 1; u64 sum = 1;
for (uint css_pos = 0; css_pos < css_cnt; css_pos++) for (u32 css_pos = 0; css_pos < css_cnt; css_pos++)
{ {
sum *= css[css_pos].cs_len; sum *= css[css_pos].cs_len;
} }
@ -181,12 +181,12 @@ u64 mp_get_sum (uint css_cnt, cs_t *css)
return (sum); return (sum);
} }
cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, uint *css_cnt, const hashconfig_t *hashconfig, const user_options_t *user_options) cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, u32 *css_cnt, const hashconfig_t *hashconfig, const user_options_t *user_options)
{ {
cs_t *css = (cs_t *) mycalloc (256, sizeof (cs_t)); cs_t *css = (cs_t *) mycalloc (256, sizeof (cs_t));
uint mask_pos; u32 mask_pos;
uint css_pos; u32 css_pos;
for (mask_pos = 0, css_pos = 0; mask_pos < mask_len; mask_pos++, css_pos++) for (mask_pos = 0, css_pos = 0; mask_pos < mask_len; mask_pos++, css_pos++)
{ {
@ -200,7 +200,7 @@ cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, u
char p1 = mask_buf[mask_pos]; char p1 = mask_buf[mask_pos];
uint chr = (uint) p1; u32 chr = (u32) p1;
switch (p1) switch (p1)
{ {
@ -260,16 +260,16 @@ cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, u
exit (-1); exit (-1);
} }
uint chr = 0; u32 chr = 0;
chr |= (uint) hex_convert ((u8) p1) << 0; chr |= (u32) hex_convert ((u8) p1) << 0;
chr |= (uint) hex_convert ((u8) p0) << 4; chr |= (u32) hex_convert ((u8) p0) << 4;
mp_add_cs_buf (&chr, 1, css, css_pos, hashconfig); mp_add_cs_buf (&chr, 1, css, css_pos, hashconfig);
} }
else else
{ {
uint chr = (uint) p0; u32 chr = (u32) p0;
mp_add_cs_buf (&chr, 1, css, css_pos, hashconfig); mp_add_cs_buf (&chr, 1, css, css_pos, hashconfig);
} }
@ -300,13 +300,13 @@ void mp_exec (u64 val, char *buf, cs_t *css, int css_cnt)
} }
} }
uint mp_get_length (char *mask) u32 mp_get_length (char *mask)
{ {
uint len = 0; u32 len = 0;
uint mask_len = strlen (mask); u32 mask_len = strlen (mask);
for (uint i = 0; i < mask_len; i++) for (u32 i = 0; i < mask_len; i++)
{ {
if (mask[i] == '?') i++; if (mask[i] == '?') i++;
@ -316,11 +316,11 @@ uint mp_get_length (char *mask)
return len; return len;
} }
void mp_cut_at (char *mask, uint max) void mp_cut_at (char *mask, u32 max)
{ {
uint i; u32 i;
uint j; u32 j;
uint mask_len = strlen (mask); u32 mask_len = strlen (mask);
for (i = 0, j = 0; i < mask_len && j < max; i++, j++) for (i = 0, j = 0; i < mask_len && j < max; i++, j++)
{ {
@ -332,9 +332,9 @@ void mp_cut_at (char *mask, uint max)
void mp_setup_sys (cs_t *mp_sys) void mp_setup_sys (cs_t *mp_sys)
{ {
uint pos; u32 pos;
uint chr; u32 chr;
uint donec[CHARSIZ] = { 0 }; u32 donec[CHARSIZ] = { 0 };
for (pos = 0, chr = 'a'; chr <= 'z'; chr++) { donec[chr] = 1; for (pos = 0, chr = 'a'; chr <= 'z'; chr++) { donec[chr] = 1;
mp_sys[0].cs_buf[pos++] = chr; mp_sys[0].cs_buf[pos++] = chr;
@ -359,7 +359,7 @@ void mp_setup_sys (cs_t *mp_sys)
mp_sys[5].cs_len = pos; } mp_sys[5].cs_len = pos; }
} }
void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, uint index, const hashconfig_t *hashconfig, const user_options_t *user_options) void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, u32 index, const hashconfig_t *hashconfig, const user_options_t *user_options)
{ {
FILE *fp = fopen (buf, "rb"); FILE *fp = fopen (buf, "rb");
@ -390,20 +390,20 @@ void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, uint index, const hash
} }
} }
void mp_reset_usr (cs_t *mp_usr, uint index) void mp_reset_usr (cs_t *mp_usr, u32 index)
{ {
mp_usr[index].cs_len = 0; mp_usr[index].cs_len = 0;
memset (mp_usr[index].cs_buf, 0, sizeof (mp_usr[index].cs_buf)); memset (mp_usr[index].cs_buf, 0, sizeof (mp_usr[index].cs_buf));
} }
static char *mp_get_truncated_mask (const char *mask_buf, const size_t mask_len, const uint len, const user_options_t *user_options) static char *mp_get_truncated_mask (const char *mask_buf, const size_t mask_len, const u32 len, const user_options_t *user_options)
{ {
char *new_mask_buf = (char *) mymalloc (256); char *new_mask_buf = (char *) mymalloc (256);
uint mask_pos; u32 mask_pos;
uint css_pos; u32 css_pos;
for (mask_pos = 0, css_pos = 0; mask_pos < mask_len; mask_pos++, css_pos++) for (mask_pos = 0, css_pos = 0; mask_pos < mask_len; mask_pos++, css_pos++)
{ {
@ -457,11 +457,11 @@ static char *mp_get_truncated_mask (const char *mask_buf, const size_t mask_len,
return (NULL); return (NULL);
} }
u64 sp_get_sum (uint start, uint stop, cs_t *root_css_buf) u64 sp_get_sum (u32 start, u32 stop, cs_t *root_css_buf)
{ {
u64 sum = 1; u64 sum = 1;
uint i; u32 i;
for (i = start; i < stop; i++) for (i = start; i < stop; i++)
{ {
@ -471,13 +471,13 @@ u64 sp_get_sum (uint start, uint stop, cs_t *root_css_buf)
return (sum); return (sum);
} }
void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint start, uint stop) void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 start, u32 stop)
{ {
u64 v = ctx; u64 v = ctx;
cs_t *cs = &root_css_buf[start]; cs_t *cs = &root_css_buf[start];
uint i; u32 i;
for (i = start; i < stop; i++) for (i = start; i < stop; i++)
{ {
@ -486,7 +486,7 @@ void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u
v = d; v = d;
const uint k = cs->cs_buf[m]; const u32 k = cs->cs_buf[m];
pw_buf[i - start] = (char) k; pw_buf[i - start] = (char) k;
@ -502,11 +502,11 @@ int sp_comp_val (const void *p1, const void *p2)
return b2->val - b1->val; return b2->val - b1->val;
} }
void sp_setup_tbl (const char *shared_dir, char *hcstat, uint disable, uint classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf) void sp_setup_tbl (const char *shared_dir, char *hcstat, u32 disable, u32 classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf)
{ {
uint i; u32 i;
uint j; u32 j;
uint k; u32 k;
/** /**
* Initialize hcstats * Initialize hcstats
@ -670,7 +670,7 @@ void sp_setup_tbl (const char *shared_dir, char *hcstat, uint disable, uint clas
for (i = 0; i < SP_ROOT_CNT; i++) for (i = 0; i < SP_ROOT_CNT; i++)
{ {
uint key = i % CHARSIZ; u32 key = i % CHARSIZ;
root_table_buf[i].key = key; root_table_buf[i].key = key;
root_table_buf[i].val = root_stats_buf[i]; root_table_buf[i].val = root_stats_buf[i];
@ -678,7 +678,7 @@ void sp_setup_tbl (const char *shared_dir, char *hcstat, uint disable, uint clas
for (i = 0; i < SP_MARKOV_CNT; i++) for (i = 0; i < SP_MARKOV_CNT; i++)
{ {
uint key = i % CHARSIZ; u32 key = i % CHARSIZ;
markov_table_buf[i].key = key; markov_table_buf[i].key = key;
markov_table_buf[i].val = markov_stats_buf[i]; markov_table_buf[i].val = markov_stats_buf[i];
@ -705,7 +705,7 @@ void sp_setup_tbl (const char *shared_dir, char *hcstat, uint disable, uint clas
} }
} }
void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint threshold, uint uniq_tbls[SP_PW_MAX][CHARSIZ]) void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 threshold, u32 uniq_tbls[SP_PW_MAX][CHARSIZ])
{ {
memset (root_css_buf, 0, SP_PW_MAX * sizeof (cs_t)); memset (root_css_buf, 0, SP_PW_MAX * sizeof (cs_t));
memset (markov_css_buf, 0, SP_PW_MAX * CHARSIZ * sizeof (cs_t)); memset (markov_css_buf, 0, SP_PW_MAX * CHARSIZ * sizeof (cs_t));
@ -714,15 +714,15 @@ void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table
* Convert tables to css * Convert tables to css
*/ */
for (uint i = 0; i < SP_ROOT_CNT; i++) for (u32 i = 0; i < SP_ROOT_CNT; i++)
{ {
uint pw_pos = i / CHARSIZ; u32 pw_pos = i / CHARSIZ;
cs_t *cs = &root_css_buf[pw_pos]; cs_t *cs = &root_css_buf[pw_pos];
if (cs->cs_len == threshold) continue; if (cs->cs_len == threshold) continue;
uint key = root_table_buf[i].key; u32 key = root_table_buf[i].key;
if (uniq_tbls[pw_pos][key] == 0) continue; if (uniq_tbls[pw_pos][key] == 0) continue;
@ -735,17 +735,17 @@ void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table
* Convert table to css * Convert table to css
*/ */
for (uint i = 0; i < SP_MARKOV_CNT; i++) for (u32 i = 0; i < SP_MARKOV_CNT; i++)
{ {
uint c = i / CHARSIZ; u32 c = i / CHARSIZ;
cs_t *cs = &markov_css_buf[c]; cs_t *cs = &markov_css_buf[c];
if (cs->cs_len == threshold) continue; if (cs->cs_len == threshold) continue;
uint pw_pos = c / CHARSIZ; u32 pw_pos = c / CHARSIZ;
uint key = markov_table_buf[i].key; u32 key = markov_table_buf[i].key;
if ((pw_pos + 1) < SP_PW_MAX) if (uniq_tbls[pw_pos + 1][key] == 0) continue; if ((pw_pos + 1) < SP_PW_MAX) if (uniq_tbls[pw_pos + 1][key] == 0) continue;
@ -755,15 +755,15 @@ void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table
} }
/* /*
for (uint i = 0; i < 8; i++) for (u32 i = 0; i < 8; i++)
{ {
for (uint j = 0x20; j < 0x80; j++) for (u32 j = 0x20; j < 0x80; j++)
{ {
cs_t *ptr = &markov_css_buf[(i * CHARSIZ) + j]; cs_t *ptr = &markov_css_buf[(i * CHARSIZ) + j];
printf ("pos:%u key:%u len:%u\n", i, j, ptr->cs_len); printf ("pos:%u key:%u len:%u\n", i, j, ptr->cs_len);
for (uint k = 0; k < 10; k++) for (u32 k = 0; k < 10; k++)
{ {
printf (" %u\n", ptr->cs_buf[k]); printf (" %u\n", ptr->cs_buf[k]);
} }
@ -774,7 +774,7 @@ void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out) void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out)
{ {
for (uint i = 0; i < SP_PW_MAX; i += 2) for (u32 i = 0; i < SP_PW_MAX; i += 2)
{ {
memcpy (out, in, CHARSIZ * sizeof (hcstat_table_t)); memcpy (out, in, CHARSIZ * sizeof (hcstat_table_t));
@ -786,7 +786,7 @@ void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out)
out++; out++;
for (uint j = 1; j < CHARSIZ; j++) for (u32 j = 1; j < CHARSIZ; j++)
{ {
out->key = j; out->key = j;
out->val = 0; out->val = 0;
@ -798,21 +798,21 @@ void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out)
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out) void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out)
{ {
for (uint i = 0; i < SP_PW_MAX; i += 2) for (u32 i = 0; i < SP_PW_MAX; i += 2)
{ {
memcpy (out, in, CHARSIZ * CHARSIZ * sizeof (hcstat_table_t)); memcpy (out, in, CHARSIZ * CHARSIZ * sizeof (hcstat_table_t));
out += CHARSIZ * CHARSIZ; out += CHARSIZ * CHARSIZ;
in += CHARSIZ * CHARSIZ; in += CHARSIZ * CHARSIZ;
for (uint j = 0; j < CHARSIZ; j++) for (u32 j = 0; j < CHARSIZ; j++)
{ {
out->key = 0; out->key = 0;
out->val = 1; out->val = 1;
out++; out++;
for (uint k = 1; k < CHARSIZ; k++) for (u32 k = 1; k < CHARSIZ; k++)
{ {
out->key = k; out->key = k;
out->val = 0; out->val = 0;
@ -841,7 +841,7 @@ static void mask_append (mask_ctx_t *mask_ctx, const user_options_t *user_option
{ {
if (user_options->increment == true) if (user_options->increment == true)
{ {
for (uint mask_len = user_options->increment_min; mask_len <= user_options->increment_max; mask_len++) for (u32 mask_len = user_options->increment_min; mask_len <= user_options->increment_max; mask_len++)
{ {
char *mask_truncated = mp_get_truncated_mask (mask, strlen (mask), mask_len, user_options); char *mask_truncated = mp_get_truncated_mask (mask, strlen (mask), mask_len, user_options);

View File

@ -31,7 +31,7 @@ static const u32 full80 = 0x80808080;
static double TARGET_MS_PROFILE[4] = { 2, 12, 96, 480 }; static double TARGET_MS_PROFILE[4] = { 2, 12, 96, 480 };
static void generate_source_kernel_filename (const uint attack_exec, const uint attack_kern, const uint kern_type, char *shared_dir, char *source_file) static void generate_source_kernel_filename (const u32 attack_exec, const u32 attack_kern, const u32 kern_type, char *shared_dir, char *source_file)
{ {
if (attack_exec == ATTACK_EXEC_INSIDE_KERNEL) if (attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
{ {
@ -46,7 +46,7 @@ static void generate_source_kernel_filename (const uint attack_exec, const uint
snprintf (source_file, 255, "%s/OpenCL/m%05d.cl", shared_dir, (int) kern_type); snprintf (source_file, 255, "%s/OpenCL/m%05d.cl", shared_dir, (int) kern_type);
} }
static void generate_cached_kernel_filename (const uint attack_exec, const uint attack_kern, const uint kern_type, char *profile_dir, const char *device_name_chksum, char *cached_file) static void generate_cached_kernel_filename (const u32 attack_exec, const u32 attack_kern, const u32 kern_type, char *profile_dir, const char *device_name_chksum, char *cached_file)
{ {
if (attack_exec == ATTACK_EXEC_INSIDE_KERNEL) if (attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
{ {
@ -63,7 +63,7 @@ static void generate_cached_kernel_filename (const uint attack_exec, const uint
} }
} }
static void generate_source_kernel_mp_filename (const uint opti_type, const uint opts_type, char *shared_dir, char *source_file) static void generate_source_kernel_mp_filename (const u32 opti_type, const u32 opts_type, char *shared_dir, char *source_file)
{ {
if ((opti_type & OPTI_TYPE_BRUTE_FORCE) && (opts_type & OPTS_TYPE_PT_GENERATE_BE)) if ((opti_type & OPTI_TYPE_BRUTE_FORCE) && (opts_type & OPTS_TYPE_PT_GENERATE_BE))
{ {
@ -75,7 +75,7 @@ static void generate_source_kernel_mp_filename (const uint opti_type, const uint
} }
} }
static void generate_cached_kernel_mp_filename (const uint opti_type, const uint opts_type, char *profile_dir, const char *device_name_chksum, char *cached_file) static void generate_cached_kernel_mp_filename (const u32 opti_type, const u32 opts_type, char *profile_dir, const char *device_name_chksum, char *cached_file)
{ {
if ((opti_type & OPTI_TYPE_BRUTE_FORCE) && (opts_type & OPTS_TYPE_PT_GENERATE_BE)) if ((opti_type & OPTI_TYPE_BRUTE_FORCE) && (opts_type & OPTS_TYPE_PT_GENERATE_BE))
{ {
@ -87,19 +87,19 @@ static void generate_cached_kernel_mp_filename (const uint opti_type, const uint
} }
} }
static void generate_source_kernel_amp_filename (const uint attack_kern, char *shared_dir, char *source_file) static void generate_source_kernel_amp_filename (const u32 attack_kern, char *shared_dir, char *source_file)
{ {
snprintf (source_file, 255, "%s/OpenCL/amp_a%d.cl", shared_dir, attack_kern); snprintf (source_file, 255, "%s/OpenCL/amp_a%d.cl", shared_dir, attack_kern);
} }
static void generate_cached_kernel_amp_filename (const uint attack_kern, char *profile_dir, const char *device_name_chksum, char *cached_file) static void generate_cached_kernel_amp_filename (const u32 attack_kern, char *profile_dir, const char *device_name_chksum, char *cached_file)
{ {
snprintf (cached_file, 255, "%s/kernels/amp_a%d.%s.kernel", profile_dir, attack_kern, device_name_chksum); snprintf (cached_file, 255, "%s/kernels/amp_a%d.%s.kernel", profile_dir, attack_kern, device_name_chksum);
} }
static uint setup_opencl_platforms_filter (const char *opencl_platforms) static u32 setup_opencl_platforms_filter (const char *opencl_platforms)
{ {
uint opencl_platforms_filter = 0; u32 opencl_platforms_filter = 0;
if (opencl_platforms) if (opencl_platforms)
{ {
@ -277,7 +277,7 @@ int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, con
return 0; return 0;
} }
int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, hashconfig_t *hashconfig, const hashes_t *hashes, const outfile_ctx_t *outfile_ctx, status_ctx_t *status_ctx, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration, const uint salt_pos) int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, hashconfig_t *hashconfig, const hashes_t *hashes, const outfile_ctx_t *outfile_ctx, status_ctx_t *status_ctx, const u32 highest_pw_len, const u32 pws_cnt, const u32 fast_iteration, const u32 salt_pos)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
@ -294,7 +294,7 @@ int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, co
{ {
if (hashconfig->opts_type & OPTS_TYPE_PT_BITSLICE) if (hashconfig->opts_type & OPTS_TYPE_PT_BITSLICE)
{ {
const uint size_tm = 32 * sizeof (bs_word_t); const u32 size_tm = 32 * sizeof (bs_word_t);
run_kernel_bzero (opencl_ctx, device_param, device_param->d_tm_c, size_tm); run_kernel_bzero (opencl_ctx, device_param, device_param->d_tm_c, size_tm);
@ -355,13 +355,13 @@ int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, co
} }
} }
uint iter = hashes->salts_buf[salt_pos].salt_iter; u32 iter = hashes->salts_buf[salt_pos].salt_iter;
uint loop_step = device_param->kernel_loops; u32 loop_step = device_param->kernel_loops;
for (uint loop_pos = 0, slow_iteration = 0; loop_pos < iter; loop_pos += loop_step, slow_iteration++) for (u32 loop_pos = 0, slow_iteration = 0; loop_pos < iter; loop_pos += loop_step, slow_iteration++)
{ {
uint loop_left = iter - loop_pos; u32 loop_left = iter - loop_pos;
loop_left = MIN (loop_left, loop_step); loop_left = MIN (loop_left, loop_step);
@ -425,15 +425,15 @@ int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, co
return 0; return 0;
} }
int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num, const uint event_update, const uint iteration, hashconfig_t *hashconfig, const user_options_t *user_options, status_ctx_t *status_ctx) int run_kernel (const u32 kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u32 num, const u32 event_update, const u32 iteration, hashconfig_t *hashconfig, const user_options_t *user_options, status_ctx_t *status_ctx)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
uint num_elements = num; u32 num_elements = num;
device_param->kernel_params_buf32[34] = num; device_param->kernel_params_buf32[34] = num;
uint kernel_threads = device_param->kernel_threads; u32 kernel_threads = device_param->kernel_threads;
while (num_elements % kernel_threads) num_elements++; while (num_elements % kernel_threads) num_elements++;
@ -572,7 +572,7 @@ int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t
if (event_update) if (event_update)
{ {
uint exec_pos = device_param->exec_pos; u32 exec_pos = device_param->exec_pos;
device_param->exec_ms[exec_pos] = exec_us / 1000; device_param->exec_ms[exec_pos] = exec_us / 1000;
@ -607,11 +607,11 @@ int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t
return 0; return 0;
} }
int run_kernel_mp (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num) int run_kernel_mp (const u32 kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u32 num)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
uint num_elements = num; u32 num_elements = num;
switch (kern_run) switch (kern_run)
{ {
@ -621,9 +621,9 @@ int run_kernel_mp (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_para
} }
// causes problems with special threads like in bcrypt // causes problems with special threads like in bcrypt
// const uint kernel_threads = device_param->kernel_threads; // const u32 kernel_threads = device_param->kernel_threads;
uint kernel_threads = device_param->kernel_threads; u32 kernel_threads = device_param->kernel_threads;
while (num_elements % kernel_threads) num_elements++; while (num_elements % kernel_threads) num_elements++;
@ -706,9 +706,9 @@ int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
const uint num_elements = 1024; // fixed const u32 num_elements = 1024; // fixed
uint kernel_threads = 32; u32 kernel_threads = 32;
cl_kernel kernel = device_param->kernel_tm; cl_kernel kernel = device_param->kernel_tm;
@ -745,18 +745,18 @@ int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param)
return 0; return 0;
} }
int run_kernel_amp (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num) int run_kernel_amp (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u32 num)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
uint num_elements = num; u32 num_elements = num;
device_param->kernel_params_amp_buf32[6] = num_elements; device_param->kernel_params_amp_buf32[6] = num_elements;
// causes problems with special threads like in bcrypt // causes problems with special threads like in bcrypt
// const uint kernel_threads = device_param->kernel_threads; // const u32 kernel_threads = device_param->kernel_threads;
uint kernel_threads = device_param->kernel_threads; u32 kernel_threads = device_param->kernel_threads;
while (num_elements % kernel_threads) num_elements++; while (num_elements % kernel_threads) num_elements++;
@ -804,7 +804,7 @@ int run_kernel_amp (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, c
return 0; return 0;
} }
int run_kernel_memset (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, cl_mem buf, const uint value, const uint num) int run_kernel_memset (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, cl_mem buf, const u32 value, const u32 num)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
@ -816,9 +816,9 @@ int run_kernel_memset (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param
device_param->kernel_params_memset_buf32[1] = value; device_param->kernel_params_memset_buf32[1] = value;
device_param->kernel_params_memset_buf32[2] = num16d; device_param->kernel_params_memset_buf32[2] = num16d;
uint kernel_threads = device_param->kernel_threads; u32 kernel_threads = device_param->kernel_threads;
uint num_elements = num16d; u32 num_elements = num16d;
while (num_elements % kernel_threads) num_elements++; while (num_elements % kernel_threads) num_elements++;
@ -893,7 +893,7 @@ int run_kernel_bzero (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
return run_kernel_memset (opencl_ctx, device_param, buf, 0, size); return run_kernel_memset (opencl_ctx, device_param, buf, 0, size);
} }
int run_copy (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const combinator_ctx_t *combinator_ctx, const uint pws_cnt) int run_copy (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const combinator_ctx_t *combinator_ctx, const u32 pws_cnt)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
@ -985,7 +985,7 @@ int run_copy (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashcon
return 0; return 0;
} }
int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const uint pws_cnt) int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 pws_cnt)
{ {
combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx; combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx;
hashconfig_t *hashconfig = hashcat_ctx->hashconfig; hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
@ -1002,7 +1002,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
// init speed timer // init speed timer
uint speed_pos = device_param->speed_pos; u32 speed_pos = device_param->speed_pos;
#if defined (_POSIX) #if defined (_POSIX)
if (device_param->timer_speed.tv_sec == 0) if (device_param->timer_speed.tv_sec == 0)
@ -1020,7 +1020,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
// find higest password length, this is for optimization stuff // find higest password length, this is for optimization stuff
uint highest_pw_len = 0; u32 highest_pw_len = 0;
if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT) if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT)
{ {
@ -1036,7 +1036,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
// loop start: most outer loop = salt iteration, then innerloops (if multi) // loop start: most outer loop = salt iteration, then innerloops (if multi)
for (uint salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
{ {
while (status_ctx->devices_status == STATUS_PAUSED) hc_sleep (1); while (status_ctx->devices_status == STATUS_PAUSED) hc_sleep (1);
@ -1055,8 +1055,8 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
// iteration type // iteration type
uint innerloop_step = 0; u32 innerloop_step = 0;
uint innerloop_cnt = 0; u32 innerloop_cnt = 0;
if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) innerloop_step = device_param->kernel_loops; if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) innerloop_step = device_param->kernel_loops;
else innerloop_step = 1; else innerloop_step = 1;
@ -1067,13 +1067,13 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
// innerloops // innerloops
for (uint innerloop_pos = 0; innerloop_pos < innerloop_cnt; innerloop_pos += innerloop_step) for (u32 innerloop_pos = 0; innerloop_pos < innerloop_cnt; innerloop_pos += innerloop_step)
{ {
while (status_ctx->devices_status == STATUS_PAUSED) hc_sleep (1); while (status_ctx->devices_status == STATUS_PAUSED) hc_sleep (1);
uint fast_iteration = 0; u32 fast_iteration = 0;
uint innerloop_left = innerloop_cnt - innerloop_pos; u32 innerloop_left = innerloop_cnt - innerloop_pos;
if (innerloop_left > innerloop_step) if (innerloop_left > innerloop_step)
{ {
@ -1106,7 +1106,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
if (user_options->attack_mode == ATTACK_MODE_COMBI) if (user_options->attack_mode == ATTACK_MODE_COMBI)
{ {
uint i = 0; u32 i = 0;
while (i < innerloop_left) while (i < innerloop_left)
{ {
@ -1169,7 +1169,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
i++; i++;
} }
for (uint j = i; j < innerloop_left; j++) for (u32 j = i; j < innerloop_left; j++)
{ {
device_param->combs_buf[j].i[0] = 0; device_param->combs_buf[j].i[0] = 0;
device_param->combs_buf[j].i[1] = 0; device_param->combs_buf[j].i[1] = 0;
@ -1420,9 +1420,9 @@ int opencl_ctx_init (opencl_ctx_t *opencl_ctx, const user_options_t *user_option
return -1; return -1;
} }
if (opencl_platforms_filter != (uint) -1) if (opencl_platforms_filter != (u32) -1)
{ {
uint platform_cnt_mask = ~(((uint) -1 >> platforms_cnt) << platforms_cnt); u32 platform_cnt_mask = ~(((u32) -1 >> platforms_cnt) << platforms_cnt);
if (opencl_platforms_filter > platform_cnt_mask) if (opencl_platforms_filter > platform_cnt_mask)
{ {
@ -1441,7 +1441,7 @@ int opencl_ctx_init (opencl_ctx_t *opencl_ctx, const user_options_t *user_option
cl_device_type device_types_all = 0; cl_device_type device_types_all = 0;
for (uint platform_id = 0; platform_id < platforms_cnt; platform_id++) for (u32 platform_id = 0; platform_id < platforms_cnt; platform_id++)
{ {
if ((opencl_platforms_filter & (1u << platform_id)) == 0) continue; if ((opencl_platforms_filter & (1u << platform_id)) == 0) continue;
@ -1460,7 +1460,7 @@ int opencl_ctx_init (opencl_ctx_t *opencl_ctx, const user_options_t *user_option
continue; continue;
} }
for (uint platform_devices_id = 0; platform_devices_id < platform_devices_cnt; platform_devices_id++) for (u32 platform_devices_id = 0; platform_devices_id < platform_devices_cnt; platform_devices_id++)
{ {
cl_device_id device = platform_devices[platform_devices_id]; cl_device_id device = platform_devices[platform_devices_id];
@ -1554,7 +1554,7 @@ int opencl_ctx_devices_init (opencl_ctx_t *opencl_ctx, const user_options_t *use
fprintf (stdout, "OpenCL Info:\n"); fprintf (stdout, "OpenCL Info:\n");
} }
for (uint platform_id = 0; platform_id < platforms_cnt; platform_id++) for (u32 platform_id = 0; platform_id < platforms_cnt; platform_id++)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
@ -1614,7 +1614,7 @@ int opencl_ctx_devices_init (opencl_ctx_t *opencl_ctx, const user_options_t *use
platform_vendor_id = VENDOR_ID_GENERIC; platform_vendor_id = VENDOR_ID_GENERIC;
} }
uint platform_skipped = ((opencl_ctx->opencl_platforms_filter & (1u << platform_id)) == 0); u32 platform_skipped = ((opencl_ctx->opencl_platforms_filter & (1u << platform_id)) == 0);
CL_err = hc_clGetDeviceIDs (opencl_ctx->ocl, platform, CL_DEVICE_TYPE_ALL, DEVICES_MAX, platform_devices, &platform_devices_cnt); CL_err = hc_clGetDeviceIDs (opencl_ctx->ocl, platform, CL_DEVICE_TYPE_ALL, DEVICES_MAX, platform_devices, &platform_devices_cnt);
@ -1686,11 +1686,11 @@ int opencl_ctx_devices_init (opencl_ctx_t *opencl_ctx, const user_options_t *use
hc_device_param_t *devices_param = opencl_ctx->devices_param; hc_device_param_t *devices_param = opencl_ctx->devices_param;
for (uint platform_devices_id = 0; platform_devices_id < platform_devices_cnt; platform_devices_id++) for (u32 platform_devices_id = 0; platform_devices_id < platform_devices_cnt; platform_devices_id++)
{ {
size_t param_value_size = 0; size_t param_value_size = 0;
const uint device_id = devices_cnt; const u32 device_id = devices_cnt;
hc_device_param_t *device_param = &devices_param[device_id]; hc_device_param_t *device_param = &devices_param[device_id];
@ -2133,9 +2133,9 @@ int opencl_ctx_devices_init (opencl_ctx_t *opencl_ctx, const user_options_t *use
snprintf (device_name_chksum, HCBUFSIZ_TINY - 1, "%u-%u-%u-%s-%s-%s-%u", 32, device_param->platform_vendor_id, device_param->vector_width, device_param->device_name, device_param->device_version, device_param->driver_version, comptime); snprintf (device_name_chksum, HCBUFSIZ_TINY - 1, "%u-%u-%u-%s-%s-%s-%u", 32, device_param->platform_vendor_id, device_param->vector_width, device_param->device_name, device_param->device_version, device_param->driver_version, comptime);
#endif #endif
uint device_name_digest[4] = { 0 }; u32 device_name_digest[4] = { 0 };
md5_64 ((uint *) device_name_chksum, device_name_digest); md5_64 ((u32 *) device_name_chksum, device_name_digest);
snprintf (device_name_chksum, HCBUFSIZ_TINY - 1, "%08x", device_name_digest[0]); snprintf (device_name_chksum, HCBUFSIZ_TINY - 1, "%08x", device_name_digest[0]);
@ -2393,9 +2393,9 @@ int opencl_ctx_devices_init (opencl_ctx_t *opencl_ctx, const user_options_t *use
// additional check to see if the user has chosen a device that is not within the range of available devices (i.e. larger than devices_cnt) // additional check to see if the user has chosen a device that is not within the range of available devices (i.e. larger than devices_cnt)
if (opencl_ctx->devices_filter != (uint) -1) if (opencl_ctx->devices_filter != (u32) -1)
{ {
const uint devices_cnt_mask = ~(((uint) -1 >> devices_cnt) << devices_cnt); const u32 devices_cnt_mask = ~(((u32) -1 >> devices_cnt) << devices_cnt);
if (opencl_ctx->devices_filter > devices_cnt_mask) if (opencl_ctx->devices_filter > devices_cnt_mask)
{ {
@ -2422,7 +2422,7 @@ void opencl_ctx_devices_destroy (opencl_ctx_t *opencl_ctx)
{ {
if (opencl_ctx->enabled == false) return; if (opencl_ctx->enabled == false) return;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -2449,7 +2449,7 @@ void opencl_ctx_devices_update_power (opencl_ctx_t *opencl_ctx, const user_optio
u32 kernel_power_all = 0; u32 kernel_power_all = 0;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -2485,7 +2485,7 @@ void opencl_ctx_devices_kernel_loops (opencl_ctx_t *opencl_ctx, const user_optio
{ {
if (opencl_ctx->enabled == false) return; if (opencl_ctx->enabled == false) return;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -2540,7 +2540,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
u32 hardware_power_all = 0; u32 hardware_power_all = 0;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
@ -2721,7 +2721,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
device_param->size_root_css = size_root_css; device_param->size_root_css = size_root_css;
device_param->size_markov_css = size_markov_css; device_param->size_markov_css = size_markov_css;
size_t size_results = sizeof (uint); size_t size_results = sizeof (u32);
device_param->size_results = size_results; device_param->size_results = size_results;
@ -2731,7 +2731,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
size_t size_plains = hashes->digests_cnt * sizeof (plain_t); size_t size_plains = hashes->digests_cnt * sizeof (plain_t);
size_t size_salts = hashes->salts_cnt * sizeof (salt_t); size_t size_salts = hashes->salts_cnt * sizeof (salt_t);
size_t size_esalts = hashes->salts_cnt * hashconfig->esalt_size; size_t size_esalts = hashes->salts_cnt * hashconfig->esalt_size;
size_t size_shown = hashes->digests_cnt * sizeof (uint); size_t size_shown = hashes->digests_cnt * sizeof (u32);
size_t size_digests = hashes->digests_cnt * hashconfig->dgst_size; size_t size_digests = hashes->digests_cnt * hashconfig->dgst_size;
device_param->size_plains = size_plains; device_param->size_plains = size_plains;
@ -2758,7 +2758,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
const u32 scrypt_r = hashes->salts_buf[0].scrypt_r; const u32 scrypt_r = hashes->salts_buf[0].scrypt_r;
const u32 scrypt_p = hashes->salts_buf[0].scrypt_p; const u32 scrypt_p = hashes->salts_buf[0].scrypt_p;
for (uint i = 1; i < hashes->salts_cnt; i++) for (u32 i = 1; i < hashes->salts_cnt; i++)
{ {
if ((hashes->salts_buf[i].scrypt_N != scrypt_N) if ((hashes->salts_buf[i].scrypt_N != scrypt_N)
|| (hashes->salts_buf[i].scrypt_r != scrypt_r) || (hashes->salts_buf[i].scrypt_r != scrypt_r)
@ -2774,8 +2774,8 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
hashconfig->tmp_size = scrypt_tmp_size; hashconfig->tmp_size = scrypt_tmp_size;
uint tmto_start = 0; u32 tmto_start = 0;
uint tmto_stop = 10; u32 tmto_stop = 10;
if (user_options->scrypt_tmto) if (user_options->scrypt_tmto)
{ {
@ -2813,7 +2813,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
device_param->kernel_accel_min = 1; device_param->kernel_accel_min = 1;
device_param->kernel_accel_max = 8; device_param->kernel_accel_max = 8;
uint tmto; u32 tmto;
for (tmto = tmto_start; tmto < tmto_stop; tmto++) for (tmto = tmto_start; tmto < tmto_stop; tmto++)
{ {
@ -2837,7 +2837,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
continue; continue;
} }
for (uint salts_pos = 0; salts_pos < hashes->salts_cnt; salts_pos++) for (u32 salts_pos = 0; salts_pos < hashes->salts_cnt; salts_pos++)
{ {
scrypt_tmto_final = tmto; scrypt_tmto_final = tmto;
} }
@ -3692,10 +3692,10 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
if (user_options->benchmark == true) if (user_options->benchmark == true)
{ {
((uint *) hashes->digests_buf)[0] = -1u; ((u32 *) hashes->digests_buf)[0] = -1u;
((uint *) hashes->digests_buf)[1] = -1u; ((u32 *) hashes->digests_buf)[1] = -1u;
((uint *) hashes->digests_buf)[2] = -1u; ((u32 *) hashes->digests_buf)[2] = -1u;
((uint *) hashes->digests_buf)[3] = -1u; ((u32 *) hashes->digests_buf)[3] = -1u;
} }
/** /**
@ -4170,7 +4170,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
return -1; return -1;
} }
for (uint i = 0; i <= 23; i++) for (u32 i = 0; i <= 23; i++)
{ {
CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel1, i, sizeof (cl_mem), device_param->kernel_params[i]); CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel1, i, sizeof (cl_mem), device_param->kernel_params[i]);
CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel2, i, sizeof (cl_mem), device_param->kernel_params[i]); CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel2, i, sizeof (cl_mem), device_param->kernel_params[i]);
@ -4187,7 +4187,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
} }
} }
for (uint i = 24; i <= 34; i++) for (u32 i = 24; i <= 34; i++)
{ {
CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel1, i, sizeof (cl_uint), device_param->kernel_params[i]); CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel1, i, sizeof (cl_uint), device_param->kernel_params[i]);
CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel2, i, sizeof (cl_uint), device_param->kernel_params[i]); CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel2, i, sizeof (cl_uint), device_param->kernel_params[i]);
@ -4344,7 +4344,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
} }
else else
{ {
for (uint i = 0; i < 5; i++) for (u32 i = 0; i < 5; i++)
{ {
CL_err = hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_amp, i, sizeof (cl_mem), device_param->kernel_params_amp[i]); CL_err = hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_amp, i, sizeof (cl_mem), device_param->kernel_params_amp[i]);
@ -4356,7 +4356,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
} }
} }
for (uint i = 5; i < 7; i++) for (u32 i = 5; i < 7; i++)
{ {
CL_err = hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_amp, i, sizeof (cl_uint), device_param->kernel_params_amp[i]); CL_err = hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_amp, i, sizeof (cl_uint), device_param->kernel_params_amp[i]);
@ -4431,7 +4431,7 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
device_param->kernel_params_mp_buf32[7] = 0; device_param->kernel_params_mp_buf32[7] = 0;
} }
for (uint i = 0; i < 3; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp, i, sizeof (cl_mem), (void *) device_param->kernel_params_mp[i]); for (u32 i = 0; i < 3; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp, i, sizeof (cl_mem), (void *) device_param->kernel_params_mp[i]);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -4455,8 +4455,8 @@ int opencl_session_begin (opencl_ctx_t *opencl_ctx, hashconfig_t *hashconfig, co
if (hashconfig->opts_type & OPTS_TYPE_PT_ADDBITS14) device_param->kernel_params_mp_l_buf32[7] = 1; if (hashconfig->opts_type & OPTS_TYPE_PT_ADDBITS14) device_param->kernel_params_mp_l_buf32[7] = 1;
if (hashconfig->opts_type & OPTS_TYPE_PT_ADDBITS15) device_param->kernel_params_mp_l_buf32[8] = 1; if (hashconfig->opts_type & OPTS_TYPE_PT_ADDBITS15) device_param->kernel_params_mp_l_buf32[8] = 1;
for (uint i = 0; i < 3; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_l, i, sizeof (cl_mem), (void *) device_param->kernel_params_mp_l[i]); for (u32 i = 0; i < 3; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_l, i, sizeof (cl_mem), (void *) device_param->kernel_params_mp_l[i]);
for (uint i = 0; i < 3; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_r, i, sizeof (cl_mem), (void *) device_param->kernel_params_mp_r[i]); for (u32 i = 0; i < 3; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_r, i, sizeof (cl_mem), (void *) device_param->kernel_params_mp_r[i]);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -4476,7 +4476,7 @@ void opencl_session_destroy (opencl_ctx_t *opencl_ctx)
{ {
if (opencl_ctx->enabled == false) return; if (opencl_ctx->enabled == false) return;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -4603,7 +4603,7 @@ void opencl_session_reset (opencl_ctx_t *opencl_ctx)
{ {
if (opencl_ctx->enabled == false) return; if (opencl_ctx->enabled == false) return;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -4641,7 +4641,7 @@ int opencl_session_update_combinator (opencl_ctx_t *opencl_ctx, const hashconfig
{ {
if (opencl_ctx->enabled == false) return 0; if (opencl_ctx->enabled == false) return 0;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -4691,7 +4691,7 @@ int opencl_session_update_mp (opencl_ctx_t *opencl_ctx, const mask_ctx_t *mask_c
{ {
if (opencl_ctx->enabled == false) return 0; if (opencl_ctx->enabled == false) return 0;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -4702,8 +4702,8 @@ int opencl_session_update_mp (opencl_ctx_t *opencl_ctx, const mask_ctx_t *mask_c
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
for (uint i = 3; i < 4; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp, i, sizeof (cl_ulong), (void *) device_param->kernel_params_mp[i]); for (u32 i = 3; i < 4; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp, i, sizeof (cl_ulong), (void *) device_param->kernel_params_mp[i]);
for (uint i = 4; i < 8; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp, i, sizeof (cl_uint), (void *) device_param->kernel_params_mp[i]); for (u32 i = 4; i < 8; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp, i, sizeof (cl_uint), (void *) device_param->kernel_params_mp[i]);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -4730,7 +4730,7 @@ int opencl_session_update_mp_rl (opencl_ctx_t *opencl_ctx, const mask_ctx_t *mas
{ {
if (opencl_ctx->enabled == false) return 0; if (opencl_ctx->enabled == false) return 0;
for (uint device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++) for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
{ {
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id]; hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
@ -4745,11 +4745,11 @@ int opencl_session_update_mp_rl (opencl_ctx_t *opencl_ctx, const mask_ctx_t *mas
cl_int CL_err = CL_SUCCESS; cl_int CL_err = CL_SUCCESS;
for (uint i = 3; i < 4; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_l, i, sizeof (cl_ulong), (void *) device_param->kernel_params_mp_l[i]); for (u32 i = 3; i < 4; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_l, i, sizeof (cl_ulong), (void *) device_param->kernel_params_mp_l[i]);
for (uint i = 4; i < 9; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_l, i, sizeof (cl_uint), (void *) device_param->kernel_params_mp_l[i]); for (u32 i = 4; i < 9; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_l, i, sizeof (cl_uint), (void *) device_param->kernel_params_mp_l[i]);
for (uint i = 3; i < 4; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_r, i, sizeof (cl_ulong), (void *) device_param->kernel_params_mp_r[i]); for (u32 i = 3; i < 4; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_r, i, sizeof (cl_ulong), (void *) device_param->kernel_params_mp_r[i]);
for (uint i = 4; i < 8; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_r, i, sizeof (cl_uint), (void *) device_param->kernel_params_mp_r[i]); for (u32 i = 4; i < 8; i++) CL_err |= hc_clSetKernelArg (opencl_ctx->ocl, device_param->kernel_mp_r, i, sizeof (cl_uint), (void *) device_param->kernel_params_mp_r[i]);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {

View File

@ -33,13 +33,13 @@ void outfile_destroy (outfile_ctx_t *outfile_ctx)
memset (outfile_ctx, 0, sizeof (outfile_ctx_t)); memset (outfile_ctx, 0, sizeof (outfile_ctx_t));
} }
void outfile_format_plain (outfile_ctx_t *outfile_ctx, const unsigned char *plain_ptr, const uint plain_len) void outfile_format_plain (outfile_ctx_t *outfile_ctx, const unsigned char *plain_ptr, const u32 plain_len)
{ {
bool needs_hexify = false; bool needs_hexify = false;
if (outfile_ctx->outfile_autohex == true) if (outfile_ctx->outfile_autohex == true)
{ {
for (uint i = 0; i < plain_len; i++) for (u32 i = 0; i < plain_len; i++)
{ {
if (plain_ptr[i] < 0x20) if (plain_ptr[i] < 0x20)
{ {
@ -61,7 +61,7 @@ void outfile_format_plain (outfile_ctx_t *outfile_ctx, const unsigned char *plai
{ {
fprintf (outfile_ctx->fp, "$HEX["); fprintf (outfile_ctx->fp, "$HEX[");
for (uint i = 0; i < plain_len; i++) for (u32 i = 0; i < plain_len; i++)
{ {
fprintf (outfile_ctx->fp, "%02x", plain_ptr[i]); fprintf (outfile_ctx->fp, "%02x", plain_ptr[i]);
} }
@ -96,7 +96,7 @@ void outfile_write_close (outfile_ctx_t *outfile_ctx)
fclose (outfile_ctx->fp); fclose (outfile_ctx->fp);
} }
void outfile_write (outfile_ctx_t *outfile_ctx, const char *out_buf, const unsigned char *plain_ptr, const uint plain_len, const u64 crackpos, const unsigned char *username, const uint user_len, const hashconfig_t *hashconfig) void outfile_write (outfile_ctx_t *outfile_ctx, const char *out_buf, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, const hashconfig_t *hashconfig)
{ {
if (outfile_ctx->outfile_format & OUTFILE_FMT_HASH) if (outfile_ctx->outfile_format & OUTFILE_FMT_HASH)
{ {
@ -111,7 +111,7 @@ void outfile_write (outfile_ctx_t *outfile_ctx, const char *out_buf, const unsig
{ {
if (username != NULL) if (username != NULL)
{ {
for (uint i = 0; i < user_len; i++) for (u32 i = 0; i < user_len; i++)
{ {
fprintf (outfile_ctx->fp, "%c", username[i]); fprintf (outfile_ctx->fp, "%c", username[i]);
} }
@ -135,7 +135,7 @@ void outfile_write (outfile_ctx_t *outfile_ctx, const char *out_buf, const unsig
if (outfile_ctx->outfile_format & OUTFILE_FMT_HEXPLAIN) if (outfile_ctx->outfile_format & OUTFILE_FMT_HEXPLAIN)
{ {
for (uint i = 0; i < plain_len; i++) for (u32 i = 0; i < plain_len; i++)
{ {
fprintf (outfile_ctx->fp, "%02x", plain_ptr[i]); fprintf (outfile_ctx->fp, "%02x", plain_ptr[i]);
} }

View File

@ -50,7 +50,7 @@ int sort_by_salt_buf (const void *v1, const void *v2, void *v3)
const salt_t *s1 = h1->salt; const salt_t *s1 = h1->salt;
const salt_t *s2 = h2->salt; const salt_t *s2 = h2->salt;
uint n = 16; u32 n = 16;
while (n--) while (n--)
{ {
@ -70,7 +70,7 @@ int sort_by_hash_t_salt (const void *v1, const void *v2)
const salt_t *s2 = h2->salt; const salt_t *s2 = h2->salt;
// testphase: this should work // testphase: this should work
uint n = 16; u32 n = 16;
while (n--) while (n--)
{ {
@ -79,11 +79,11 @@ int sort_by_hash_t_salt (const void *v1, const void *v2)
} }
/* original code, seems buggy since salt_len can be very big (had a case with 131 len) /* original code, seems buggy since salt_len can be very big (had a case with 131 len)
also it thinks salt_buf[x] is a char but its a uint so salt_len should be / 4 also it thinks salt_buf[x] is a char but its a u32 so salt_len should be / 4
if (s1->salt_len > s2->salt_len) return ( 1); if (s1->salt_len > s2->salt_len) return ( 1);
if (s1->salt_len < s2->salt_len) return -1; if (s1->salt_len < s2->salt_len) return -1;
uint n = s1->salt_len; u32 n = s1->salt_len;
while (n--) while (n--)
{ {
@ -105,7 +105,7 @@ int sort_by_hash_t_salt_hccap (const void *v1, const void *v2)
// last 2: salt_buf[10] and salt_buf[11] contain the digest (skip them) // last 2: salt_buf[10] and salt_buf[11] contain the digest (skip them)
uint n = 9; // 9 * 4 = 36 bytes (max length of ESSID) u32 n = 9; // 9 * 4 = 36 bytes (max length of ESSID)
while (n--) while (n--)
{ {
@ -186,13 +186,13 @@ void potfile_destroy (potfile_ctx_t *potfile_ctx)
memset (potfile_ctx, 0, sizeof (potfile_ctx_t)); memset (potfile_ctx, 0, sizeof (potfile_ctx_t));
} }
void potfile_format_plain (potfile_ctx_t *potfile_ctx, const unsigned char *plain_ptr, const uint plain_len) void potfile_format_plain (potfile_ctx_t *potfile_ctx, const unsigned char *plain_ptr, const u32 plain_len)
{ {
if (potfile_ctx->enabled == false) return; if (potfile_ctx->enabled == false) return;
bool needs_hexify = false; bool needs_hexify = false;
for (uint i = 0; i < plain_len; i++) for (u32 i = 0; i < plain_len; i++)
{ {
if (plain_ptr[i] < 0x20) if (plain_ptr[i] < 0x20)
{ {
@ -213,7 +213,7 @@ void potfile_format_plain (potfile_ctx_t *potfile_ctx, const unsigned char *plai
{ {
fprintf (potfile_ctx->fp, "$HEX["); fprintf (potfile_ctx->fp, "$HEX[");
for (uint i = 0; i < plain_len; i++) for (u32 i = 0; i < plain_len; i++)
{ {
fprintf (potfile_ctx->fp, "%02x", plain_ptr[i]); fprintf (potfile_ctx->fp, "%02x", plain_ptr[i]);
} }
@ -256,7 +256,7 @@ void potfile_read_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashcon
char *line_buf = (char *) mymalloc (HCBUFSIZ_LARGE); char *line_buf = (char *) mymalloc (HCBUFSIZ_LARGE);
for (uint line_num = 0; line_num < potfile_ctx->pot_avail; line_num++) for (u32 line_num = 0; line_num < potfile_ctx->pot_avail; line_num++)
{ {
int line_len = fgetl (potfile_ctx->fp, line_buf); int line_len = fgetl (potfile_ctx->fp, line_buf);
@ -396,11 +396,11 @@ void potfile_write_append (potfile_ctx_t *potfile_ctx, const char *out_buf, u8 *
fflush (fp); fflush (fp);
} }
void potfile_hash_alloc (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, const uint num) void potfile_hash_alloc (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconfig, const u32 num)
{ {
if (potfile_ctx->enabled == false) return; if (potfile_ctx->enabled == false) return;
uint pos = 0; u32 pos = 0;
for (pos = 0; pos < num; pos++) for (pos = 0; pos < num; pos++)
{ {
@ -430,7 +430,7 @@ void potfile_hash_free (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashconf
{ {
if (potfile_ctx->enabled == false) return; if (potfile_ctx->enabled == false) return;
for (uint i = 0; i < potfile_ctx->pot_cnt; i++) for (u32 i = 0; i < potfile_ctx->pot_cnt; i++)
{ {
pot_t *pot_ptr = &potfile_ctx->pot[i]; pot_t *pot_ptr = &potfile_ctx->pot[i];
@ -471,7 +471,7 @@ void potfile_show_request (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashc
// user // user
unsigned char *username = NULL; unsigned char *username = NULL;
uint user_len = 0; u32 user_len = 0;
if (hashes_buf->hash_info) if (hashes_buf->hash_info)
{ {
@ -526,7 +526,7 @@ void potfile_show_request_lm (potfile_ctx_t *potfile_ctx, const hashconfig_t *ha
// right // right
uint weak_hash_found = 0; u32 weak_hash_found = 0;
pot_t pot_right_key; pot_t pot_right_key;
@ -568,7 +568,7 @@ void potfile_show_request_lm (potfile_ctx_t *potfile_ctx, const hashconfig_t *ha
// user // user
unsigned char *username = NULL; unsigned char *username = NULL;
uint user_len = 0; u32 user_len = 0;
if (hash_left->hash_info) if (hash_left->hash_info)
{ {
@ -584,10 +584,10 @@ void potfile_show_request_lm (potfile_ctx_t *potfile_ctx, const hashconfig_t *ha
// mask the part which was not found // mask the part which was not found
uint left_part_masked = 0; u32 left_part_masked = 0;
uint right_part_masked = 0; u32 right_part_masked = 0;
uint mask_plain_len = strlen (LM_MASKED_PLAIN); u32 mask_plain_len = strlen (LM_MASKED_PLAIN);
if (pot_left_ptr == NULL) if (pot_left_ptr == NULL)
{ {
@ -653,7 +653,7 @@ void potfile_left_request_lm (potfile_ctx_t *potfile_ctx, const hashconfig_t *ha
pot_t *pot_right_ptr = (pot_t *) hc_bsearch_r (&pot_right_key, potfile_ctx->pot, potfile_ctx->pot_cnt, sizeof (pot_t), sort_by_pot, (void *) hashconfig); pot_t *pot_right_ptr = (pot_t *) hc_bsearch_r (&pot_right_key, potfile_ctx->pot, potfile_ctx->pot_cnt, sizeof (pot_t), sort_by_pot, (void *) hashconfig);
uint weak_hash_found = 0; u32 weak_hash_found = 0;
if (pot_right_ptr == NULL) if (pot_right_ptr == NULL)
{ {
@ -684,7 +684,7 @@ void potfile_left_request_lm (potfile_ctx_t *potfile_ctx, const hashconfig_t *ha
// only show the hash part which is still not cracked // only show the hash part which is still not cracked
uint user_len = (uint)input_len - 32u; u32 user_len = (u32)input_len - 32u;
char *hash_output = (char *) mymalloc (33); char *hash_output = (char *) mymalloc (33);
@ -720,7 +720,7 @@ int potfile_remove_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashco
if (potfile_ctx->enabled == false) return 0; if (potfile_ctx->enabled == false) return 0;
hash_t *hashes_buf = hashes->hashes_buf; hash_t *hashes_buf = hashes->hashes_buf;
uint hashes_cnt = hashes->hashes_cnt; u32 hashes_cnt = hashes->hashes_cnt;
// no solution for these special hash types (for instane because they use hashfile in output etc) // no solution for these special hash types (for instane because they use hashfile in output etc)
@ -798,7 +798,7 @@ int potfile_remove_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashco
if (hashconfig->hash_mode == 6800) if (hashconfig->hash_mode == 6800)
{ {
if (i < 64) // 64 = 16 * uint in salt_buf[] if (i < 64) // 64 = 16 * u32 in salt_buf[]
{ {
// manipulate salt_buf // manipulate salt_buf
memcpy (hash_buf.salt->salt_buf, line_buf, i); memcpy (hash_buf.salt->salt_buf, line_buf, i);
@ -810,7 +810,7 @@ int potfile_remove_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashco
} }
else if (hashconfig->hash_mode == 2500) else if (hashconfig->hash_mode == 2500)
{ {
if (i < 64) // 64 = 16 * uint in salt_buf[] if (i < 64) // 64 = 16 * u32 in salt_buf[]
{ {
// here we have in line_buf: ESSID:MAC1:MAC2 (without the plain) // here we have in line_buf: ESSID:MAC1:MAC2 (without the plain)
// manipulate salt_buf // manipulate salt_buf
@ -836,7 +836,7 @@ int potfile_remove_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashco
if (strlen (mac1_pos) != 12) continue; if (strlen (mac1_pos) != 12) continue;
uint essid_length = mac1_pos - line_buf_cpy - 1; u32 essid_length = mac1_pos - line_buf_cpy - 1;
// here we need the ESSID // here we need the ESSID
memcpy (hash_buf.salt->salt_buf, line_buf_cpy, essid_length); memcpy (hash_buf.salt->salt_buf, line_buf_cpy, essid_length);
@ -851,7 +851,7 @@ int potfile_remove_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashco
// compare hex string(s) vs binary MAC address(es) // compare hex string(s) vs binary MAC address(es)
for (uint i = 0, j = 0; i < 6; i++, j += 2) for (u32 i = 0, j = 0; i < 6; i++, j += 2)
{ {
if (wpa->orig_mac1[i] != hex_to_u8 ((const u8 *) &mac1_pos[j])) if (wpa->orig_mac1[i] != hex_to_u8 ((const u8 *) &mac1_pos[j]))
{ {
@ -864,7 +864,7 @@ int potfile_remove_parse (potfile_ctx_t *potfile_ctx, const hashconfig_t *hashco
// early skip ;) // early skip ;)
if (!found) continue; if (!found) continue;
for (uint i = 0, j = 0; i < 6; i++, j += 2) for (u32 i = 0, j = 0; i < 6; i++, j += 2)
{ {
if (wpa->orig_mac2[i] != hex_to_u8 ((const u8 *) &mac2_pos[j])) if (wpa->orig_mac2[i] != hex_to_u8 ((const u8 *) &mac2_pos[j]))
{ {

View File

@ -262,10 +262,10 @@ int generate_random_rule (char rule_buf[RP_RULE_BUFSIZ], const u32 rp_gen_func_m
#define GET_P0_CONV(rule) INCR_POS; rule_buf[rule_pos] = conv_itoc (((rule)->cmds[rule_cnt] >> 8) & 0xff) #define GET_P0_CONV(rule) INCR_POS; rule_buf[rule_pos] = conv_itoc (((rule)->cmds[rule_cnt] >> 8) & 0xff)
#define GET_P1_CONV(rule) INCR_POS; rule_buf[rule_pos] = conv_itoc (((rule)->cmds[rule_cnt] >> 16) & 0xff) #define GET_P1_CONV(rule) INCR_POS; rule_buf[rule_pos] = conv_itoc (((rule)->cmds[rule_cnt] >> 16) & 0xff)
int cpu_rule_to_kernel_rule (char *rule_buf, uint rule_len, kernel_rule_t *rule) int cpu_rule_to_kernel_rule (char *rule_buf, u32 rule_len, kernel_rule_t *rule)
{ {
uint rule_pos; u32 rule_pos;
uint rule_cnt; u32 rule_cnt;
for (rule_pos = 0, rule_cnt = 0; rule_pos < rule_len && rule_cnt < MAX_KERNEL_RULES; rule_pos++, rule_cnt++) for (rule_pos = 0, rule_cnt = 0; rule_pos < rule_len && rule_cnt < MAX_KERNEL_RULES; rule_pos++, rule_cnt++)
{ {
@ -479,9 +479,9 @@ int cpu_rule_to_kernel_rule (char *rule_buf, uint rule_len, kernel_rule_t *rule)
int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule) int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule)
{ {
uint rule_cnt; u32 rule_cnt;
uint rule_pos; u32 rule_pos;
uint rule_len = HCBUFSIZ_LARGE - 1; // maximum possible len u32 rule_len = HCBUFSIZ_LARGE - 1; // maximum possible len
char rule_cmd; char rule_cmd;
@ -703,7 +703,7 @@ int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule)
bool kernel_rules_has_noop (const kernel_rule_t *kernel_rules_buf, const u32 kernel_rules_cnt) bool kernel_rules_has_noop (const kernel_rule_t *kernel_rules_buf, const u32 kernel_rules_cnt)
{ {
for (uint kernel_rules_pos = 0; kernel_rules_pos < kernel_rules_cnt; kernel_rules_pos++) for (u32 kernel_rules_pos = 0; kernel_rules_pos < kernel_rules_cnt; kernel_rules_pos++)
{ {
if (kernel_rules_buf[kernel_rules_pos].cmds[0] != RULE_OP_MANGLE_NOOP) continue; if (kernel_rules_buf[kernel_rules_pos].cmds[0] != RULE_OP_MANGLE_NOOP) continue;
if (kernel_rules_buf[kernel_rules_pos].cmds[1] != 0) continue; if (kernel_rules_buf[kernel_rules_pos].cmds[1] != 0) continue;
@ -720,13 +720,13 @@ int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options
* load rules * load rules
*/ */
uint *all_kernel_rules_cnt = NULL; u32 *all_kernel_rules_cnt = NULL;
kernel_rule_t **all_kernel_rules_buf = NULL; kernel_rule_t **all_kernel_rules_buf = NULL;
if (user_options->rp_files_cnt) if (user_options->rp_files_cnt)
{ {
all_kernel_rules_cnt = (uint *) mycalloc (user_options->rp_files_cnt, sizeof (uint)); all_kernel_rules_cnt = (u32 *) mycalloc (user_options->rp_files_cnt, sizeof (u32));
all_kernel_rules_buf = (kernel_rule_t **) mycalloc (user_options->rp_files_cnt, sizeof (kernel_rule_t *)); all_kernel_rules_buf = (kernel_rule_t **) mycalloc (user_options->rp_files_cnt, sizeof (kernel_rule_t *));
} }
@ -735,11 +735,11 @@ int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options
int rule_len = 0; int rule_len = 0;
for (uint i = 0; i < user_options->rp_files_cnt; i++) for (u32 i = 0; i < user_options->rp_files_cnt; i++)
{ {
uint kernel_rules_avail = 0; u32 kernel_rules_avail = 0;
uint kernel_rules_cnt = 0; u32 kernel_rules_cnt = 0;
kernel_rule_t *kernel_rules_buf = NULL; kernel_rule_t *kernel_rules_buf = NULL;
@ -750,7 +750,7 @@ int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options
FILE *fp = NULL; FILE *fp = NULL;
uint rule_line = 0; u32 rule_line = 0;
if ((fp = fopen (rp_file, "rb")) == NULL) if ((fp = fopen (rp_file, "rb")) == NULL)
{ {
@ -812,13 +812,13 @@ int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options
* merge rules * merge rules
*/ */
uint kernel_rules_cnt = 1; u32 kernel_rules_cnt = 1;
uint *repeats = (uint *) mycalloc (user_options->rp_files_cnt + 1, sizeof (uint)); u32 *repeats = (u32 *) mycalloc (user_options->rp_files_cnt + 1, sizeof (u32));
repeats[0] = kernel_rules_cnt; repeats[0] = kernel_rules_cnt;
for (uint i = 0; i < user_options->rp_files_cnt; i++) for (u32 i = 0; i < user_options->rp_files_cnt; i++)
{ {
kernel_rules_cnt *= all_kernel_rules_cnt[i]; kernel_rules_cnt *= all_kernel_rules_cnt[i];
@ -827,16 +827,16 @@ int kernel_rules_load (kernel_rule_t **out_buf, u32 *out_cnt, const user_options
kernel_rule_t *kernel_rules_buf = (kernel_rule_t *) mycalloc (kernel_rules_cnt, sizeof (kernel_rule_t)); kernel_rule_t *kernel_rules_buf = (kernel_rule_t *) mycalloc (kernel_rules_cnt, sizeof (kernel_rule_t));
for (uint i = 0; i < kernel_rules_cnt; i++) for (u32 i = 0; i < kernel_rules_cnt; i++)
{ {
uint out_pos = 0; u32 out_pos = 0;
kernel_rule_t *out = &kernel_rules_buf[i]; kernel_rule_t *out = &kernel_rules_buf[i];
for (uint j = 0; j < user_options->rp_files_cnt; j++) for (u32 j = 0; j < user_options->rp_files_cnt; j++)
{ {
uint in_off = (i / repeats[j]) % all_kernel_rules_cnt[j]; u32 in_off = (i / repeats[j]) % all_kernel_rules_cnt[j];
uint in_pos; u32 in_pos;
kernel_rule_t *in = &all_kernel_rules_buf[j][in_off]; kernel_rule_t *in = &all_kernel_rules_buf[j][in_off];

View File

@ -35,7 +35,7 @@ static void out_push (out_t *out, const u8 *pw_buf, const int pw_len)
} }
} }
void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const hashconfig_t *hashconfig, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, const outfile_ctx_t *outfile_ctx, const uint pws_cnt) void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, const hashconfig_t *hashconfig, const straight_ctx_t *straight_ctx, const combinator_ctx_t *combinator_ctx, const mask_ctx_t *mask_ctx, const outfile_ctx_t *outfile_ctx, const u32 pws_cnt)
{ {
out_t out; out_t out;
@ -61,25 +61,25 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
out.len = 0; out.len = 0;
uint plain_buf[16] = { 0 }; u32 plain_buf[16] = { 0 };
u8 *plain_ptr = (u8 *) plain_buf; u8 *plain_ptr = (u8 *) plain_buf;
uint plain_len = 0; u32 plain_len = 0;
const uint il_cnt = device_param->kernel_params_buf32[30]; // ugly, i know const u32 il_cnt = device_param->kernel_params_buf32[30]; // ugly, i know
if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) if (user_options->attack_mode == ATTACK_MODE_STRAIGHT)
{ {
pw_t pw; pw_t pw;
for (uint gidvid = 0; gidvid < pws_cnt; gidvid++) for (u32 gidvid = 0; gidvid < pws_cnt; gidvid++)
{ {
gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw); gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw);
const uint pos = device_param->innerloop_pos; const u32 pos = device_param->innerloop_pos;
for (uint il_pos = 0; il_pos < il_cnt; il_pos++) for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
@ -100,11 +100,11 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
{ {
pw_t pw; pw_t pw;
for (uint gidvid = 0; gidvid < pws_cnt; gidvid++) for (u32 gidvid = 0; gidvid < pws_cnt; gidvid++)
{ {
gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw); gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw);
for (uint il_pos = 0; il_pos < il_cnt; il_pos++) for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
@ -114,7 +114,7 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
plain_len = pw.pw_len; plain_len = pw.pw_len;
char *comb_buf = (char *) device_param->combs_buf[il_pos].i; char *comb_buf = (char *) device_param->combs_buf[il_pos].i;
uint comb_len = device_param->combs_buf[il_pos].pw_len; u32 comb_len = device_param->combs_buf[il_pos].pw_len;
if (combinator_ctx->combs_mode == COMBINATOR_MODE_BASE_LEFT) if (combinator_ctx->combs_mode == COMBINATOR_MODE_BASE_LEFT)
{ {
@ -140,18 +140,18 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
} }
else if (user_options->attack_mode == ATTACK_MODE_BF) else if (user_options->attack_mode == ATTACK_MODE_BF)
{ {
for (uint gidvid = 0; gidvid < pws_cnt; gidvid++) for (u32 gidvid = 0; gidvid < pws_cnt; gidvid++)
{ {
for (uint il_pos = 0; il_pos < il_cnt; il_pos++) for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{ {
u64 l_off = device_param->kernel_params_mp_l_buf64[3] + gidvid; u64 l_off = device_param->kernel_params_mp_l_buf64[3] + gidvid;
u64 r_off = device_param->kernel_params_mp_r_buf64[3] + il_pos; u64 r_off = device_param->kernel_params_mp_r_buf64[3] + il_pos;
uint l_start = device_param->kernel_params_mp_l_buf32[5]; u32 l_start = device_param->kernel_params_mp_l_buf32[5];
uint r_start = device_param->kernel_params_mp_r_buf32[5]; u32 r_start = device_param->kernel_params_mp_r_buf32[5];
uint l_stop = device_param->kernel_params_mp_l_buf32[4]; u32 l_stop = device_param->kernel_params_mp_l_buf32[4];
uint r_stop = device_param->kernel_params_mp_r_buf32[4]; u32 r_stop = device_param->kernel_params_mp_r_buf32[4];
sp_exec (l_off, (char *) plain_ptr + l_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, l_start, l_start + l_stop); sp_exec (l_off, (char *) plain_ptr + l_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, l_start, l_start + l_stop);
sp_exec (r_off, (char *) plain_ptr + r_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, r_start, r_start + r_stop); sp_exec (r_off, (char *) plain_ptr + r_start, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, r_start, r_start + r_stop);
@ -166,11 +166,11 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
{ {
pw_t pw; pw_t pw;
for (uint gidvid = 0; gidvid < pws_cnt; gidvid++) for (u32 gidvid = 0; gidvid < pws_cnt; gidvid++)
{ {
gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw); gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw);
for (uint il_pos = 0; il_pos < il_cnt; il_pos++) for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
@ -181,8 +181,8 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
u64 off = device_param->kernel_params_mp_buf64[3] + il_pos; u64 off = device_param->kernel_params_mp_buf64[3] + il_pos;
uint start = 0; u32 start = 0;
uint stop = device_param->kernel_params_mp_buf32[4]; u32 stop = device_param->kernel_params_mp_buf32[4];
sp_exec (off, (char *) plain_ptr + plain_len, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, start, start + stop); sp_exec (off, (char *) plain_ptr + plain_len, mask_ctx->root_css_buf, mask_ctx->markov_css_buf, start, start + stop);
@ -196,11 +196,11 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
{ {
pw_t pw; pw_t pw;
for (uint gidvid = 0; gidvid < pws_cnt; gidvid++) for (u32 gidvid = 0; gidvid < pws_cnt; gidvid++)
{ {
gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw); gidd_to_pw_t (opencl_ctx, device_param, gidvid, &pw);
for (uint il_pos = 0; il_pos < il_cnt; il_pos++) for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
@ -211,8 +211,8 @@ void process_stdout (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
u64 off = device_param->kernel_params_mp_buf64[3] + il_pos; u64 off = device_param->kernel_params_mp_buf64[3] + il_pos;
uint start = 0; u32 start = 0;
uint stop = device_param->kernel_params_mp_buf32[4]; u32 stop = device_param->kernel_params_mp_buf32[4];
memmove (plain_ptr + stop, plain_ptr, plain_len); memmove (plain_ptr + stop, plain_ptr, plain_len);

View File

@ -10,7 +10,7 @@
#include "hashes.h" #include "hashes.h"
#include "weak_hash.h" #include "weak_hash.h"
void weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const uint salt_pos) void weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos)
{ {
hashconfig_t *hashconfig = hashcat_ctx->hashconfig; hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
hashes_t *hashes = hashcat_ctx->hashes; hashes_t *hashes = hashcat_ctx->hashes;
@ -28,7 +28,7 @@ void weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_para
device_param->kernel_params_buf32[33] = 0; device_param->kernel_params_buf32[33] = 0;
device_param->kernel_params_buf32[34] = 1; device_param->kernel_params_buf32[34] = 1;
uint cmd0_rule_old = straight_ctx->kernel_rules_buf[0].cmds[0]; u32 cmd0_rule_old = straight_ctx->kernel_rules_buf[0].cmds[0];
straight_ctx->kernel_rules_buf[0].cmds[0] = 0; straight_ctx->kernel_rules_buf[0].cmds[0] = 0;
@ -44,13 +44,13 @@ void weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_para
{ {
run_kernel (KERN_RUN_1, opencl_ctx, device_param, 1, false, 0, hashconfig, user_options, status_ctx); run_kernel (KERN_RUN_1, opencl_ctx, device_param, 1, false, 0, hashconfig, user_options, status_ctx);
uint loop_step = 16; u32 loop_step = 16;
const uint iter = salt_buf->salt_iter; const u32 iter = salt_buf->salt_iter;
for (uint loop_pos = 0; loop_pos < iter; loop_pos += loop_step) for (u32 loop_pos = 0; loop_pos < iter; loop_pos += loop_step)
{ {
uint loop_left = iter - loop_pos; u32 loop_left = iter - loop_pos;
loop_left = MIN (loop_left, loop_step); loop_left = MIN (loop_left, loop_step);

View File

@ -13,14 +13,14 @@
#include "rp_cpu.h" #include "rp_cpu.h"
#include "wordlist.h" #include "wordlist.h"
uint convert_from_hex (char *line_buf, const uint line_len, const user_options_t *user_options) u32 convert_from_hex (char *line_buf, const u32 line_len, const user_options_t *user_options)
{ {
if (line_len & 1) return (line_len); // not in hex if (line_len & 1) return (line_len); // not in hex
if (user_options->hex_wordlist == true) if (user_options->hex_wordlist == true)
{ {
uint i; u32 i;
uint j; u32 j;
for (i = 0, j = 0; j < line_len; i += 1, j += 2) for (i = 0, j = 0; j < line_len; i += 1, j += 2)
{ {
@ -40,8 +40,8 @@ uint convert_from_hex (char *line_buf, const uint line_len, const user_options_t
if (line_buf[4] != '[') return (line_len); if (line_buf[4] != '[') return (line_len);
if (line_buf[line_len - 1] != ']') return (line_len); if (line_buf[line_len - 1] != ']') return (line_len);
uint i; u32 i;
uint j; u32 j;
for (i = 0, j = 5; j < line_len - 1; i += 1, j += 2) for (i = 0, j = 5; j < line_len - 1; i += 1, j += 2)
{ {
@ -177,7 +177,7 @@ void get_next_word_std (char *buf, u64 sz, u64 *len, u64 *off)
*len = sz; *len = sz;
} }
void get_next_word (wl_data_t *wl_data, const user_options_t *user_options, const user_options_extra_t *user_options_extra, FILE *fd, char **out_buf, uint *out_len) void get_next_word (wl_data_t *wl_data, const user_options_t *user_options, const user_options_extra_t *user_options_extra, FILE *fd, char **out_buf, u32 *out_len)
{ {
while (wl_data->pos < wl_data->cnt) while (wl_data->pos < wl_data->cnt)
{ {