mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-16 17:42:04 +00:00
Merge pull request #12 from philsmd/master
allow both enabling and disabling of restore point update (implemented with issue #10)
This commit is contained in:
commit
7fa17767d3
@ -17512,7 +17512,6 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
hc_thread_wait (devices_cnt, c_threads);
|
hc_thread_wait (devices_cnt, c_threads);
|
||||||
|
|
||||||
|
|
||||||
local_free (c_threads);
|
local_free (c_threads);
|
||||||
|
|
||||||
data.restore = 0;
|
data.restore = 0;
|
||||||
|
26
src/shared.c
26
src/shared.c
@ -8364,11 +8364,23 @@ void bypass ()
|
|||||||
|
|
||||||
void stop_at_checkpoint ()
|
void stop_at_checkpoint ()
|
||||||
{
|
{
|
||||||
if (data.devices_status != STATUS_RUNNING) return;
|
if (data.devices_status != STATUS_STOP_AT_CHECKPOINT)
|
||||||
|
{
|
||||||
|
if (data.devices_status != STATUS_RUNNING) return;
|
||||||
|
}
|
||||||
|
|
||||||
// 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 == 0)
|
if (data.restore_disable == 1)
|
||||||
|
{
|
||||||
|
log_info ("WARNING: this feature is disabled when --restore-disable was specified");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if monitoring of Restore Point updates should be enabled or disabled
|
||||||
|
|
||||||
|
if (data.devices_status != STATUS_STOP_AT_CHECKPOINT)
|
||||||
{
|
{
|
||||||
data.devices_status = STATUS_STOP_AT_CHECKPOINT;
|
data.devices_status = STATUS_STOP_AT_CHECKPOINT;
|
||||||
|
|
||||||
@ -8376,11 +8388,17 @@ void stop_at_checkpoint ()
|
|||||||
|
|
||||||
data.checkpoint_cur_words = get_lowest_words_done ();
|
data.checkpoint_cur_words = get_lowest_words_done ();
|
||||||
|
|
||||||
log_info ("Checkpoint enabled, will quit when Restore Point updates next time");
|
log_info ("Checkpoint enabled: will quit at next Restore Point update");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_info ("WARNING: this feature is disabled when --restore-disable was specified");
|
data.devices_status = STATUS_RUNNING;
|
||||||
|
|
||||||
|
// reset the global value for checkpoint checks
|
||||||
|
|
||||||
|
data.checkpoint_cur_words = 0;
|
||||||
|
|
||||||
|
log_info ("Checkpoint disabled: Restore Point updates will no longer be monitored");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user