mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-23 08:38:09 +00:00
Do not reset innerloop_left and outerloop_left too early so we can access it from status display
This commit is contained in:
parent
fa70e44874
commit
20832d29d6
@ -726,7 +726,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
EVENT (EVENT_POTFILE_NUM_CRACKED);
|
||||
|
||||
// main call, also not we have some threads to care about, so don't return with -1 anywhere from here
|
||||
// main call
|
||||
|
||||
EVENT (EVENT_INNERLOOP1_STARTING);
|
||||
|
||||
@ -747,7 +747,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
const int rc_inner1_loop = inner1_loop (hashcat_ctx);
|
||||
|
||||
if (rc_inner1_loop == -1) myabort (hashcat_ctx);
|
||||
if (rc_inner1_loop == -1) return -1;
|
||||
|
||||
if (status_ctx->run_main_level2 == false) break;
|
||||
}
|
||||
@ -756,7 +756,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const int rc_inner1_loop = inner1_loop (hashcat_ctx);
|
||||
|
||||
if (rc_inner1_loop == -1) myabort (hashcat_ctx);
|
||||
if (rc_inner1_loop == -1) return -1;
|
||||
}
|
||||
|
||||
// wait for inner threads
|
||||
|
10
src/opencl.c
10
src/opencl.c
@ -1861,14 +1861,16 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co
|
||||
if (status_ctx->run_thread_level2 == false) break;
|
||||
}
|
||||
|
||||
device_param->innerloop_pos = 0;
|
||||
device_param->innerloop_left = 0;
|
||||
//status screen makes use of this, can't reset here
|
||||
//device_param->innerloop_pos = 0;
|
||||
//device_param->innerloop_left = 0;
|
||||
|
||||
if (status_ctx->run_thread_level2 == false) break;
|
||||
}
|
||||
|
||||
device_param->outerloop_pos = 0;
|
||||
device_param->outerloop_left = 0;
|
||||
//status screen makes use of this, can't reset here
|
||||
//device_param->outerloop_pos = 0;
|
||||
//device_param->outerloop_left = 0;
|
||||
|
||||
device_param->speed_pos = speed_pos;
|
||||
|
||||
|
123
src/status.c
123
src/status.c
@ -865,69 +865,6 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (status_ctx->run_main_level1 == true)
|
||||
{
|
||||
for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
|
||||
{
|
||||
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
|
||||
|
||||
if (device_param->skipped) continue;
|
||||
|
||||
if ((device_param->outerloop_left == 0) || (device_param->innerloop_left == 0))
|
||||
{
|
||||
if (user_options_extra->attack_kern == ATTACK_KERN_BF)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: [Generating]", device_id + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: [Copying]", device_id + 1);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
const u32 outerloop_first = 0;
|
||||
const u32 outerloop_last = device_param->outerloop_left - 1;
|
||||
|
||||
const u32 innerloop_first = 0;
|
||||
const u32 innerloop_last = device_param->innerloop_left - 1;
|
||||
|
||||
plain_t plain1 = { 0, 0, 0, outerloop_first, innerloop_first };
|
||||
plain_t plain2 = { 0, 0, 0, outerloop_last, innerloop_last };
|
||||
|
||||
u32 plain_buf1[16] = { 0 };
|
||||
u32 plain_buf2[16] = { 0 };
|
||||
|
||||
u8 *plain_ptr1 = (u8 *) plain_buf1;
|
||||
u8 *plain_ptr2 = (u8 *) plain_buf2;
|
||||
|
||||
int plain_len1 = 0;
|
||||
int plain_len2 = 0;
|
||||
|
||||
build_plain (hashcat_ctx, device_param, &plain1, plain_buf1, &plain_len1);
|
||||
build_plain (hashcat_ctx, device_param, &plain2, plain_buf2, &plain_len2);
|
||||
|
||||
bool need_hex1 = need_hexify (plain_ptr1, plain_len1);
|
||||
bool need_hex2 = need_hexify (plain_ptr2, plain_len2);
|
||||
|
||||
if ((need_hex1 == true) || (need_hex2 == true))
|
||||
{
|
||||
exec_hexify (plain_ptr1, plain_len1, plain_ptr1);
|
||||
exec_hexify (plain_ptr2, plain_len2, plain_ptr2);
|
||||
|
||||
plain_ptr1[plain_len1 * 2] = 0;
|
||||
plain_ptr2[plain_len2 * 2] = 0;
|
||||
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: $HEX[%s] -> $HEX[%s]", device_id + 1, plain_ptr1, plain_ptr2);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: %s -> %s", device_id + 1, plain_ptr1, plain_ptr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
|
||||
{
|
||||
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
|
||||
@ -1091,6 +1028,66 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (status_ctx->run_main_level1 == false) return;
|
||||
|
||||
for (u32 device_id = 0; device_id < opencl_ctx->devices_cnt; device_id++)
|
||||
{
|
||||
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
|
||||
|
||||
if (device_param->skipped) continue;
|
||||
|
||||
if ((device_param->outerloop_left == 0) || (device_param->innerloop_left == 0))
|
||||
{
|
||||
if (user_options_extra->attack_kern == ATTACK_KERN_BF)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: [Generating]", device_id + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: [Copying]", device_id + 1);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
const u32 outerloop_first = 0;
|
||||
const u32 outerloop_last = device_param->outerloop_left - 1;
|
||||
|
||||
const u32 innerloop_first = 0;
|
||||
const u32 innerloop_last = device_param->innerloop_left - 1;
|
||||
|
||||
plain_t plain1 = { 0, 0, 0, outerloop_first, innerloop_first };
|
||||
plain_t plain2 = { 0, 0, 0, outerloop_last, innerloop_last };
|
||||
|
||||
u32 plain_buf1[16] = { 0 };
|
||||
u32 plain_buf2[16] = { 0 };
|
||||
|
||||
u8 *plain_ptr1 = (u8 *) plain_buf1;
|
||||
u8 *plain_ptr2 = (u8 *) plain_buf2;
|
||||
|
||||
int plain_len1 = 0;
|
||||
int plain_len2 = 0;
|
||||
|
||||
build_plain (hashcat_ctx, device_param, &plain1, plain_buf1, &plain_len1);
|
||||
build_plain (hashcat_ctx, device_param, &plain2, plain_buf2, &plain_len2);
|
||||
|
||||
bool need_hex1 = need_hexify (plain_ptr1, plain_len1);
|
||||
bool need_hex2 = need_hexify (plain_ptr2, plain_len2);
|
||||
|
||||
if ((need_hex1 == true) || (need_hex2 == true))
|
||||
{
|
||||
exec_hexify (plain_ptr1, plain_len1, plain_ptr1);
|
||||
exec_hexify (plain_ptr2, plain_len2, plain_ptr2);
|
||||
|
||||
plain_ptr1[plain_len1 * 2] = 0;
|
||||
plain_ptr2[plain_len2 * 2] = 0;
|
||||
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: $HEX[%s] -> $HEX[%s]", device_id + 1, plain_ptr1, plain_ptr2);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Candidates.#%d..: %s -> %s", device_id + 1, plain_ptr1, plain_ptr2);
|
||||
}
|
||||
}
|
||||
|
||||
if (user_options->gpu_temp_disable == false)
|
||||
{
|
||||
hc_thread_mutex_lock (status_ctx->mux_hwmon);
|
||||
|
Loading…
Reference in New Issue
Block a user