1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

Merge pull request #2668 from RealEnder/master

Correct check for gz header.
This commit is contained in:
Jens Steube 2021-04-04 12:44:53 +02:00 committed by GitHub
commit f05ea114a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ bool hc_fopen (HCFILE *fp, const char *path, char *mode)
if (read (fd_tmp, check, sizeof (check)) > 0) if (read (fd_tmp, check, sizeof (check)) > 0)
{ {
if (check[0] == 0x1f && check[1] == 0x8b && check[2] == 0x08 && check[3] == 0x08) fp->is_gzip = true; if (check[0] == 0x1f && check[1] == 0x8b && check[2] == 0x08) fp->is_gzip = true;
if (check[0] == 0x50 && check[1] == 0x4b && check[2] == 0x03 && check[3] == 0x04) fp->is_zip = true; if (check[0] == 0x50 && check[1] == 0x4b && check[2] == 0x03 && check[3] == 0x04) fp->is_zip = true;
} }