1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-29 19:38:18 +00:00

Fix missing stuff

This commit is contained in:
Rosen Penev 2017-11-10 20:54:48 -08:00
parent 1109017a53
commit 6b0ee145c4
3 changed files with 49 additions and 27 deletions

View File

@ -43,8 +43,6 @@ static void sysfs_close (hashcat_ctx_t *hashcat_ctx)
{
hcfree (sysfs);
}
return;
}
static char *hm_SYSFS_get_syspath_device (hashcat_ctx_t *hashcat_ctx, const int device_id)

View File

@ -389,7 +389,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
}
}
}
else if (user_options->attack_mode == ATTACK_MODE_COMBI)
if (user_options->attack_mode == ATTACK_MODE_COMBI)
{
if (has_base_left == true)
{
@ -400,7 +401,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
return GUESS_MODE_COMBINATOR_BASE_RIGHT;
}
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
if (user_options->attack_mode == ATTACK_MODE_BF)
{
if (has_mask_cs == true)
{
@ -411,7 +413,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
return GUESS_MODE_MASK;
}
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
{
if (has_mask_cs == true)
{
@ -422,7 +425,8 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx)
return GUESS_MODE_HYBRID1;
}
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
if (has_mask_cs == true)
{
@ -452,7 +456,8 @@ char *status_get_guess_base (const hashcat_ctx_t *hashcat_ctx)
return strdup (straight_ctx->dict);
}
}
else if (user_options->attack_mode == ATTACK_MODE_COMBI)
if (user_options->attack_mode == ATTACK_MODE_COMBI)
{
const combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx;
@ -465,19 +470,22 @@ char *status_get_guess_base (const hashcat_ctx_t *hashcat_ctx)
return strdup (combinator_ctx->dict2);
}
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
if (user_options->attack_mode == ATTACK_MODE_BF)
{
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
return strdup (mask_ctx->mask);
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
{
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
return strdup (straight_ctx->dict);
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
{
@ -507,23 +515,27 @@ int status_get_guess_base_offset (const hashcat_ctx_t *hashcat_ctx)
return straight_ctx->dicts_pos + 1;
}
else if (user_options->attack_mode == ATTACK_MODE_COMBI)
if (user_options->attack_mode == ATTACK_MODE_COMBI)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
if (user_options->attack_mode == ATTACK_MODE_BF)
{
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
return mask_ctx->masks_pos + 1;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
{
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
return straight_ctx->dicts_pos + 1;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
{
@ -553,23 +565,27 @@ int status_get_guess_base_count (const hashcat_ctx_t *hashcat_ctx)
return straight_ctx->dicts_cnt;
}
else if (user_options->attack_mode == ATTACK_MODE_COMBI)
if (user_options->attack_mode == ATTACK_MODE_COMBI)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
if (user_options->attack_mode == ATTACK_MODE_BF)
{
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
return mask_ctx->masks_cnt;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
{
const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
return straight_ctx->dicts_cnt;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
{
@ -662,21 +678,25 @@ int status_get_guess_mod_offset (const hashcat_ctx_t *hashcat_ctx)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_COMBI)
if (user_options->attack_mode == ATTACK_MODE_COMBI)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
if (user_options->attack_mode == ATTACK_MODE_BF)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
{
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
return mask_ctx->masks_pos + 1;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
{
@ -704,21 +724,25 @@ int status_get_guess_mod_count (const hashcat_ctx_t *hashcat_ctx)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_COMBI)
if (user_options->attack_mode == ATTACK_MODE_COMBI)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
if (user_options->attack_mode == ATTACK_MODE_BF)
{
return 1;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
{
const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
return mask_ctx->masks_cnt;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
{

View File

@ -193,7 +193,7 @@ int tuning_db_init (hashcat_ctx_t *hashcat_ctx)
}
else
{
kernel_accel = atoi (token_ptr[4]);
kernel_accel = strtol (token_ptr[4], NULL, 10);
if ((kernel_accel < 1) || (kernel_accel > 1024))
{