mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-13 19:28:56 +00:00
Test fix for plain_t in 32 bit mode
This commit is contained in:
parent
6d03da369b
commit
a4ac370496
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
10
src/hashes.c
10
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);
|
||||
|
@ -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;
|
||||
|
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user