Fix --stdout and --keyspace

pull/544/head
jsteube 8 years ago
parent 574acfab6a
commit 8ecabcb9ac

@ -128,7 +128,9 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
// words base
status_ctx->words_base = status_ctx->words_cnt / user_options_extra_amplifier (hashcat_ctx);
const u64 amplifier_cnt = user_options_extra_amplifier (hashcat_ctx);
status_ctx->words_base = status_ctx->words_cnt / amplifier_cnt;
EVENT (EVENT_CALCULATED_WORDS_BASE);
@ -143,7 +145,7 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
return -1;
}
const u64 progress_restored = status_ctx->words_off * user_options_extra_amplifier (hashcat_ctx);
const u64 progress_restored = status_ctx->words_off * amplifier_cnt;
for (u32 i = 0; i < hashes->salts_cnt; i++)
{

@ -1110,23 +1110,6 @@ void user_options_extra_init (hashcat_ctx_t *hashcat_ctx)
user_options_extra->rule_len_l = (int) strlen (user_options->rule_buf_l);
user_options_extra->rule_len_r = (int) strlen (user_options->rule_buf_r);
// wordlist_mode
user_options_extra->wordlist_mode = WL_MODE_NONE;
if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT)
{
user_options_extra->wordlist_mode = (user_options->hc_argc >= 2) ? WL_MODE_FILE : WL_MODE_STDIN;
}
else if (user_options_extra->attack_kern == ATTACK_KERN_COMBI)
{
user_options_extra->wordlist_mode = WL_MODE_FILE;
}
else if (user_options_extra->attack_kern == ATTACK_KERN_BF)
{
user_options_extra->wordlist_mode = WL_MODE_MASK;
}
// hc_hash and hc_work*
user_options_extra->hc_hash = NULL;
@ -1157,6 +1140,23 @@ void user_options_extra_init (hashcat_ctx_t *hashcat_ctx)
user_options_extra->hc_workc = user_options->hc_argc - 1;
user_options_extra->hc_workv = user_options->hc_argv + 1;
}
// wordlist_mode
user_options_extra->wordlist_mode = WL_MODE_NONE;
if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT)
{
user_options_extra->wordlist_mode = (user_options_extra->hc_workc >= 1) ? WL_MODE_FILE : WL_MODE_STDIN;
}
else if (user_options_extra->attack_kern == ATTACK_KERN_COMBI)
{
user_options_extra->wordlist_mode = WL_MODE_FILE;
}
else if (user_options_extra->attack_kern == ATTACK_KERN_BF)
{
user_options_extra->wordlist_mode = WL_MODE_MASK;
}
}
void user_options_extra_destroy (hashcat_ctx_t *hashcat_ctx)

@ -423,7 +423,6 @@ int wl_data_init (hashcat_ctx_t *hashcat_ctx)
wl_data->enabled = false;
if (user_options->benchmark == true) return 0;
if (user_options->keyspace == true) return 0;
if (user_options->left == true) return 0;
if (user_options->opencl_info == true) return 0;
if (user_options->usage == true) return 0;

Loading…
Cancel
Save