Get rid of status* variables in data. context

pull/518/head
jsteube 8 years ago
parent 6d992ec37e
commit e4b4855fbd

@ -13,9 +13,9 @@ int sort_by_hash_no_salt (const void *v1, const void *v2);
void save_hash (const user_options_t *user_options, const hashconfig_t *hashconfig, const hashes_t *hashes);
void check_hash (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, plain_t *plain);
void check_hash (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, plain_t *plain);
int check_cracked (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos);
int check_cracked (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, hashes_t *hashes, const uint 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_stage2 (hashes_t *hashes, const hashconfig_t *hashconfig, opencl_ctx_t *opencl_ctx, user_options_t *user_options);

@ -972,8 +972,6 @@ typedef struct
char *outfile_check_directory;
u32 loopback;
u32 status;
u32 status_timer;
u32 machine_readable;
u32 quiet;
u32 force;

@ -6,6 +6,6 @@
#ifndef _WEAK_HASH_H
#define _WEAK_HASH_H
void weak_hash_check (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos);
void weak_hash_check (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos);
#endif // _WEAK_HASH_H

@ -219,7 +219,7 @@ void save_hash (const user_options_t *user_options, const hashconfig_t *hashconf
unlink (old_hashfile);
}
void check_hash (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, plain_t *plain)
void check_hash (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, plain_t *plain)
{
debugfile_ctx_t *debugfile_ctx = data.debugfile_ctx;
loopback_ctx_t *loopback_ctx = data.loopback_ctx;
@ -474,7 +474,7 @@ void check_hash (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, plai
if ((data.wordlist_mode == WL_MODE_FILE) || (data.wordlist_mode == WL_MODE_MASK))
{
if ((opencl_ctx->devices_status != STATUS_CRACKED) && (data.status != 1))
if ((opencl_ctx->devices_status != STATUS_CRACKED) && (user_options->status != true))
{
if (outfile_ctx->filename == NULL) if (quiet == false) send_prompt ();
}
@ -503,7 +503,7 @@ void check_hash (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, plai
}
}
int check_cracked (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos)
int check_cracked (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos)
{
salt_t *salt_buf = &hashes->salts_buf[salt_pos];
@ -567,7 +567,7 @@ int check_cracked (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, ha
if (hashes->salts_done == hashes->salts_cnt) mycracked (opencl_ctx);
check_hash (opencl_ctx, device_param, &cracked[i]);
check_hash (opencl_ctx, device_param, user_options, &cracked[i]);
}
hc_thread_mutex_unlock (mux_display);

@ -286,8 +286,6 @@ int main (int argc, char **argv)
data.scrypt_tmto = user_options->scrypt_tmto;
data.segment_size = user_options->segment_size;
data.session = user_options->session;
data.status = user_options->status;
data.status_timer = user_options->status_timer;
data.truecrypt_keyfiles = user_options->truecrypt_keyfiles;
data.veracrypt_keyfiles = user_options->veracrypt_keyfiles;
data.veracrypt_pim = user_options->veracrypt_pim;
@ -2601,7 +2599,7 @@ int main (int argc, char **argv)
for (uint salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
{
weak_hash_check (opencl_ctx, device_param, hashconfig, hashes, salt_pos);
weak_hash_check (opencl_ctx, device_param, user_options, hashconfig, hashes, salt_pos);
}
// Display hack, guarantee that there is at least one \r before real start

@ -1244,7 +1244,7 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash
if (data.benchmark == false)
{
check_cracked (opencl_ctx, device_param, hashconfig, hashes, salt_pos);
check_cracked (opencl_ctx, device_param, user_options, hashconfig, hashes, salt_pos);
}
/**

@ -30,7 +30,7 @@
extern hc_global_data_t data;
void weak_hash_check (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos)
void weak_hash_check (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, hashes_t *hashes, const uint salt_pos)
{
if (device_param == NULL)
{
@ -93,7 +93,7 @@ void weak_hash_check (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param,
* result
*/
check_cracked (opencl_ctx, device_param, hashconfig, hashes, salt_pos);
check_cracked (opencl_ctx, device_param, user_options, hashconfig, hashes, salt_pos);
/**
* cleanup

Loading…
Cancel
Save