mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-27 14:52:23 +00:00
Improved NSEC3 hashes parsing error detection
This commit is contained in:
parent
bf69afce90
commit
5835f0991f
@ -44,6 +44,7 @@
|
|||||||
- Added docs/team.txt
|
- Added docs/team.txt
|
||||||
- Replaced some uint macros with enums types
|
- Replaced some uint macros with enums types
|
||||||
- Improved default hashcat.hcstat
|
- Improved default hashcat.hcstat
|
||||||
|
- Improved NSEC3 hashes parsing error detection
|
||||||
|
|
||||||
* changes v3.00 -> v3.10:
|
* changes v3.00 -> v3.10:
|
||||||
|
|
||||||
|
@ -6851,13 +6851,17 @@ int nsec3_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUS
|
|||||||
|
|
||||||
memcpy (salt_buf_pc_ptr, domainbuf_pos, domainbuf_len);
|
memcpy (salt_buf_pc_ptr, domainbuf_pos, domainbuf_len);
|
||||||
|
|
||||||
u8 *len_ptr = NULL;
|
if (salt_buf_pc_ptr[0] != '.') return (PARSER_SALT_VALUE);
|
||||||
|
|
||||||
for (u32 i = 0; i < domainbuf_len; i++)
|
u8 *len_ptr = salt_buf_pc_ptr;
|
||||||
|
|
||||||
|
*len_ptr = 0;
|
||||||
|
|
||||||
|
for (u32 i = 1; i < domainbuf_len; i++)
|
||||||
{
|
{
|
||||||
if (salt_buf_pc_ptr[i] == '.')
|
if (salt_buf_pc_ptr[i] == '.')
|
||||||
{
|
{
|
||||||
len_ptr = &salt_buf_pc_ptr[i];
|
len_ptr = salt_buf_pc_ptr + i;
|
||||||
|
|
||||||
*len_ptr = 0;
|
*len_ptr = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user