diff --git a/OpenCL/inc_types.cl b/OpenCL/inc_types.cl index c23e27d28..b3d9e0d0a 100644 --- a/OpenCL/inc_types.cl +++ b/OpenCL/inc_types.cl @@ -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; diff --git a/include/types.h b/include/types.h index 1467bdc63..c10ed9b90 100644 --- a/include/types.h +++ b/include/types.h @@ -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; diff --git a/src/Makefile b/src/Makefile index da9b469ed..47f9a79fa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/hashes.c b/src/hashes.c index 6ec376dea..f850d4443 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -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); diff --git a/src/outfile.c b/src/outfile.c index db3c1f5a4..b828b8f94 100644 --- a/src/outfile.c +++ b/src/outfile.c @@ -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; diff --git a/src/status.c b/src/status.c index 2f4f19719..1a7493ea5 100644 --- a/src/status.c +++ b/src/status.c @@ -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 };