1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

Merge pull request #3699 from matrix/fix_26900_module_hash_encode

Fixed bug in 26900 module_hash_encode
This commit is contained in:
Jens Steube 2023-04-30 10:03:13 +02:00 committed by GitHub
commit cdd1e050b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -53,6 +53,7 @@
- Fixed incorrect plaintext check for 25400 and 26610. Increased plaintext check to 32 bytes to prevent false positives.
- Fixed bug in --stdout that caused certain rules to malfunction
- Fixed bug in 18400 module_hash_encode
- Fixed bug in 26900 module_hash_encode
- Fixed bug in grep out-of-memory workaround on Unit Test
- Fixed bug in input_tokenizer when TOKEN_ATTR_FIXED_LENGTH is used and refactor modules
- Fixed build failed for 18400 with Apple Metal

View File

@ -284,7 +284,19 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
out_len++;
out_len += hex_encode ((u8 *) snmpv3->engineID_buf, snmpv3->engineID_len, out_buf + out_len);
// remove zero padding from snmpv3->engineID_buf
u8 *engineID_buf_tmp = (u8 *) snmpv3->engineID_buf;
u32 engineID_len = snmpv3->engineID_len;
while (engineID_buf_tmp[engineID_len] == 0x00) engineID_len--;
engineID_len++;
// append to output
out_len += hex_encode ((u8 *) snmpv3->engineID_buf, engineID_len, out_buf + out_len);
out_buf[out_len] = '$';