Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/oracle12c_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int valid(char *ciphertext, struct fmt_main *self)
{
char *p = ciphertext;

if (strncasecmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LENGTH))
if (strncmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LENGTH))
return 0;

if (strlen(ciphertext) > (FORMAT_TAG_LENGTH + CIPHERTEXT_LENGTH))
Expand Down
2 changes: 1 addition & 1 deletion src/pbkdf2_hmac_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ int pbkdf2_hmac_sha1_valid(char *ciphertext, struct fmt_main *self) {
size_t len;
char *delim;

if (strncasecmp(ciphertext, PBKDF2_SHA1_FORMAT_TAG, PBKDF2_SHA1_TAG_LEN))
if (strncmp(ciphertext, PBKDF2_SHA1_FORMAT_TAG, PBKDF2_SHA1_TAG_LEN))
return 0;
if (strlen(ciphertext) > PBKDF2_SHA1_MAX_CIPHERTEXT_LENGTH)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/pfx_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int pfx_valid(char *ciphertext, struct fmt_main *self)
char *p = ciphertext, *ctcopy, *keeptr;
int mac_algo, saltlen, hashhex, extra;

if (strncasecmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LENGTH))
if (strncmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LENGTH))
return 0;
ctcopy = xstrdup(ciphertext);
keeptr = ctcopy;
Expand Down
2 changes: 1 addition & 1 deletion src/rawSHA512_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int sha512_common_valid_nsldap(char *ciphertext, struct fmt_main *self)
{
int len;

if (strncasecmp(ciphertext, NSLDAP_FORMAT_TAG, NSLDAP_TAG_LENGTH))
if (strncmp(ciphertext, NSLDAP_FORMAT_TAG, NSLDAP_TAG_LENGTH))
return 0;
ciphertext += NSLDAP_TAG_LENGTH;

Expand Down
2 changes: 1 addition & 1 deletion src/salted_sha1_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int salted_sha1_common_valid(char *ciphertext, struct fmt_main *self)
int len, real_len;
char buf[MAX_SALT_LEN+BINARY_SIZE+8];

if (strncasecmp(ciphertext, NSLDAP_MAGIC, NSLDAP_MAGIC_LENGTH))
if (strncmp(ciphertext, NSLDAP_MAGIC, NSLDAP_MAGIC_LENGTH))
return 0;
ciphertext += NSLDAP_MAGIC_LENGTH;

Expand Down
16 changes: 8 additions & 8 deletions src/sapH_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,10 @@ static void *get_binary(char *ciphertext)
char *cp = ciphertext;

memset(b.cp, 0, sizeof(b.cp));
if (!strncasecmp(cp, FORMAT_TAG, FORMAT_TAG_LEN)) { cp += FORMAT_TAG_LEN; }
else if (!strncasecmp(cp, FORMAT_TAG256, FORMAT_TAG256_LEN)) { cp += FORMAT_TAG256_LEN; }
else if (!strncasecmp(cp, FORMAT_TAG384, FORMAT_TAG384_LEN)) { cp += FORMAT_TAG384_LEN; }
else if (!strncasecmp(cp, FORMAT_TAG512, FORMAT_TAG512_LEN)) { cp += FORMAT_TAG512_LEN; }
if (!strncmp(cp, FORMAT_TAG, FORMAT_TAG_LEN)) { cp += FORMAT_TAG_LEN; }
else if (!strncmp(cp, FORMAT_TAG256, FORMAT_TAG256_LEN)) { cp += FORMAT_TAG256_LEN; }
else if (!strncmp(cp, FORMAT_TAG384, FORMAT_TAG384_LEN)) { cp += FORMAT_TAG384_LEN; }
else if (!strncmp(cp, FORMAT_TAG512, FORMAT_TAG512_LEN)) { cp += FORMAT_TAG512_LEN; }
else { fprintf(stderr, "error, bad signature in sap-H format!\n"); error(); }
while (*cp != '}') ++cp;
++cp;
Expand All @@ -669,10 +669,10 @@ static void *get_salt(char *ciphertext)
int total_len, hash_len = 0;

memset(&s, 0, sizeof(s));
if (!strncasecmp(cp, FORMAT_TAG, FORMAT_TAG_LEN)) { s.type = 1; cp += FORMAT_TAG_LEN; hash_len = SHA1_BINARY_SIZE; }
else if (!strncasecmp(cp, FORMAT_TAG256, FORMAT_TAG256_LEN)) { s.type = 2; cp += FORMAT_TAG256_LEN; hash_len = SHA256_BINARY_SIZE; }
else if (!strncasecmp(cp, FORMAT_TAG384, FORMAT_TAG384_LEN)) { s.type = 3; cp += FORMAT_TAG384_LEN; hash_len = SHA384_BINARY_SIZE; }
else if (!strncasecmp(cp, FORMAT_TAG512, FORMAT_TAG512_LEN)) { s.type = 4; cp += FORMAT_TAG512_LEN; hash_len = SHA512_BINARY_SIZE; }
if (!strncmp(cp, FORMAT_TAG, FORMAT_TAG_LEN)) { s.type = 1; cp += FORMAT_TAG_LEN; hash_len = SHA1_BINARY_SIZE; }
else if (!strncmp(cp, FORMAT_TAG256, FORMAT_TAG256_LEN)) { s.type = 2; cp += FORMAT_TAG256_LEN; hash_len = SHA256_BINARY_SIZE; }
else if (!strncmp(cp, FORMAT_TAG384, FORMAT_TAG384_LEN)) { s.type = 3; cp += FORMAT_TAG384_LEN; hash_len = SHA384_BINARY_SIZE; }
else if (!strncmp(cp, FORMAT_TAG512, FORMAT_TAG512_LEN)) { s.type = 4; cp += FORMAT_TAG512_LEN; hash_len = SHA512_BINARY_SIZE; }
else { fprintf(stderr, "error, bad signature in sap-H format!\n"); error(); }
sscanf(cp, "%u", &s.iter);
while (*cp != '}') ++cp;
Expand Down
2 changes: 1 addition & 1 deletion src/zed_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int zed_valid(char *ciphertext, struct fmt_main *self)
char *p = ciphertext, *ctcopy, *keeptr;
int version, algo, extra;

if (strncasecmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LENGTH))
if (strncmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LENGTH))
return 0;
ctcopy = xstrdup(ciphertext);
keeptr = ctcopy;
Expand Down