|
|
|
@ -327,14 +327,12 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return tmp_buf2;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE)
|
|
|
|
|
{
|
|
|
|
|
return hcstrdup (hashes->hashfile);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
char *tmp_buf = (char *) hcmalloc (HCBUFSIZ_LARGE);
|
|
|
|
|
|
|
|
|
|
const int tmp_len = hash_encode (hashcat_ctx->hashconfig, hashcat_ctx->hashes, hashcat_ctx->module_ctx, tmp_buf, HCBUFSIZ_LARGE, 0, 0);
|
|
|
|
@ -349,12 +347,8 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return tmp_buf2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return hcstrdup (hashes->hashfile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
@ -389,31 +383,22 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_STRAIGHT_FILE_RULES_FILE;
|
|
|
|
|
}
|
|
|
|
|
else if (has_rule_gen == true)
|
|
|
|
|
if (has_rule_gen == true)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_STRAIGHT_FILE_RULES_GEN;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_STRAIGHT_FILE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (has_rule_file == true)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_STRAIGHT_STDIN_RULES_FILE;
|
|
|
|
|
}
|
|
|
|
|
else if (has_rule_gen == true)
|
|
|
|
|
if (has_rule_gen == true)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_STRAIGHT_STDIN_RULES_GEN;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_STRAIGHT_STDIN;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->attack_mode == ATTACK_MODE_COMBI)
|
|
|
|
|
{
|
|
|
|
@ -421,11 +406,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_COMBINATOR_BASE_LEFT;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_COMBINATOR_BASE_RIGHT;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->attack_mode == ATTACK_MODE_BF)
|
|
|
|
|
{
|
|
|
|
@ -433,11 +415,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_MASK_CS;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_MASK;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
|
|
|
|
|
{
|
|
|
|
@ -445,11 +424,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_HYBRID1_CS;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_HYBRID1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
|
|
|
|
|
{
|
|
|
|
@ -457,11 +433,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_HYBRID2_CS;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return GUESS_MODE_HYBRID2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return GUESS_MODE_NONE;
|
|
|
|
|
}
|
|
|
|
@ -490,11 +463,8 @@ char *status_get_guess_base (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return strdup (combinator_ctx->dict1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return strdup (combinator_ctx->dict2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->attack_mode == ATTACK_MODE_BF)
|
|
|
|
|
{
|
|
|
|
@ -518,14 +488,11 @@ char *status_get_guess_base (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return strdup (mask_ctx->mask);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
|
|
|
|
|
|
|
|
|
|
return strdup (straight_ctx->dict);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -568,13 +535,11 @@ int status_get_guess_base_offset (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return mask_ctx->masks_pos + 1;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
|
|
|
|
|
|
|
|
|
|
return straight_ctx->dicts_pos + 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -618,13 +583,11 @@ int status_get_guess_base_count (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return mask_ctx->masks_cnt;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
|
|
|
|
|
|
|
|
|
|
return straight_ctx->dicts_cnt;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -657,11 +620,8 @@ char *status_get_guess_mod (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return strdup (combinator_ctx->dict2);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return strdup (combinator_ctx->dict1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user_options->attack_mode == ATTACK_MODE_BF)
|
|
|
|
|
{
|
|
|
|
@ -683,13 +643,11 @@ char *status_get_guess_mod (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return strdup (straight_ctx->dict);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
|
|
|
|
|
|
|
|
|
return strdup (mask_ctx->mask);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
@ -729,13 +687,11 @@ int status_get_guess_mod_offset (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return straight_ctx->dicts_pos + 1;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
|
|
|
|
|
|
|
|
|
return mask_ctx->masks_pos + 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -775,13 +731,11 @@ int status_get_guess_mod_count (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
return straight_ctx->dicts_cnt;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
|
|
|
|
|
|
|
|
|
|
return mask_ctx->masks_cnt;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -1196,10 +1150,7 @@ int status_get_progress_mode (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
return PROGRESS_MODE_KEYSPACE_KNOWN;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return PROGRESS_MODE_KEYSPACE_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
double status_get_progress_finished_percent (const hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|