|
|
@ -427,9 +427,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *dictfile = straight_ctx->dict;
|
|
|
|
char *dictfile = straight_ctx->dict;
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t fp_t;
|
|
|
|
HCFILE fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&fp_t, dictfile, "rb") == false)
|
|
|
|
if (hc_fopen (&fp, dictfile, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
@ -440,7 +440,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
memset (&extra_info_straight, 0, sizeof (extra_info_straight));
|
|
|
|
memset (&extra_info_straight, 0, sizeof (extra_info_straight));
|
|
|
|
|
|
|
|
|
|
|
|
extra_info_straight.fp_t = &fp_t;
|
|
|
|
extra_info_straight.fp = &fp;
|
|
|
|
|
|
|
|
|
|
|
|
hashcat_ctx_t *hashcat_ctx_tmp = (hashcat_ctx_t *) hcmalloc (sizeof (hashcat_ctx_t));
|
|
|
|
hashcat_ctx_t *hashcat_ctx_tmp = (hashcat_ctx_t *) hcmalloc (sizeof (hashcat_ctx_t));
|
|
|
|
|
|
|
|
|
|
|
@ -452,7 +452,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -663,7 +663,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
if (CL_rc == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -676,7 +676,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
if (CL_rc == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -721,7 +721,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
|
@ -747,18 +747,18 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
combs_file = combinator_ctx->dict1;
|
|
|
|
combs_file = combinator_ctx->dict1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t base_fp_t;
|
|
|
|
HCFILE base_fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&base_fp_t, base_file, "rb") == false)
|
|
|
|
if (hc_fopen (&base_fp, base_file, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", base_file, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", base_file, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t combs_fp_t;
|
|
|
|
HCFILE combs_fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&combs_fp_t, combs_file, "rb") == false)
|
|
|
|
if (hc_fopen (&combs_fp, combs_file, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", combs_file, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", combs_file, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
@ -769,8 +769,8 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
memset (&extra_info_combi, 0, sizeof (extra_info_combi));
|
|
|
|
memset (&extra_info_combi, 0, sizeof (extra_info_combi));
|
|
|
|
|
|
|
|
|
|
|
|
extra_info_combi.base_fp_t = &base_fp_t;
|
|
|
|
extra_info_combi.base_fp = &base_fp;
|
|
|
|
extra_info_combi.combs_fp_t = &combs_fp_t;
|
|
|
|
extra_info_combi.combs_fp = &combs_fp;
|
|
|
|
extra_info_combi.scratch_buf = device_param->scratch_buf;
|
|
|
|
extra_info_combi.scratch_buf = device_param->scratch_buf;
|
|
|
|
|
|
|
|
|
|
|
|
hashcat_ctx_t *hashcat_ctx_tmp = (hashcat_ctx_t *) hcmalloc (sizeof (hashcat_ctx_t));
|
|
|
|
hashcat_ctx_t *hashcat_ctx_tmp = (hashcat_ctx_t *) hcmalloc (sizeof (hashcat_ctx_t));
|
|
|
@ -783,9 +783,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hc_fclose (&combs_fp_t);
|
|
|
|
hc_fclose (&combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&base_fp_t);
|
|
|
|
hc_fclose (&base_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -996,9 +996,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
if (CL_rc == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hc_fclose (&combs_fp_t);
|
|
|
|
hc_fclose (&combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&base_fp_t);
|
|
|
|
hc_fclose (&base_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -1011,9 +1011,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
if (CL_rc == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hc_fclose (&combs_fp_t);
|
|
|
|
hc_fclose (&combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&base_fp_t);
|
|
|
|
hc_fclose (&base_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -1058,9 +1058,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&combs_fp_t);
|
|
|
|
hc_fclose (&combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&base_fp_t);
|
|
|
|
hc_fclose (&base_fp);
|
|
|
|
|
|
|
|
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
|
@ -1322,16 +1322,16 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *dictfile = straight_ctx->dict;
|
|
|
|
char *dictfile = straight_ctx->dict;
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t combs_fp_t;
|
|
|
|
HCFILE combs_fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&combs_fp_t, dictfile, "rb") == false)
|
|
|
|
if (hc_fopen (&combs_fp, dictfile, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
device_param->combs_fp_t = &combs_fp_t;
|
|
|
|
device_param->combs_fp = &combs_fp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
while (status_ctx->run_thread_level1 == true)
|
|
|
|
while (status_ctx->run_thread_level1 == true)
|
|
|
@ -1388,37 +1388,37 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const char *dictfilec = combinator_ctx->dict2;
|
|
|
|
const char *dictfilec = combinator_ctx->dict2;
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t combs_fp_t;
|
|
|
|
HCFILE combs_fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&combs_fp_t, dictfilec, "rb") == false)
|
|
|
|
if (hc_fopen (&combs_fp, dictfilec, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", combinator_ctx->dict2, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", combinator_ctx->dict2, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
device_param->combs_fp_t = &combs_fp_t;
|
|
|
|
device_param->combs_fp = &combs_fp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
|
|
|
|
else if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const char *dictfilec = combinator_ctx->dict1;
|
|
|
|
const char *dictfilec = combinator_ctx->dict1;
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t combs_fp_t;
|
|
|
|
HCFILE combs_fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&combs_fp_t, dictfilec, "rb") == false)
|
|
|
|
if (hc_fopen (&combs_fp, dictfilec, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfilec, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfilec, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
device_param->combs_fp_t = &combs_fp_t;
|
|
|
|
device_param->combs_fp = &combs_fp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fp_tmp_t fp_t;
|
|
|
|
HCFILE fp;
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_fopen (&fp_t, dictfile, "rb") == false)
|
|
|
|
if (hc_fopen (&fp, dictfile, "rb") == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno));
|
|
|
|
|
|
|
|
|
|
|
@ -1435,9 +1435,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
if (rc_wl_data_init == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp_t);
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -1476,11 +1476,11 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
char rule_buf_out[RP_PASSWORD_SIZE];
|
|
|
|
char rule_buf_out[RP_PASSWORD_SIZE];
|
|
|
|
|
|
|
|
|
|
|
|
for ( ; words_cur < words_off; words_cur++) get_next_word (hashcat_ctx_tmp, &fp_t, &line_buf, &line_len);
|
|
|
|
for ( ; words_cur < words_off; words_cur++) get_next_word (hashcat_ctx_tmp, &fp, &line_buf, &line_len);
|
|
|
|
|
|
|
|
|
|
|
|
for ( ; words_cur < words_fin; words_cur++)
|
|
|
|
for ( ; words_cur < words_fin; words_cur++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get_next_word (hashcat_ctx_tmp, &fp_t, &line_buf, &line_len);
|
|
|
|
get_next_word (hashcat_ctx_tmp, &fp, &line_buf, &line_len);
|
|
|
|
|
|
|
|
|
|
|
|
line_len = (u32) convert_from_hex (hashcat_ctx, line_buf, line_len);
|
|
|
|
line_len = (u32) convert_from_hex (hashcat_ctx, line_buf, line_len);
|
|
|
|
|
|
|
|
|
|
|
@ -1567,9 +1567,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
if (CL_rc == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp_t);
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -1582,9 +1582,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1)
|
|
|
|
if (CL_rc == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp_t);
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
hcfree (hashcat_ctx_tmp->wl_data);
|
|
|
|
|
|
|
|
|
|
|
@ -1638,9 +1638,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
if (words_fin == 0) break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp_t);
|
|
|
|
if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (device_param->combs_fp);
|
|
|
|
|
|
|
|
|
|
|
|
hc_fclose (&fp_t);
|
|
|
|
hc_fclose (&fp);
|
|
|
|
|
|
|
|
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
wl_data_destroy (hashcat_ctx_tmp);
|
|
|
|
|
|
|
|
|
|
|
|