The DES crypt() function will return a 13 character string, of which the first two characters are the salt. The salt is exactly 2 characters and the key is no more than 8 characters.
Looking at the problem from the other direction, I take the known key ,"dlwzztgb", the two salts, "dp" & "On", and create the two individual 13 character strings. Those two strings should match what
les-70 has observed.
Sample code, named check.c --
#define _XOPEN_SOURCE
#include <unistd.h>
#include <stdio.h>
/*
* char *crypt(const char *key, const char *salt);
*
* Link with -lcrypt.
*
*/
int main()
{
const char *key = "dlwzztgb";
/* dpJNRD7c6NAdo */
const char *salt1 = "dp";
/* On2YY/J2896G. */
const char *salt2 = "On";
printf("\ncrypt(\"%s\", \"%s\") returns \"%s\"\n", key, salt1, crypt(key, salt1));
printf("crypt(\"%s\", \"%s\") returns \"%s\"\n\n", key, salt2, crypt(key, salt2));
return 0;
}
Compiled --
[bcat ~]$ cc -lcrypt -o check check.c
[bcat ~]$
Executed --
[bcat ~]$ check
crypt("dlwzztgb", "dp") returns "dpJNRD7c6NAdo"
crypt("dlwzztgb", "On") returns "On5VNc9bUa/v."
[bcat ~]$
The above confirms that "dlwzztgb" is, indeed, correct for the first salt/key pair but not for the second.
[Edited to adjust the last sentence.]