commit a929612c8b23127af46f96e6232c3cfbc7380f4f
parent ff1e412916499a7da7e45f748c4cb42337095346
Author: Nicolas CARPi <nico-git@deltablot.email>
Date: Fri, 4 Feb 2022 23:39:55 +0100
Add PHP password_hash definite identification
PHP's password_hash() function returns a hash that starts with $2y$,
followed by the cost.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
@@ -53,7 +53,7 @@ starts_with(const char *a, const char *b)
static void
dprint(char *name)
{
- printf("[" RED "+" RESET "] Definite identification %s\n", name);
+ printf("[" RED "+" RESET "] Definite identification: %s\n", name);
}
@@ -83,6 +83,8 @@ definite(char string[], int length)
dprint("SHA1 Django");
else if (length==65 && string[32]==':')
dprint("MD5 Joomla (pass:salt)");
+ else if (starts_with(string, "$2y$"))
+ dprint("PHP password_hash");
}
/* this function determines charset*/