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:
commit
b03d2cf229
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user