02-26-2020, 12:36 PM
Hi all,
When looking at the source code of Hashcat I noticed that the candidate passwords are stored in a type called pw (defined line 1643 of OpenCL/inc_types.h).
This type is simple, the code is this
However, each character of the candidate password is only 1 byte right ? I read somewhere on an old thread that pw.i[0] would hold the first 4 characters of the candidate password, etc ... In that case, what is pw_len ? is it the length of the array of the length in chars ?
Suppose my password is "hashcat" (7 chars long), we sould have something like
pw.i[0] = hash
pw.i[1] = cat0 (I'm guessing that all "unused" bytes are null bytes)
pw.i[2] = 0 ...
in that case is pw_len 2 or 7 ?
I'm trying to implement FNV1 as an exercise and for this algorithm I need to iterate over every byte of data. If pw_len is the length of the pw.i array, is there another way to get the length in bytes of the candidate password ?
Thanks a lot in advance
When looking at the source code of Hashcat I noticed that the candidate passwords are stored in a type called pw (defined line 1643 of OpenCL/inc_types.h).
This type is simple, the code is this
Code:
typedef struct pw
{
u32 i[64];
u32 pw_len;
} pw_t;
Suppose my password is "hashcat" (7 chars long), we sould have something like
pw.i[0] = hash
pw.i[1] = cat0 (I'm guessing that all "unused" bytes are null bytes)
pw.i[2] = 0 ...
in that case is pw_len 2 or 7 ?
I'm trying to implement FNV1 as an exercise and for this algorithm I need to iterate over every byte of data. If pw_len is the length of the pw.i array, is there another way to get the length in bytes of the candidate password ?
Thanks a lot in advance