mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 18:08:20 +00:00
Get rid of restore, restore_disable and restore_timer variables in data. context
This commit is contained in:
parent
2476f36ffe
commit
a3b4cc5a80
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
u64 get_lowest_words_done (opencl_ctx_t *opencl_ctx);
|
u64 get_lowest_words_done (opencl_ctx_t *opencl_ctx);
|
||||||
|
|
||||||
restore_data_t *init_restore (int argc, char **argv);
|
restore_data_t *init_restore (int argc, char **argv, const user_options_t *user_options);
|
||||||
|
|
||||||
void read_restore (const char *eff_restore_file, restore_data_t *rd);
|
void read_restore (const char *eff_restore_file, restore_data_t *rd);
|
||||||
|
|
||||||
@ -33,6 +33,6 @@ void write_restore (opencl_ctx_t *opencl_ctx, const char *new_restore_file, rest
|
|||||||
|
|
||||||
void cycle_restore (opencl_ctx_t *opencl_ctx);
|
void cycle_restore (opencl_ctx_t *opencl_ctx);
|
||||||
|
|
||||||
void stop_at_checkpoint (opencl_ctx_t *opencl_ctx);
|
void stop_at_checkpoint (opencl_ctx_t *opencl_ctx, const user_options_t *user_options);
|
||||||
|
|
||||||
#endif // _RESTORE_H
|
#endif // _RESTORE_H
|
||||||
|
@ -971,9 +971,7 @@ typedef struct
|
|||||||
char *induction_directory;
|
char *induction_directory;
|
||||||
char *outfile_check_directory;
|
char *outfile_check_directory;
|
||||||
u32 loopback;
|
u32 loopback;
|
||||||
u32 restore;
|
|
||||||
u32 restore_timer;
|
|
||||||
u32 restore_disable;
|
|
||||||
u32 status;
|
u32 status;
|
||||||
u32 status_timer;
|
u32 status_timer;
|
||||||
u32 machine_readable;
|
u32 machine_readable;
|
||||||
|
@ -209,9 +209,6 @@ int main (int argc, char **argv)
|
|||||||
* session
|
* session
|
||||||
*/
|
*/
|
||||||
|
|
||||||
data.session = user_options->session;
|
|
||||||
data.restore_disable = user_options->restore_disable;
|
|
||||||
|
|
||||||
char *eff_restore_file = (char *) mymalloc (HCBUFSIZ_TINY);
|
char *eff_restore_file = (char *) mymalloc (HCBUFSIZ_TINY);
|
||||||
char *new_restore_file = (char *) mymalloc (HCBUFSIZ_TINY);
|
char *new_restore_file = (char *) mymalloc (HCBUFSIZ_TINY);
|
||||||
|
|
||||||
@ -221,7 +218,7 @@ int main (int argc, char **argv)
|
|||||||
data.eff_restore_file = eff_restore_file;
|
data.eff_restore_file = eff_restore_file;
|
||||||
data.new_restore_file = new_restore_file;
|
data.new_restore_file = new_restore_file;
|
||||||
|
|
||||||
restore_data_t *rd = init_restore (argc, argv);
|
restore_data_t *rd = init_restore (argc, argv, user_options);
|
||||||
|
|
||||||
data.rd = rd;
|
data.rd = rd;
|
||||||
|
|
||||||
@ -287,9 +284,6 @@ int main (int argc, char **argv)
|
|||||||
data.quiet = user_options->quiet;
|
data.quiet = user_options->quiet;
|
||||||
data.remove = user_options->remove;
|
data.remove = user_options->remove;
|
||||||
data.remove_timer = user_options->remove_timer;
|
data.remove_timer = user_options->remove_timer;
|
||||||
data.restore = user_options->restore;
|
|
||||||
data.restore_disable = user_options->restore_disable;
|
|
||||||
data.restore_timer = user_options->restore_timer;
|
|
||||||
data.runtime = user_options->runtime;
|
data.runtime = user_options->runtime;
|
||||||
data.scrypt_tmto = user_options->scrypt_tmto;
|
data.scrypt_tmto = user_options->scrypt_tmto;
|
||||||
data.segment_size = user_options->segment_size;
|
data.segment_size = user_options->segment_size;
|
||||||
@ -668,7 +662,7 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
local_free (rd);
|
local_free (rd);
|
||||||
|
|
||||||
rd = init_restore (argc, argv);
|
rd = init_restore (argc, argv, user_options);
|
||||||
|
|
||||||
data.rd = rd;
|
data.rd = rd;
|
||||||
}
|
}
|
||||||
@ -3680,8 +3674,6 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
user_options->restore = false;
|
user_options->restore = false;
|
||||||
|
|
||||||
data.restore = false;
|
|
||||||
|
|
||||||
if (induction_dictionaries_cnt)
|
if (induction_dictionaries_cnt)
|
||||||
{
|
{
|
||||||
unlink (induction_dictionaries[0]);
|
unlink (induction_dictionaries[0]);
|
||||||
|
@ -66,11 +66,11 @@ u64 get_lowest_words_done (opencl_ctx_t *opencl_ctx)
|
|||||||
return words_cur;
|
return words_cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_data_t *init_restore (int argc, char **argv)
|
restore_data_t *init_restore (int argc, char **argv, const user_options_t *user_options)
|
||||||
{
|
{
|
||||||
restore_data_t *rd = (restore_data_t *) mymalloc (sizeof (restore_data_t));
|
restore_data_t *rd = (restore_data_t *) mymalloc (sizeof (restore_data_t));
|
||||||
|
|
||||||
if (data.restore_disable == 0)
|
if (user_options->restore_disable == false)
|
||||||
{
|
{
|
||||||
FILE *fp = fopen (data.eff_restore_file, "rb");
|
FILE *fp = fopen (data.eff_restore_file, "rb");
|
||||||
|
|
||||||
@ -303,11 +303,11 @@ void cycle_restore (opencl_ctx_t *opencl_ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop_at_checkpoint (opencl_ctx_t *opencl_ctx)
|
void stop_at_checkpoint (opencl_ctx_t *opencl_ctx, const user_options_t *user_options)
|
||||||
{
|
{
|
||||||
// this feature only makes sense if --restore-disable was not specified
|
// this feature only makes sense if --restore-disable was not specified
|
||||||
|
|
||||||
if (data.restore_disable == 1)
|
if (user_options->restore_disable == true)
|
||||||
{
|
{
|
||||||
log_info ("WARNING: This feature is disabled when --restore-disable is specified");
|
log_info ("WARNING: This feature is disabled when --restore-disable is specified");
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ void *thread_keypress (void *p)
|
|||||||
|
|
||||||
log_info ("");
|
log_info ("");
|
||||||
|
|
||||||
stop_at_checkpoint (opencl_ctx);
|
stop_at_checkpoint (opencl_ctx, user_options);
|
||||||
|
|
||||||
log_info ("");
|
log_info ("");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user