Skip to content

Commit

Permalink
Solarwinds formats: Lowercase the username
Browse files Browse the repository at this point in the history
Also change a username in a test vector to uppercase, add a hashcat test
vector, and change spaces to tabs in the tests[] array initializer.

Fixes #5208
  • Loading branch information
solardiz committed Jun 8, 2024
1 parent ee5efb4 commit b2db2b6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/solarwinds_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
#define HASH_LENGTH 88

struct fmt_tests solarwinds_tests[] = {
{"$solarwinds$0$admin$/+PA4Zck3arkLA7iwWIugnAEoq4ocRsYjF7lzgQWvJc+pepPz2a5z/L1Pz3c366Y/CasJIa7enKFDPJCWNiKRg==", ""},
{"$solarwinds$0$admin$5BqFpldsj5H9nbkkLjB+Cdi7WCXiUp5zBpO9Xs7/MKnnQAI0IE9gH+58LlS7/+a/7x1wWScI2iCGEtukgTiNeA==", "letmein"},
{NULL}
{"$solarwinds$0$admin$/+PA4Zck3arkLA7iwWIugnAEoq4ocRsYjF7lzgQWvJc+pepPz2a5z/L1Pz3c366Y/CasJIa7enKFDPJCWNiKRg==", ""},
{"$solarwinds$0$ADMIN$5BqFpldsj5H9nbkkLjB+Cdi7WCXiUp5zBpO9Xs7/MKnnQAI0IE9gH+58LlS7/+a/7x1wWScI2iCGEtukgTiNeA==", "letmein"},
{"$solarwinds$0$admin$fj4EBQewCQUZ7IYHl0qL8uj9kQSBb3m7N4u0crkKK0Uj9rbbAnSrBZMXO7oWx9KqL3sCzwncvPZ9hyDV9QCFTg==", "hashcat"},
{NULL}
};

int solarwinds_valid(char *ciphertext, struct fmt_main *self)
Expand Down Expand Up @@ -77,6 +78,7 @@ void *solarwinds_get_salt(char *ciphertext)
p = strtokm(ctcopy, "$");
p = strtokm(NULL, "$");

strlwr(p);
strncpy(cs.salt, p, 8);

if (strlen(p) < 8)
Expand Down

0 comments on commit b2db2b6

Please sign in to comment.