mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-16 17:42:04 +00:00
Merge pull request #2040 from s3inlc/master
Fixing small issues with certain pkzip edge case hashes and printing with leading zeros
This commit is contained in:
commit
9dcd991a9f
@ -725,8 +725,8 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
|
||||
mz_stream infstream;
|
||||
|
||||
@ -951,8 +951,8 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
|
||||
mz_stream infstream;
|
||||
|
||||
|
@ -727,8 +727,8 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
|
||||
mz_stream infstream;
|
||||
|
||||
@ -957,8 +957,8 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
|
||||
mz_stream infstream;
|
||||
|
||||
|
@ -740,8 +740,8 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
|
||||
mz_stream infstream;
|
||||
|
||||
@ -982,8 +982,8 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue;
|
||||
if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue;
|
||||
|
||||
mz_stream infstream;
|
||||
|
||||
|
@ -721,8 +721,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
|
||||
{
|
||||
|
@ -721,8 +721,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
|
||||
{
|
||||
@ -988,8 +988,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
|
||||
{
|
||||
|
@ -733,8 +733,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
|
||||
{
|
||||
@ -1012,8 +1012,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
|
||||
update_key012 (key0, key1, key2, plain, l_crc32tab);
|
||||
}
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
|
||||
|
||||
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
|
||||
{
|
||||
|
@ -315,10 +315,10 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
out_len += sprintf (line_buf + out_len, "%x*%x*%x*%x*%x*", pkzip->hash.compressed_length, pkzip->hash.uncompressed_length, pkzip->hash.crc32, pkzip->hash.offset, pkzip->hash.additional_offset);
|
||||
}
|
||||
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%x*", pkzip->hash.compression_type, pkzip->hash.data_length, pkzip->hash.checksum_from_crc);
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%04x*", pkzip->hash.compression_type, pkzip->hash.data_length, pkzip->hash.checksum_from_crc);
|
||||
if (pkzip->version == 2)
|
||||
{
|
||||
out_len += sprintf (line_buf + out_len, "%x*", pkzip->hash.checksum_from_timestamp);
|
||||
out_len += sprintf (line_buf + out_len, "%04x*", pkzip->hash.checksum_from_timestamp);
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < pkzip->hash.data_length / 4; i++)
|
||||
|
@ -315,10 +315,10 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
out_len += sprintf (line_buf + out_len, "%x*%x*%x*%x*%x*", pkzip->hash.compressed_length, pkzip->hash.uncompressed_length, pkzip->hash.crc32, pkzip->hash.offset, pkzip->hash.additional_offset);
|
||||
}
|
||||
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%x*", pkzip->hash.compression_type, pkzip->hash.data_length, pkzip->hash.checksum_from_crc);
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%04x*", pkzip->hash.compression_type, pkzip->hash.data_length, pkzip->hash.checksum_from_crc);
|
||||
if (pkzip->version == 2)
|
||||
{
|
||||
out_len += sprintf (line_buf + out_len, "%x*", pkzip->hash.checksum_from_timestamp);
|
||||
out_len += sprintf (line_buf + out_len, "%04x*", pkzip->hash.checksum_from_timestamp);
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < pkzip->hash.data_length / 4; i++)
|
||||
|
@ -318,10 +318,10 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
out_len += sprintf (line_buf + out_len, "%x*%x*%x*%x*%x*", pkzip->hashes[cnt].compressed_length, pkzip->hashes[cnt].uncompressed_length, pkzip->hashes[cnt].crc32, pkzip->hashes[cnt].offset, pkzip->hashes[cnt].additional_offset);
|
||||
}
|
||||
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%x*", pkzip->hashes[cnt].compression_type, pkzip->hashes[cnt].data_length, pkzip->hashes[cnt].checksum_from_crc);
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%04x*", pkzip->hashes[cnt].compression_type, pkzip->hashes[cnt].data_length, pkzip->hashes[cnt].checksum_from_crc);
|
||||
if (pkzip->version == 2)
|
||||
{
|
||||
out_len += sprintf (line_buf + out_len, "%x*", pkzip->hashes[cnt].checksum_from_timestamp);
|
||||
out_len += sprintf (line_buf + out_len, "%04x*", pkzip->hashes[cnt].checksum_from_timestamp);
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < pkzip->hashes[cnt].data_length / 4; i++)
|
||||
|
@ -319,10 +319,10 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
out_len += sprintf (line_buf + out_len, "%x*%x*%x*%x*%x*", pkzip->hashes[cnt].compressed_length, pkzip->hashes[cnt].uncompressed_length, pkzip->hashes[cnt].crc32, pkzip->hashes[cnt].offset, pkzip->hashes[cnt].additional_offset);
|
||||
}
|
||||
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%x*", pkzip->hashes[cnt].compression_type, pkzip->hashes[cnt].data_length, pkzip->hashes[cnt].checksum_from_crc);
|
||||
out_len += sprintf (line_buf + out_len, "%i*%x*%04x*", pkzip->hashes[cnt].compression_type, pkzip->hashes[cnt].data_length, pkzip->hashes[cnt].checksum_from_crc);
|
||||
if (pkzip->version == 2)
|
||||
{
|
||||
out_len += sprintf (line_buf + out_len, "%x*", pkzip->hashes[cnt].checksum_from_timestamp);
|
||||
out_len += sprintf (line_buf + out_len, "%04x*", pkzip->hashes[cnt].checksum_from_timestamp);
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < pkzip->hashes[cnt].data_length / 4; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user