1
mirror of https://github.com/hashcat/hashcat synced 2024-12-23 14:13:43 +01:00

Fix some unused variable warnings

This commit is contained in:
jsteube 2019-04-03 21:53:34 +02:00
parent 91d9475c11
commit 13edc32fb4
39 changed files with 43 additions and 127 deletions

1
.gitignore vendored
View File

@ -19,4 +19,5 @@ lib/*.a
modules/*.dll
modules/*.so
obj/*.o
obj/*.a
include/CL

View File

@ -291,7 +291,6 @@ KERNEL_FQ void m02500_comp (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t)
KERNEL_FQ void m02500_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
if (gid >= gid_max) return;
@ -602,7 +601,6 @@ KERNEL_FQ void m02500_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t)
KERNEL_FQ void m02500_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
if (gid >= gid_max) return;
@ -912,21 +910,14 @@ KERNEL_FQ void m02500_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t)
KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
const u64 lsz = get_local_size (0);
/**
* aes shared
*/
#ifdef REAL_SHM
LOCAL_AS u32 s_td0[256];
LOCAL_AS u32 s_td1[256];
LOCAL_AS u32 s_td2[256];
LOCAL_AS u32 s_td3[256];
LOCAL_AS u32 s_td4[256];
const u64 lid = get_local_id (0);
const u64 lsz = get_local_size (0);
LOCAL_AS u32 s_te0[256];
LOCAL_AS u32 s_te1[256];
@ -936,12 +927,6 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t)
for (u32 i = lid; i < 256; i += lsz)
{
s_td0[i] = td0[i];
s_td1[i] = td1[i];
s_td2[i] = td2[i];
s_td3[i] = td3[i];
s_td4[i] = td4[i];
s_te0[i] = te0[i];
s_te1[i] = te1[i];
s_te2[i] = te2[i];
@ -953,12 +938,6 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t)
#else
CONSTANT_AS u32a *s_td0 = td0;
CONSTANT_AS u32a *s_td1 = td1;
CONSTANT_AS u32a *s_td2 = td2;
CONSTANT_AS u32a *s_td3 = td3;
CONSTANT_AS u32a *s_td4 = td4;
CONSTANT_AS u32a *s_te0 = te0;
CONSTANT_AS u32a *s_te1 = te1;
CONSTANT_AS u32a *s_te2 = te2;
@ -967,6 +946,8 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t)
#endif
const u64 gid = get_global_id (0);
if (gid >= gid_max) return;
u32 out[8];

View File

@ -161,7 +161,6 @@ KERNEL_FQ void m02501_comp (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
if (gid >= gid_max) return;
@ -472,7 +471,6 @@ KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
if (gid >= gid_max) return;
@ -782,21 +780,14 @@ KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
const u64 lsz = get_local_size (0);
/**
* aes shared
*/
#ifdef REAL_SHM
LOCAL_AS u32 s_td0[256];
LOCAL_AS u32 s_td1[256];
LOCAL_AS u32 s_td2[256];
LOCAL_AS u32 s_td3[256];
LOCAL_AS u32 s_td4[256];
const u64 lid = get_local_id (0);
const u64 lsz = get_local_size (0);
LOCAL_AS u32 s_te0[256];
LOCAL_AS u32 s_te1[256];
@ -806,12 +797,6 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
for (u32 i = lid; i < 256; i += lsz)
{
s_td0[i] = td0[i];
s_td1[i] = td1[i];
s_td2[i] = td2[i];
s_td3[i] = td3[i];
s_td4[i] = td4[i];
s_te0[i] = te0[i];
s_te1[i] = te1[i];
s_te2[i] = te2[i];
@ -823,12 +808,6 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
#else
CONSTANT_AS u32a *s_td0 = td0;
CONSTANT_AS u32a *s_td1 = td1;
CONSTANT_AS u32a *s_td2 = td2;
CONSTANT_AS u32a *s_td3 = td3;
CONSTANT_AS u32a *s_td4 = td4;
CONSTANT_AS u32a *s_te0 = te0;
CONSTANT_AS u32a *s_te1 = te1;
CONSTANT_AS u32a *s_te2 = te2;
@ -837,6 +816,8 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t))
#endif
const u64 gid = get_global_id (0);
if (gid >= gid_max) return;
u32 out[8];

View File

@ -244,7 +244,6 @@ KERNEL_FQ void m16800_comp (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_pmkid_t)
KERNEL_FQ void m16800_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_pmkid_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
if (gid >= gid_max) return;

View File

@ -117,7 +117,6 @@ KERNEL_FQ void m16801_comp (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_pmkid_t))
KERNEL_FQ void m16801_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_pmkid_t))
{
const u64 gid = get_global_id (0);
const u64 lid = get_local_id (0);
if (gid >= gid_max) return;

View File

@ -43,7 +43,6 @@ static const int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] =
int benchmark_next (hashcat_ctx_t *hashcat_ctx)
{
const folder_config_t *folder_config = hashcat_ctx->folder_config;
const module_ctx_t *module_ctx = hashcat_ctx->module_ctx;
const user_options_t *user_options = hashcat_ctx->user_options;
static int cur = 0;

View File

@ -1319,10 +1319,9 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
int hashes_init_stage2 (hashcat_ctx_t *hashcat_ctx)
{
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
hashes_t *hashes = hashcat_ctx->hashes;
user_options_t *user_options = hashcat_ctx->user_options;
potfile_ctx_t *potfile_ctx = hashcat_ctx->potfile_ctx;
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
hashes_t *hashes = hashcat_ctx->hashes;
const user_options_t *user_options = hashcat_ctx->user_options;
hash_t *hashes_buf = hashes->hashes_buf;
u32 hashes_cnt = hashes->hashes_cnt;
@ -1838,8 +1837,6 @@ int hashes_init_benchmark (hashcat_ctx_t *hashcat_ctx)
if (hashconfig->is_salted == false) return 0;
hash_t *hashes_buf = hashes->hashes_buf;
if (module_ctx->module_benchmark_salt != MODULE_DEFAULT)
{
salt_t *ptr = module_ctx->module_benchmark_salt (hashconfig, user_options, user_options_extra);

View File

@ -680,8 +680,6 @@ u32 default_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED co
u32 default_salt_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const bool optimized_kernel = (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL);
// salt_min : this limit is only interessting for generic hash types that support a salt
u32 salt_min = SALT_MIN;

View File

@ -189,6 +189,7 @@ static void md5crypt_decode (u8 digest[16], const u8 buf[22])
digest[11] = (l >> 0) & 0xff;
}
/* uses OPTS_TYPE_HASH_COPY
static void md5crypt_encode (const u8 digest[16], u8 buf[22])
{
int l;
@ -233,6 +234,7 @@ static void md5crypt_encode (const u8 digest[16], u8 buf[22])
buf[20] = int_to_itoa64 (l & 0x3f); l >>= 6;
buf[21] = int_to_itoa64 (l & 0x3f); //l >>= 6;
}
*/
u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{

View File

@ -142,8 +142,6 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
line_len += snprintf (line_buf + line_len, line_size - line_len, "%s%u#", SIGNATURE_DCC2, salt->salt_iter + 1);
char *salt_ptr = (char *) salt->salt_buf;
line_len += generic_salt_encode (hashconfig, (const u8 *) salt->salt_buf, (const int) salt->salt_len, (u8 *) line_buf + line_len);
line_len += snprintf (line_buf + line_len, line_size - line_len, "#%08x%08x%08x%08x",

View File

@ -194,6 +194,7 @@ static void to_hccapx_t (const hashes_t *hashes, hccapx_t *hccapx, const u32 sal
}
}
/*
static int check_old_hccap (const char *hashfile)
{
FILE *fp = fopen (hashfile, "rb");
@ -212,6 +213,7 @@ static int check_old_hccap (const char *hashfile)
return 1;
}
*/
const char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{

View File

@ -191,6 +191,7 @@ static void to_hccapx_t (const hashes_t *hashes, hccapx_t *hccapx, const u32 sal
}
}
/*
static int check_old_hccap (const char *hashfile)
{
FILE *fp = fopen (hashfile, "rb");
@ -209,6 +210,7 @@ static int check_old_hccap (const char *hashfile)
return 1;
}
*/
const char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{

View File

@ -206,8 +206,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const krb5pa_t *krb5pa = (const krb5pa_t *) esalt_buf;
u8 *ptr_timestamp = (u8 *) krb5pa->timestamp;

View File

@ -364,8 +364,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
char base64_salt[32] = { 0 };
base64_encode (int_to_base64, (const u8 *) salt->salt_buf, salt->salt_len, (u8 *) base64_salt);

View File

@ -60,8 +60,6 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c
u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const bool optimized_kernel = (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL);
u32 pw_max = 64; // https://www.ibm.com/support/knowledgecenter/en/SSKTWP_8.5.3/com.ibm.notes85.client.doc/fram_limits_of_notes_r.html
return pw_max;

View File

@ -56,7 +56,7 @@ typedef struct oldoffice34
static const char *SIGNATURE_OLDOFFICE = "$oldoffice$";
static const char *SIGNATURE_OLDOFFICE3 = "$oldoffice$3";
static const char *SIGNATURE_OLDOFFICE4 = "$oldoffice$4";
//static const char *SIGNATURE_OLDOFFICE4 = "$oldoffice$4";
u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{

View File

@ -194,9 +194,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u8 *cry_salt_buf_pos = token.buf[4];
const u8 *cry_rounds_pos = token.buf[5];
const u8 *ckey_len_pos = token.buf[6];
const u8 *ckey_buf_pos = token.buf[7];
const u8 *public_key_len_pos = token.buf[8];
const u8 *public_key_buf_pos = token.buf[9];
const int cry_master_buf_len = token.len[2];
const int cry_salt_buf_len = token.len[4];

View File

@ -221,8 +221,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const krb5tgs_t *krb5tgs = (const krb5tgs_t *) esalt_buf;
char data[5120 * 4 * 2] = { 0 };

View File

@ -162,8 +162,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const int line_len = snprintf (line_buf, line_size, "%s*1*%u*%08x%08x%08x%08x*%08x%08x%08x%08x%08x%08x",
SIGNATURE_AXCRYPT,
salt->salt_iter,

View File

@ -336,8 +336,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const zip2_t *zip2 = (const zip2_t *) esalt_buf;
const u32 salt_len = zip2->salt_len;

View File

@ -134,7 +134,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
// salt
const u8 *salt_pos = token.buf[1];
const int salt_len = token.len[1];
salt->salt_buf[0] = hex_to_u32 (salt_pos + 0);
salt->salt_buf[1] = hex_to_u32 (salt_pos + 8);

View File

@ -145,7 +145,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
// salt
const u8 *salt_pos = token.buf[1];
const int salt_len = token.len[1];
salt->salt_buf[0] = hex_to_u32 (salt_pos + 0);
salt->salt_buf[1] = hex_to_u32 (salt_pos + 8);

View File

@ -267,13 +267,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
dpsl_buf_ptr[4] = byte_swap_32 (dpsl_buf_ptr[ 4]);
}
digest[0] = itunes_backup->dpsl[0] ^ itunes_backup->wpky[0];
digest[1] = itunes_backup->dpsl[1] ^ itunes_backup->wpky[1];
digest[2] = itunes_backup->dpsl[2] ^ itunes_backup->wpky[2];
digest[3] = itunes_backup->dpsl[3] ^ itunes_backup->wpky[3];
return (PARSER_OK);
}
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const itunes_backup_t *itunes_backup = (const itunes_backup_t *) esalt_buf;
// WPKY

View File

@ -281,13 +281,16 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
dpsl_buf_ptr[4] = byte_swap_32 (dpsl_buf_ptr[ 4]);
}
digest[0] = itunes_backup->dpsl[0] ^ itunes_backup->wpky[0];
digest[1] = itunes_backup->dpsl[1] ^ itunes_backup->wpky[1];
digest[2] = itunes_backup->dpsl[2] ^ itunes_backup->wpky[2];
digest[3] = itunes_backup->dpsl[3] ^ itunes_backup->wpky[3];
return (PARSER_OK);
}
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const itunes_backup_t *itunes_backup = (const itunes_backup_t *) esalt_buf;
// WPKY

View File

@ -278,8 +278,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const dpapimk_t *dpapimk = (const dpapimk_t *) esalt_buf;
u32 version = 1;

View File

@ -424,8 +424,6 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
{
const u32 *digest = (const u32 *) digest_buf;
char *salt_ptr = (char *) salt->salt_buf;
char tmp_salt[SALT_MAX * 2];
const int salt_len = generic_salt_encode (hashconfig, (const u8 *) salt->salt_buf, (const int) salt->salt_len, (u8 *) tmp_salt);

View File

@ -290,8 +290,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const dpapimk_t *dpapimk = (const dpapimk_t *) esalt_buf;
u32 version = 2;

View File

@ -185,8 +185,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const krb5asrep_t *krb5asrep = (const krb5asrep_t *) esalt_buf;
char data[5120 * 4 * 2] = { 0 };

View File

@ -245,8 +245,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const android_backup_t *android_backup = (const android_backup_t *) esalt_buf;
int line_len = 0;

View File

@ -115,9 +115,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
digest[3] = byte_swap_32 (digest[3]);
digest[4] = byte_swap_32 (digest[4]);
const u8 *salt_pos = token.buf[1];
const int salt_len = token.len[1];
const bool parse_rc1 = generic_salt_decode (hashconfig, token.buf[1], token.len[1], (u8 *) sha1_double_salt->salt1_buf, (int *) &sha1_double_salt->salt1_len);
if (parse_rc1 == false) return (PARSER_SALT_LENGTH);

View File

@ -126,9 +126,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
digest[3] = byte_swap_32 (digest[3]);
digest[4] = byte_swap_32 (digest[4]);
const u8 *salt_pos = token.buf[1];
const int salt_len = token.len[1];
const bool parse_rc1 = generic_salt_decode (hashconfig, token.buf[1], token.len[1], (u8 *) devise_double_salt->salt_buf, (int *) &devise_double_salt->salt_len);
if (parse_rc1 == false) return (PARSER_SALT_LENGTH);

View File

@ -254,8 +254,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const krb5tgs_17_t *krb5tgs = (const krb5tgs_17_t *) esalt_buf;
char data[5120 * 4 * 2] = { 0 };

View File

@ -254,8 +254,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
{
const u32 *digest = (const u32 *) digest_buf;
const krb5tgs_18_t *krb5tgs = (const krb5tgs_18_t *) esalt_buf;
char data[5120 * 4 * 2] = { 0 };

View File

@ -87,8 +87,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
md4_update (&ctx, w, pw_len);
md4_final (&ctx);
u32 dgst[4];
digest[0] = ctx.h[0];
digest[1] = ctx.h[1];
digest[2] = ctx.h[2];

View File

@ -18,13 +18,12 @@
int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain, u32 *plain_buf, int *out_len)
{
const combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx;
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
const hashes_t *hashes = hashcat_ctx->hashes;
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
const user_options_t *user_options = hashcat_ctx->user_options;
const user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra;
const combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx;
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
const hashes_t *hashes = hashcat_ctx->hashes;
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
const user_options_t *user_options = hashcat_ctx->user_options;
const u64 gidvid = plain->gidvid;
const u32 il_pos = plain->il_pos;

View File

@ -30,11 +30,9 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx)
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
user_options_t *user_options = hashcat_ctx->user_options;
size_t dgst_size = hashconfig->dgst_size;
bool is_salted = hashconfig->is_salted;
size_t esalt_size = hashconfig->esalt_size;
size_t hook_salt_size = hashconfig->hook_salt_size;
char separator = hashconfig->separator;
const size_t dgst_size = hashconfig->dgst_size;
const bool is_salted = hashconfig->is_salted;
const char separator = hashconfig->separator;
salt_t *salts_buf = hashes->salts_buf;
const u32 salts_cnt = hashes->salts_cnt;
@ -203,10 +201,6 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx)
if (last_separator == NULL) break;
char *line_pw_buf = last_separator + 1;
size_t line_pw_len = line_buf + line_len - line_pw_buf;
char *line_hash_buf = line_buf;
int line_hash_len = last_separator - line_buf;

View File

@ -25,6 +25,7 @@ int sort_by_hash_no_salt (const void *v1, const void *v2, void *v3);
// this function is for potfile comparison where the potfile does not contain all the
// information requires to do a true sort_by_hash() bsearch
/*
static int sort_by_hash_t_salt (const void *v1, const void *v2)
{
const hash_t *h1 = (const hash_t *) v1;
@ -55,6 +56,7 @@ static int sort_by_hash_t_salt (const void *v1, const void *v2)
return 0;
}
*/
// this function is special and only used whenever --username and --show are used together:
// it will sort all tree entries according to the settings stored in hashconfig
@ -372,7 +374,6 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx)
const hashes_t *hashes = hashcat_ctx->hashes;
const module_ctx_t *module_ctx = hashcat_ctx->module_ctx;
const potfile_ctx_t *potfile_ctx = hashcat_ctx->potfile_ctx;
const user_options_t *user_options = hashcat_ctx->user_options;
if (potfile_ctx->enabled == false) return 0;

View File

@ -54,8 +54,6 @@ static const char *PA_255 = "Unknown error";
static const char *OPTI_STR_OPTIMIZED_KERNEL = "Optimized-Kernel";
static const char *OPTI_STR_ZERO_BYTE = "Zero-Byte";
static const char *OPTI_STR_PRECOMPUTE_INIT = "Precompute-Init";
static const char *OPTI_STR_PRECOMPUTE_MERKLE = "Precompute-Merkle-Demgard";
static const char *OPTI_STR_PRECOMPUTE_PERMUT = "Precompute-Final-Permutation";
static const char *OPTI_STR_MEET_IN_MIDDLE = "Meet-In-The-Middle";
static const char *OPTI_STR_EARLY_SKIP = "Early-Skip";
static const char *OPTI_STR_NOT_SALTED = "Not-Salted";
@ -1229,8 +1227,6 @@ int generic_salt_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, const u8 *
{
for (int i = 0, j = 0; i < in_len; i += 1, j += 2)
{
const u8 p = in_buf[i];
u8_to_hex (in_buf[i], tmp_u8 + j);
}

View File

@ -276,10 +276,9 @@ void usage_mini_print (const char *progname)
void usage_big_print (hashcat_ctx_t *hashcat_ctx)
{
folder_config_t *folder_config = hashcat_ctx->folder_config;
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
module_ctx_t *module_ctx = hashcat_ctx->module_ctx;
user_options_t *user_options = hashcat_ctx->user_options;
const folder_config_t *folder_config = hashcat_ctx->folder_config;
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
user_options_t *user_options = hashcat_ctx->user_options;
char *modulefile = (char *) hcmalloc (HCBUFSIZ_TINY);