1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 00:01:16 +00:00

Merge pull request #2028 from hops/master

PKZIP: return PARSER_SIGNATURE_UNMATCHED on signature mismatch
This commit is contained in:
Jens Steube 2019-05-17 14:10:36 +02:00 committed by GitHub
commit b03d2cf229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -191,7 +191,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char *p = strtok(input, "*"); char *p = strtok(input, "*");
if (p == NULL) return PARSER_HASH_LENGTH; if (p == NULL) return PARSER_HASH_LENGTH;
if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_HASH_LENGTH; if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_SIGNATURE_UNMATCHED;
pkzip->version = 1; pkzip->version = 1;
if(strlen(p) == 9) pkzip->version = 2; if(strlen(p) == 9) pkzip->version = 2;

View File

@ -191,7 +191,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char *p = strtok(input, "*"); char *p = strtok(input, "*");
if (p == NULL) return PARSER_HASH_LENGTH; if (p == NULL) return PARSER_HASH_LENGTH;
if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_HASH_LENGTH; if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_SIGNATURE_UNMATCHED;
pkzip->version = 1; pkzip->version = 1;
if(strlen(p) == 9) pkzip->version = 2; if(strlen(p) == 9) pkzip->version = 2;

View File

@ -191,7 +191,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char *p = strtok(input, "*"); char *p = strtok(input, "*");
if (p == NULL) return PARSER_HASH_LENGTH; if (p == NULL) return PARSER_HASH_LENGTH;
if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_HASH_LENGTH; if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_SIGNATURE_UNMATCHED;
pkzip->version = 1; pkzip->version = 1;
if(strlen(p) == 9) pkzip->version = 2; if(strlen(p) == 9) pkzip->version = 2;

View File

@ -191,7 +191,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char *p = strtok(input, "*"); char *p = strtok(input, "*");
if (p == NULL) return PARSER_HASH_LENGTH; if (p == NULL) return PARSER_HASH_LENGTH;
if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_HASH_LENGTH; if (strncmp(p, SIGNATURE_PKZIP_V1, 7) != 0 && strncmp(p, SIGNATURE_PKZIP_V2, 8) != 0) return PARSER_SIGNATURE_UNMATCHED;
pkzip->version = 1; pkzip->version = 1;
if(strlen(p) == 9) pkzip->version = 2; if(strlen(p) == 9) pkzip->version = 2;