|
|
|
@ -16,8 +16,29 @@
|
|
|
|
|
#include "rp.h"
|
|
|
|
|
#include "rp_cpu.h"
|
|
|
|
|
#include "slow_candidates.h"
|
|
|
|
|
#include "user_options.h"
|
|
|
|
|
#include "dispatch.h"
|
|
|
|
|
|
|
|
|
|
static u64 get_highest_words_done (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
|
|
|
|
|
|
|
|
|
|
u64 words_cur = 0;
|
|
|
|
|
|
|
|
|
|
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 == true) continue;
|
|
|
|
|
|
|
|
|
|
const u64 words_done = device_param->words_done;
|
|
|
|
|
|
|
|
|
|
if (words_done > words_cur) words_cur = words_done;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return words_cur;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static u64 get_lowest_words_done (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
|
|
|
|
@ -146,322 +167,146 @@ static int calc_stdin (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
|
|
|
|
|
iconv_tmp = (char *) hcmalloc (HCBUFSIZ_TINY);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->slow_candidates == true)
|
|
|
|
|
while (status_ctx->run_thread_level1 == true)
|
|
|
|
|
{
|
|
|
|
|
while (status_ctx->run_thread_level1 == true)
|
|
|
|
|
hc_thread_mutex_lock (status_ctx->mux_dispatcher);
|
|
|
|
|
|
|
|
|
|
if (feof (stdin) != 0)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_lock (status_ctx->mux_dispatcher);
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_dispatcher);
|
|
|
|
|
|
|
|
|
|
if (feof (stdin) != 0)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_dispatcher);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
u64 words_extra_total = 0;
|
|
|
|
|
|
|
|
|
|
u64 words_extra_total = 0;
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
memset (device_param->pws_pre_buf, 0, device_param->size_pws_pre);
|
|
|
|
|
memset (device_param->pws_base_buf, 0, device_param->size_pws_base);
|
|
|
|
|
while (device_param->pws_cnt < device_param->kernel_power)
|
|
|
|
|
{
|
|
|
|
|
const int rc_select = select_read_timeout_console (1);
|
|
|
|
|
|
|
|
|
|
device_param->pws_pre_cnt = 0;
|
|
|
|
|
device_param->pws_base_cnt = 0;
|
|
|
|
|
if (rc_select == -1) break;
|
|
|
|
|
|
|
|
|
|
while (device_param->pws_pre_cnt < device_param->kernel_power)
|
|
|
|
|
if (rc_select == 0)
|
|
|
|
|
{
|
|
|
|
|
const int rc_select = select_read_timeout_console (1);
|
|
|
|
|
|
|
|
|
|
if (rc_select == -1) break;
|
|
|
|
|
|
|
|
|
|
if (rc_select == 0)
|
|
|
|
|
{
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt++;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt = 0;
|
|
|
|
|
|
|
|
|
|
char *line_buf = fgets (buf, HCBUFSIZ_LARGE - 1, stdin);
|
|
|
|
|
|
|
|
|
|
if (line_buf == NULL) break;
|
|
|
|
|
|
|
|
|
|
size_t line_len = in_superchop (line_buf);
|
|
|
|
|
|
|
|
|
|
line_len = convert_from_hex (hashcat_ctx, line_buf, (u32) line_len);
|
|
|
|
|
|
|
|
|
|
// do the on-the-fly encoding
|
|
|
|
|
|
|
|
|
|
if (iconv_enabled == true)
|
|
|
|
|
{
|
|
|
|
|
char *iconv_ptr = iconv_tmp;
|
|
|
|
|
size_t iconv_sz = HCBUFSIZ_TINY;
|
|
|
|
|
|
|
|
|
|
const size_t iconv_rc = iconv (iconv_ctx, &line_buf, &line_len, &iconv_ptr, &iconv_sz);
|
|
|
|
|
|
|
|
|
|
if (iconv_rc == (size_t) -1) continue;
|
|
|
|
|
|
|
|
|
|
line_buf = iconv_tmp;
|
|
|
|
|
line_len = HCBUFSIZ_TINY - iconv_sz;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// post-process rule engine
|
|
|
|
|
|
|
|
|
|
char rule_buf_out[RP_PASSWORD_SIZE];
|
|
|
|
|
|
|
|
|
|
if (run_rule_engine ((int) user_options_extra->rule_len_l, user_options->rule_buf_l))
|
|
|
|
|
{
|
|
|
|
|
if (line_len >= RP_PASSWORD_SIZE) continue;
|
|
|
|
|
|
|
|
|
|
memset (rule_buf_out, 0, sizeof (rule_buf_out));
|
|
|
|
|
|
|
|
|
|
const int rule_len_out = _old_apply_rule (user_options->rule_buf_l, (int) user_options_extra->rule_len_l, line_buf, (int) line_len, rule_buf_out);
|
|
|
|
|
|
|
|
|
|
if (rule_len_out < 0) continue;
|
|
|
|
|
|
|
|
|
|
line_buf = rule_buf_out;
|
|
|
|
|
line_len = (size_t) rule_len_out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (line_len >= PW_MAX) continue;
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
// hmm that's always the case, or?
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt++;
|
|
|
|
|
|
|
|
|
|
const u32 attack_kern = user_options_extra->attack_kern;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (attack_kern == ATTACK_KERN_STRAIGHT)
|
|
|
|
|
{
|
|
|
|
|
if ((line_len < hashconfig->pw_min) || (line_len > hashconfig->pw_max))
|
|
|
|
|
{
|
|
|
|
|
words_extra_total++;
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt = 0;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
char *line_buf = fgets (buf, HCBUFSIZ_LARGE - 1, stdin);
|
|
|
|
|
|
|
|
|
|
pw_pre_add (device_param, (u8 *) line_buf, (int) line_len, NULL, 0, 0);
|
|
|
|
|
if (line_buf == NULL) break;
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
|
size_t line_len = in_superchop (line_buf);
|
|
|
|
|
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_dispatcher);
|
|
|
|
|
line_len = convert_from_hex (hashcat_ctx, line_buf, (u32) line_len);
|
|
|
|
|
|
|
|
|
|
u64 pre_rejects = 0;
|
|
|
|
|
// do the on-the-fly encoding
|
|
|
|
|
|
|
|
|
|
if (0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if (iconv_enabled == true)
|
|
|
|
|
{
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
char *iconv_ptr = iconv_tmp;
|
|
|
|
|
size_t iconv_sz = HCBUFSIZ_TINY;
|
|
|
|
|
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
const size_t iconv_rc = iconv (iconv_ctx, &line_buf, &line_len, &iconv_ptr, &iconv_sz);
|
|
|
|
|
|
|
|
|
|
pw_base_add (device_param, pw_pre);
|
|
|
|
|
if (iconv_rc == (size_t) -1) continue;
|
|
|
|
|
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
line_buf = iconv_tmp;
|
|
|
|
|
line_len = HCBUFSIZ_TINY - iconv_sz;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
words_extra_total += pre_rejects;
|
|
|
|
|
|
|
|
|
|
if (words_extra_total > 0)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_lock (status_ctx->mux_counter);
|
|
|
|
|
// post-process rule engine
|
|
|
|
|
|
|
|
|
|
for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
|
|
|
|
|
{
|
|
|
|
|
status_ctx->words_progress_rejected[salt_pos] += words_extra_total * straight_ctx->kernel_rules_cnt;
|
|
|
|
|
}
|
|
|
|
|
char rule_buf_out[RP_PASSWORD_SIZE];
|
|
|
|
|
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_counter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
if (device_param->pws_cnt)
|
|
|
|
|
if (run_rule_engine ((int) user_options_extra->rule_len_l, user_options->rule_buf_l))
|
|
|
|
|
{
|
|
|
|
|
// flush
|
|
|
|
|
|
|
|
|
|
int CL_rc;
|
|
|
|
|
|
|
|
|
|
CL_rc = run_copy (hashcat_ctx, device_param, device_param->pws_cnt);
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
hcfree (buf);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CL_rc = run_cracker (hashcat_ctx, device_param, device_param->pws_cnt);
|
|
|
|
|
if (line_len >= RP_PASSWORD_SIZE) continue;
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
hcfree (buf);
|
|
|
|
|
memset (rule_buf_out, 0, sizeof (rule_buf_out));
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
const int rule_len_out = _old_apply_rule (user_options->rule_buf_l, (int) user_options_extra->rule_len_l, line_buf, (int) line_len, rule_buf_out);
|
|
|
|
|
|
|
|
|
|
device_param->pws_cnt = 0;
|
|
|
|
|
if (rule_len_out < 0) continue;
|
|
|
|
|
|
|
|
|
|
device_param->pws_base_cnt = 0;
|
|
|
|
|
line_buf = rule_buf_out;
|
|
|
|
|
line_len = (size_t) rule_len_out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
if (device_param->speed_only_finish == true) break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
while (status_ctx->run_thread_level1 == true)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_lock (status_ctx->mux_dispatcher);
|
|
|
|
|
|
|
|
|
|
if (feof (stdin) != 0)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_dispatcher);
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (line_len >= PW_MAX) continue;
|
|
|
|
|
|
|
|
|
|
u64 words_extra_total = 0;
|
|
|
|
|
// hmm that's always the case, or?
|
|
|
|
|
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
const u32 attack_kern = user_options_extra->attack_kern;
|
|
|
|
|
|
|
|
|
|
while (device_param->pws_cnt < device_param->kernel_power)
|
|
|
|
|
if (attack_kern == ATTACK_KERN_STRAIGHT)
|
|
|
|
|
{
|
|
|
|
|
const int rc_select = select_read_timeout_console (1);
|
|
|
|
|
|
|
|
|
|
if (rc_select == -1) break;
|
|
|
|
|
|
|
|
|
|
if (rc_select == 0)
|
|
|
|
|
if ((line_len < hashconfig->pw_min) || (line_len > hashconfig->pw_max))
|
|
|
|
|
{
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt++;
|
|
|
|
|
words_extra_total++;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt = 0;
|
|
|
|
|
|
|
|
|
|
char *line_buf = fgets (buf, HCBUFSIZ_LARGE - 1, stdin);
|
|
|
|
|
|
|
|
|
|
if (line_buf == NULL) break;
|
|
|
|
|
|
|
|
|
|
size_t line_len = in_superchop (line_buf);
|
|
|
|
|
|
|
|
|
|
line_len = convert_from_hex (hashcat_ctx, line_buf, (u32) line_len);
|
|
|
|
|
|
|
|
|
|
// do the on-the-fly encoding
|
|
|
|
|
|
|
|
|
|
if (iconv_enabled == true)
|
|
|
|
|
{
|
|
|
|
|
char *iconv_ptr = iconv_tmp;
|
|
|
|
|
size_t iconv_sz = HCBUFSIZ_TINY;
|
|
|
|
|
|
|
|
|
|
const size_t iconv_rc = iconv (iconv_ctx, &line_buf, &line_len, &iconv_ptr, &iconv_sz);
|
|
|
|
|
|
|
|
|
|
if (iconv_rc == (size_t) -1) continue;
|
|
|
|
|
|
|
|
|
|
line_buf = iconv_tmp;
|
|
|
|
|
line_len = HCBUFSIZ_TINY - iconv_sz;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// post-process rule engine
|
|
|
|
|
|
|
|
|
|
char rule_buf_out[RP_PASSWORD_SIZE];
|
|
|
|
|
|
|
|
|
|
if (run_rule_engine ((int) user_options_extra->rule_len_l, user_options->rule_buf_l))
|
|
|
|
|
{
|
|
|
|
|
if (line_len >= RP_PASSWORD_SIZE) continue;
|
|
|
|
|
|
|
|
|
|
memset (rule_buf_out, 0, sizeof (rule_buf_out));
|
|
|
|
|
|
|
|
|
|
const int rule_len_out = _old_apply_rule (user_options->rule_buf_l, (int) user_options_extra->rule_len_l, line_buf, (int) line_len, rule_buf_out);
|
|
|
|
|
|
|
|
|
|
if (rule_len_out < 0) continue;
|
|
|
|
|
|
|
|
|
|
line_buf = rule_buf_out;
|
|
|
|
|
line_len = (size_t) rule_len_out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (line_len >= PW_MAX) continue;
|
|
|
|
|
|
|
|
|
|
// hmm that's always the case, or?
|
|
|
|
|
|
|
|
|
|
const u32 attack_kern = user_options_extra->attack_kern;
|
|
|
|
|
|
|
|
|
|
if (attack_kern == ATTACK_KERN_STRAIGHT)
|
|
|
|
|
{
|
|
|
|
|
if ((line_len < hashconfig->pw_min) || (line_len > hashconfig->pw_max))
|
|
|
|
|
{
|
|
|
|
|
words_extra_total++;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
pw_add (device_param, (const u8 *) line_buf, (const int) line_len);
|
|
|
|
|
|
|
|
|
|
pw_add (device_param, (const u8 *) line_buf, (const int) line_len);
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_dispatcher);
|
|
|
|
|
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_dispatcher);
|
|
|
|
|
if (words_extra_total > 0)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_lock (status_ctx->mux_counter);
|
|
|
|
|
|
|
|
|
|
if (words_extra_total > 0)
|
|
|
|
|
for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
|
|
|
|
|
{
|
|
|
|
|
hc_thread_mutex_lock (status_ctx->mux_counter);
|
|
|
|
|
|
|
|
|
|
for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
|
|
|
|
|
{
|
|
|
|
|
status_ctx->words_progress_rejected[salt_pos] += words_extra_total * straight_ctx->kernel_rules_cnt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_counter);
|
|
|
|
|
status_ctx->words_progress_rejected[salt_pos] += words_extra_total * straight_ctx->kernel_rules_cnt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
hc_thread_mutex_unlock (status_ctx->mux_counter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->pws_cnt == 0) break;
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
// flush
|
|
|
|
|
if (device_param->pws_cnt == 0) break;
|
|
|
|
|
|
|
|
|
|
int CL_rc;
|
|
|
|
|
// flush
|
|
|
|
|
|
|
|
|
|
CL_rc = run_copy (hashcat_ctx, device_param, device_param->pws_cnt);
|
|
|
|
|
int CL_rc;
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
hcfree (buf);
|
|
|
|
|
CL_rc = run_copy (hashcat_ctx, device_param, device_param->pws_cnt);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
hcfree (buf);
|
|
|
|
|
|
|
|
|
|
CL_rc = run_cracker (hashcat_ctx, device_param, device_param->pws_cnt);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
hcfree (buf);
|
|
|
|
|
CL_rc = run_cracker (hashcat_ctx, device_param, device_param->pws_cnt);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
hcfree (buf);
|
|
|
|
|
|
|
|
|
|
device_param->pws_cnt = 0;
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
device_param->pws_cnt = 0;
|
|
|
|
|
|
|
|
|
|
if (device_param->speed_only_finish == true) break;
|
|
|
|
|
}
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
if (device_param->speed_only_finish == true) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
device_param->kernel_accel_prev = device_param->kernel_accel;
|
|
|
|
@ -517,6 +362,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
|
|
|
|
straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
|
|
|
|
|
combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx;
|
|
|
|
|
opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
|
|
|
|
|
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
|
|
|
|
|
|
|
|
|
|
const u32 attack_mode = user_options->attack_mode;
|
|
|
|
@ -526,13 +372,43 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
{
|
|
|
|
|
// attack modes from here
|
|
|
|
|
|
|
|
|
|
if (attack_mode == ATTACK_MODE_BF)
|
|
|
|
|
if (attack_mode == ATTACK_MODE_STRAIGHT)
|
|
|
|
|
{
|
|
|
|
|
extra_info_mask_t extra_info_mask;
|
|
|
|
|
char *dictfile = straight_ctx->dict;
|
|
|
|
|
|
|
|
|
|
memset (&extra_info_mask, 0, sizeof (extra_info_mask));
|
|
|
|
|
FILE *fp = fopen (dictfile, "rb");
|
|
|
|
|
|
|
|
|
|
extra_info_mask.out_len = mask_ctx->css_cnt;
|
|
|
|
|
if (fp == NULL)
|
|
|
|
|
{
|
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extra_info_straight_t extra_info_straight;
|
|
|
|
|
|
|
|
|
|
memset (&extra_info_straight, 0, sizeof (extra_info_straight));
|
|
|
|
|
|
|
|
|
|
extra_info_straight.fp = fp;
|
|
|
|
|
|
|
|
|
|
hashcat_ctx_t *hashcat_ctx_tmp = (hashcat_ctx_t *) hcmalloc (sizeof (hashcat_ctx_t));
|
|
|
|
|
|
|
|
|
|
memcpy (hashcat_ctx_tmp, hashcat_ctx, sizeof (hashcat_ctx_t)); // yes we actually want to copy these pointers
|
|
|
|
|
|
|
|
|
|
hashcat_ctx_tmp->wl_data = (wl_data_t *) hcmalloc (sizeof (wl_data_t));
|
|
|
|
|
|
|
|
|
|
const int rc_wl_data_init = wl_data_init (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u64 words_cur = 0;
|
|
|
|
|
|
|
|
|
@ -540,12 +416,17 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
{
|
|
|
|
|
u64 words_fin = 0;
|
|
|
|
|
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
memset (device_param->pws_base_buf, 0, device_param->size_pws_base);
|
|
|
|
|
|
|
|
|
|
u64 pre_rejects = -1;
|
|
|
|
|
|
|
|
|
|
// this greatly reduces spam on hashcat console
|
|
|
|
|
|
|
|
|
|
u64 pre_rejects = -1u;
|
|
|
|
|
const u64 pre_rejects_ignore = get_power (opencl_ctx, device_param) / 2;
|
|
|
|
|
|
|
|
|
|
while (pre_rejects)
|
|
|
|
|
while (pre_rejects > pre_rejects_ignore)
|
|
|
|
|
{
|
|
|
|
|
u64 words_extra_total = 0;
|
|
|
|
|
|
|
|
|
@ -559,25 +440,34 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
while (words_extra)
|
|
|
|
|
{
|
|
|
|
|
const u64 work = get_work (hashcat_ctx, device_param, words_extra);
|
|
|
|
|
u64 work = get_work (hashcat_ctx, device_param, words_extra);
|
|
|
|
|
|
|
|
|
|
if (work == 0) break;
|
|
|
|
|
|
|
|
|
|
words_extra = 0;
|
|
|
|
|
|
|
|
|
|
u64 words_off = device_param->words_off;
|
|
|
|
|
|
|
|
|
|
words_fin = words_off + work;
|
|
|
|
|
|
|
|
|
|
words_extra = 0;
|
|
|
|
|
|
|
|
|
|
slow_candidates_seek (hashcat_ctx_tmp, &extra_info_straight, words_cur, words_off);
|
|
|
|
|
|
|
|
|
|
words_cur = words_off;
|
|
|
|
|
|
|
|
|
|
for (u64 i = words_cur; i < words_fin; i++)
|
|
|
|
|
{
|
|
|
|
|
extra_info_mask.pos = i;
|
|
|
|
|
extra_info_straight.pos = i;
|
|
|
|
|
|
|
|
|
|
slow_candidates_next (hashcat_ctx, &extra_info_mask);
|
|
|
|
|
slow_candidates_next (hashcat_ctx_tmp, &extra_info_straight);
|
|
|
|
|
|
|
|
|
|
pw_pre_add (device_param, extra_info_mask.out_buf, extra_info_mask.out_len, NULL, 0, 0);
|
|
|
|
|
if ((extra_info_straight.out_len < hashconfig->pw_min) || (extra_info_straight.out_len > hashconfig->pw_max))
|
|
|
|
|
{
|
|
|
|
|
pre_rejects++;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pw_pre_add (device_param, extra_info_straight.out_buf, extra_info_straight.out_len, extra_info_straight.base_buf, extra_info_straight.base_len, extra_info_straight.rule_pos_prev);
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
@ -589,19 +479,15 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
pw_base_add (device_param, pw_pre);
|
|
|
|
|
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
words_extra_total += pre_rejects;
|
|
|
|
@ -635,6 +521,12 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -642,25 +534,41 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
device_param->pws_cnt = 0;
|
|
|
|
|
|
|
|
|
|
device_param->pws_base_cnt = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->speed_only_finish == true) break;
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level2 == true)
|
|
|
|
|
{
|
|
|
|
|
device_param->words_done = words_fin;
|
|
|
|
|
device_param->words_done = MAX (device_param->words_done, words_fin);
|
|
|
|
|
|
|
|
|
|
status_ctx->words_cur = get_lowest_words_done (hashcat_ctx);
|
|
|
|
|
status_ctx->words_cur = get_highest_words_done (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
}
|
|
|
|
|
else if (attack_mode == ATTACK_MODE_COMBI)
|
|
|
|
|
{
|
|
|
|
@ -737,9 +645,13 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
memset (device_param->pws_base_buf, 0, device_param->size_pws_base);
|
|
|
|
|
|
|
|
|
|
u64 pre_rejects = -1u;
|
|
|
|
|
u64 pre_rejects = -1;
|
|
|
|
|
|
|
|
|
|
// this greatly reduces spam on hashcat console
|
|
|
|
|
|
|
|
|
|
while (pre_rejects)
|
|
|
|
|
const u64 pre_rejects_ignore = get_power (opencl_ctx, device_param) / 2;
|
|
|
|
|
|
|
|
|
|
while (pre_rejects > pre_rejects_ignore)
|
|
|
|
|
{
|
|
|
|
|
u64 words_extra_total = 0;
|
|
|
|
|
|
|
|
|
@ -753,7 +665,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
while (words_extra)
|
|
|
|
|
{
|
|
|
|
|
const u64 work = get_work (hashcat_ctx, device_param, words_extra);
|
|
|
|
|
u64 work = get_work (hashcat_ctx, device_param, words_extra);
|
|
|
|
|
|
|
|
|
|
if (work == 0) break;
|
|
|
|
|
|
|
|
|
@ -769,11 +681,13 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
for (u64 i = words_cur; i < words_fin; i++)
|
|
|
|
|
{
|
|
|
|
|
extra_info_combi.pos = i;
|
|
|
|
|
|
|
|
|
|
slow_candidates_next (hashcat_ctx_tmp, &extra_info_combi);
|
|
|
|
|
|
|
|
|
|
if ((extra_info_combi.out_len < hashconfig->pw_min) || (extra_info_combi.out_len > hashconfig->pw_max))
|
|
|
|
|
{
|
|
|
|
|
words_extra++;
|
|
|
|
|
pre_rejects++;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@ -790,21 +704,15 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
|
|
|
|
|
pw_base_add (device_param, pw_pre);
|
|
|
|
|
pw_base_add (device_param, pw_pre);
|
|
|
|
|
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
words_extra_total += pre_rejects;
|
|
|
|
@ -873,9 +781,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level2 == true)
|
|
|
|
|
{
|
|
|
|
|
device_param->words_done = words_fin;
|
|
|
|
|
device_param->words_done = MAX (device_param->words_done, words_fin);
|
|
|
|
|
|
|
|
|
|
status_ctx->words_cur = get_lowest_words_done (hashcat_ctx);
|
|
|
|
|
status_ctx->words_cur = get_highest_words_done (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
@ -893,43 +801,13 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
}
|
|
|
|
|
else if (attack_mode == ATTACK_MODE_STRAIGHT)
|
|
|
|
|
else if (attack_mode == ATTACK_MODE_BF)
|
|
|
|
|
{
|
|
|
|
|
char *dictfile = straight_ctx->dict;
|
|
|
|
|
|
|
|
|
|
FILE *fp = fopen (dictfile, "rb");
|
|
|
|
|
|
|
|
|
|
if (fp == NULL)
|
|
|
|
|
{
|
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extra_info_straight_t extra_info_straight;
|
|
|
|
|
|
|
|
|
|
memset (&extra_info_straight, 0, sizeof (extra_info_straight));
|
|
|
|
|
|
|
|
|
|
extra_info_straight.fp = fp;
|
|
|
|
|
|
|
|
|
|
hashcat_ctx_t *hashcat_ctx_tmp = (hashcat_ctx_t *) hcmalloc (sizeof (hashcat_ctx_t));
|
|
|
|
|
|
|
|
|
|
memcpy (hashcat_ctx_tmp, hashcat_ctx, sizeof (hashcat_ctx_t)); // yes we actually want to copy these pointers
|
|
|
|
|
|
|
|
|
|
hashcat_ctx_tmp->wl_data = (wl_data_t *) hcmalloc (sizeof (wl_data_t));
|
|
|
|
|
|
|
|
|
|
const int rc_wl_data_init = wl_data_init (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
extra_info_mask_t extra_info_mask;
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
memset (&extra_info_mask, 0, sizeof (extra_info_mask));
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
extra_info_mask.out_len = mask_ctx->css_cnt;
|
|
|
|
|
|
|
|
|
|
u64 words_cur = 0;
|
|
|
|
|
|
|
|
|
@ -937,13 +815,16 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
{
|
|
|
|
|
u64 words_fin = 0;
|
|
|
|
|
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
memset (device_param->pws_base_buf, 0, device_param->size_pws_base);
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
|
|
|
|
|
u64 pre_rejects = -1;
|
|
|
|
|
|
|
|
|
|
// this greatly reduces spam on hashcat console
|
|
|
|
|
|
|
|
|
|
u64 pre_rejects = -1u;
|
|
|
|
|
const u64 pre_rejects_ignore = get_power (opencl_ctx, device_param) / 2;
|
|
|
|
|
|
|
|
|
|
while (pre_rejects)
|
|
|
|
|
while (pre_rejects > pre_rejects_ignore)
|
|
|
|
|
{
|
|
|
|
|
u64 words_extra_total = 0;
|
|
|
|
|
|
|
|
|
@ -957,7 +838,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
while (words_extra)
|
|
|
|
|
{
|
|
|
|
|
const u64 work = get_work (hashcat_ctx, device_param, words_extra);
|
|
|
|
|
u64 work = get_work (hashcat_ctx, device_param, words_extra);
|
|
|
|
|
|
|
|
|
|
if (work == 0) break;
|
|
|
|
|
|
|
|
|
@ -967,22 +848,15 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
words_fin = words_off + work;
|
|
|
|
|
|
|
|
|
|
slow_candidates_seek (hashcat_ctx_tmp, &extra_info_straight, words_cur, words_off);
|
|
|
|
|
|
|
|
|
|
words_cur = words_off;
|
|
|
|
|
|
|
|
|
|
for (u64 i = words_cur; i < words_fin; i++)
|
|
|
|
|
{
|
|
|
|
|
slow_candidates_next (hashcat_ctx_tmp, &extra_info_straight);
|
|
|
|
|
|
|
|
|
|
if ((extra_info_straight.out_len < hashconfig->pw_min) || (extra_info_straight.out_len > hashconfig->pw_max))
|
|
|
|
|
{
|
|
|
|
|
words_extra++;
|
|
|
|
|
extra_info_mask.pos = i;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
slow_candidates_next (hashcat_ctx, &extra_info_mask);
|
|
|
|
|
|
|
|
|
|
pw_pre_add (device_param, extra_info_straight.out_buf, extra_info_straight.out_len, extra_info_straight.base_buf, extra_info_straight.base_len, extra_info_straight.rule_pos_prev);
|
|
|
|
|
pw_pre_add (device_param, extra_info_mask.out_buf, extra_info_mask.out_len, NULL, 0, 0);
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
@ -994,21 +868,13 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
u64 pws_pre_cnt = device_param->pws_pre_cnt;
|
|
|
|
|
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
|
|
|
|
|
pw_base_add (device_param, pw_pre);
|
|
|
|
|
for (u64 pws_pre_idx = 0; pws_pre_idx < pws_pre_cnt; pws_pre_idx++)
|
|
|
|
|
{
|
|
|
|
|
pw_pre_t *pw_pre = device_param->pws_pre_buf + pws_pre_idx;
|
|
|
|
|
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
pw_add (device_param, (const u8 *) pw_pre->pw_buf, (const int) pw_pre->pw_len);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
words_extra_total += pre_rejects;
|
|
|
|
@ -1042,12 +908,6 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1055,41 +915,25 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
|
{
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
device_param->pws_cnt = 0;
|
|
|
|
|
|
|
|
|
|
device_param->pws_base_cnt = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->speed_only_finish == true) break;
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level2 == true)
|
|
|
|
|
{
|
|
|
|
|
device_param->words_done = words_fin;
|
|
|
|
|
device_param->words_done = MAX (device_param->words_done, words_fin);
|
|
|
|
|
|
|
|
|
|
status_ctx->words_cur = get_lowest_words_done (hashcat_ctx);
|
|
|
|
|
status_ctx->words_cur = get_highest_words_done (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fclose (fp);
|
|
|
|
|
|
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -1139,7 +983,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level2 == true)
|
|
|
|
|
{
|
|
|
|
|
device_param->words_done = words_fin;
|
|
|
|
|
device_param->words_done = MAX (device_param->words_done, words_fin);
|
|
|
|
|
|
|
|
|
|
status_ctx->words_cur = get_lowest_words_done (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
@ -1406,7 +1250,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
if (status_ctx->run_thread_level2 == true)
|
|
|
|
|
{
|
|
|
|
|
device_param->words_done = words_fin;
|
|
|
|
|
device_param->words_done = MAX (device_param->words_done, words_fin);
|
|
|
|
|
|
|
|
|
|
status_ctx->words_cur = get_lowest_words_done (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
|