1
mirror of https://github.com/hashcat/hashcat synced 2024-12-27 05:13:45 +01:00

Test fix for plain_t in 32 bit mode

This commit is contained in:
Jens Steube 2018-10-20 09:46:24 +02:00
parent 6d03da369b
commit a4ac370496
6 changed files with 25 additions and 12 deletions

View File

@ -2009,13 +2009,13 @@ typedef struct bs_word
} bs_word_t;
typedef struct
typedef struct plain
{
u32 salt_pos;
u32 digest_pos;
u32 hash_pos;
u64 gidvid;
u32 il_pos;
u64 gidvid;
u32 il_pos;
u32 salt_pos;
u32 digest_pos;
u32 hash_pos;
} plain_t;

View File

@ -942,11 +942,11 @@ typedef struct cpt
typedef struct plain
{
u64 gidvid;
u32 il_pos;
u32 salt_pos;
u32 digest_pos;
u32 hash_pos;
u64 gidvid;
u32 il_pos;
} plain_t;

View File

@ -4,7 +4,7 @@
##
SHARED := 0
DEBUG := 0
DEBUG := 1
PRODUCTION := 0
PRODUCTION_VERSION := v4.2.1
@ -44,7 +44,7 @@ endif
## Native compiler paths
##
CC := gcc
CC := gcc -m32
FIND := find
INSTALL := install
RM := rm

View File

@ -366,6 +366,8 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
if (num_cracked)
{
printf ("%d\n", num_cracked);
plain_t *cracked = (plain_t *) hccalloc (num_cracked, sizeof (plain_t));
CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->command_queue, device_param->d_plain_bufs, CL_TRUE, 0, num_cracked * sizeof (plain_t), cracked, 0, NULL, NULL);
@ -377,6 +379,14 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
return -1;
}
u8 *ptr = (u8 *) cracked;
for (int i = 0; i < sizeof (plain_t); i++)
{
printf ("%d %02x\n", i, ptr[i]);
}
u32 cpt_cracked = 0;
hc_thread_mutex_lock (status_ctx->mux_display);

View File

@ -31,6 +31,9 @@ int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
const u64 gidvid = plain->gidvid;
const u32 il_pos = plain->il_pos;
printf ("%" PRIu64 "\n", gidvid);
printf ("%" PRIu32 "\n", il_pos);
int plain_len = 0;
u8 *plain_ptr = (u8 *) plain_buf;

View File

@ -874,8 +874,8 @@ char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const i
const u32 innerloop_first = 0;
const u32 innerloop_last = device_param->innerloop_left - 1;
plain_t plain1 = { 0, 0, 0, outerloop_first, innerloop_first };
plain_t plain2 = { 0, 0, 0, outerloop_last, innerloop_last };
plain_t plain1 = { outerloop_first, innerloop_first, 0, 0, 0 };
plain_t plain2 = { outerloop_last, innerloop_last, 0, 0, 0 };
u32 plain_buf1[(64 * 2) + 2] = { 0 };
u32 plain_buf2[(64 * 2) + 2] = { 0 };