1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-23 08:38:09 +00:00

Fix --stdout and --keyspace

This commit is contained in:
jsteube 2016-10-20 22:30:00 +02:00
parent 574acfab6a
commit 8ecabcb9ac
3 changed files with 21 additions and 20 deletions

View File

@ -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++)
{

View File

@ -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)

View File

@ -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;