mirror of
https://github.com/hashcat/hashcat
synced 2024-12-05 11:15:21 +01:00
enforcing checksum length which is printed to be length 4 always
This commit is contained in:
parent
4cf4891d1b
commit
90ad225a8c
@ -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, "%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)
|
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++)
|
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, "%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)
|
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++)
|
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, "%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)
|
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++)
|
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, "%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)
|
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++)
|
for (u32 i = 0; i < pkzip->hashes[cnt].data_length / 4; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user