}
}
+ /**
+ * status, monitor and outfile remove threads
+ */
+
+ uint wordlist_mode = ((optind + 1) < myargc) ? WL_MODE_FILE : WL_MODE_STDIN;
+
+ data.wordlist_mode = wordlist_mode;
+
+ if (wordlist_mode == WL_MODE_STDIN)
+ {
+ status = 1;
+
+ data.status = status;
+ }
+
+ uint i_threads_cnt = 0;
+
+ hc_thread_t *i_threads = (hc_thread_t *) mycalloc (10, sizeof (hc_thread_t));
+
+ if (keyspace == 0 && benchmark == 0 && stdout_flag == 0)
+ {
+ if ((data.wordlist_mode == WL_MODE_FILE) || (data.wordlist_mode == WL_MODE_MASK))
+ {
+ hc_thread_create (i_threads[i_threads_cnt], thread_keypress, NULL);
+
+ i_threads_cnt++;
+ }
+ }
+
/**
* config
*/
wl_data->cnt = 0;
wl_data->pos = 0;
- uint wordlist_mode = ((optind + 1) < myargc) ? WL_MODE_FILE : WL_MODE_STDIN;
-
- data.wordlist_mode = wordlist_mode;
-
cs_t *css_buf = NULL;
uint css_cnt = 0;
uint dictcnt = 0;
* status and monitor threads
*/
- if (data.devices_status != STATUS_CRACKED) data.devices_status = STATUS_STARTING;
-
- uint i_threads_cnt = 0;
-
- hc_thread_t *i_threads = (hc_thread_t *) mycalloc (10, sizeof (hc_thread_t));
-
- if ((data.wordlist_mode == WL_MODE_FILE) || (data.wordlist_mode == WL_MODE_MASK))
- {
- if (stdout_flag == 0)
- {
- hc_thread_create (i_threads[i_threads_cnt], thread_keypress, &benchmark);
-
- i_threads_cnt++;
- }
- }
+ if (data.devices_status == STATUS_CRACKED) break;
+ if (data.devices_status == STATUS_ABORTED) break;
+ if (data.devices_status == STATUS_QUIT) break;
- if (wordlist_mode == WL_MODE_STDIN) data.status = 1;
+ data.devices_status = STATUS_STARTING;
uint ni_threads_cnt = 0;
hc_thread_t *ni_threads = (hc_thread_t *) mycalloc (10, sizeof (hc_thread_t));
- if (stdout_flag == 0)
+ if (keyspace == 0 && benchmark == 0 && stdout_flag == 0)
{
hc_thread_create (ni_threads[ni_threads_cnt], thread_monitor, NULL);
* Outfile remove
*/
- if (keyspace == 0)
+ if (keyspace == 0 && benchmark == 0 && stdout_flag == 0)
{
if (outfile_check_timer != 0)
{
for (uint maskpos = rd->maskpos; maskpos < maskcnt; maskpos++)
{
if (data.devices_status == STATUS_CRACKED) break;
+ if (data.devices_status == STATUS_ABORTED) break;
+ if (data.devices_status == STATUS_QUIT) break;
data.devices_status = STATUS_INIT;
logfile_sub_msg ("START");
+ if (data.devices_status == STATUS_CRACKED) break;
+ if (data.devices_status == STATUS_ABORTED) break;
+ if (data.devices_status == STATUS_QUIT) break;
+
data.devices_status = STATUS_INIT;
memset (data.words_progress_done, 0, data.salts_cnt * sizeof (u64));
hc_thread_t *c_threads = (hc_thread_t *) mycalloc (data.devices_cnt, sizeof (hc_thread_t));
+ if (data.devices_status == STATUS_CRACKED) break;
+ if (data.devices_status == STATUS_ABORTED) break;
+ if (data.devices_status == STATUS_QUIT) break;
+
data.devices_status = STATUS_AUTOTUNE;
for (uint device_id = 0; device_id < data.devices_cnt; device_id++)
if (data.devices_status == STATUS_STOP_AT_CHECKPOINT) check_checkpoint ();
+ if (data.devices_status == STATUS_CRACKED) break;
if (data.devices_status == STATUS_ABORTED) break;
if (data.devices_status == STATUS_QUIT) break;
local_free (ni_threads);
- // wait for interactive threads
-
- for (uint thread_idx = 0; thread_idx < i_threads_cnt; thread_idx++)
- {
- hc_thread_wait (1, &i_threads[thread_idx]);
- }
-
- local_free (i_threads);
-
// we dont need restore file anymore
if (data.restore_disable == 0)
{
if (quiet == 0) log_info ("");
- if (status == 1)
+ if (status == 1 && stdout_flag == 0)
{
status_display ();
}
if (data.devices_status == STATUS_QUIT) break;
}
+ // wait for interactive threads
+
+ for (uint thread_idx = 0; thread_idx < i_threads_cnt; thread_idx++)
+ {
+ hc_thread_wait (1, &i_threads[thread_idx]);
+ }
+
+ local_free (i_threads);
+
// destroy others mutex
hc_thread_mutex_delete (mux_dispatcher);