diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 15:58:43 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 15:58:43 +0100 |
commit | decd44ac1d717a5fcd178f65fc60010c2ad1d35f (patch) | |
tree | 9321e210fc1909a0029194ffd812616b1adf7f67 | |
parent | 7121ab85595c05d44b59dd056855ad8d29b686a1 (diff) |
Fixed salt
-rw-r--r-- | FICS/fics_addplayer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/FICS/fics_addplayer.c b/FICS/fics_addplayer.c index 6837e32..e894165 100644 --- a/FICS/fics_addplayer.c +++ b/FICS/fics_addplayer.c @@ -50,7 +50,7 @@ PUBLIC int main(int argc, char *argv[]) { char password[PASSLEN + 1]; - char salt[3]; + char salt[6]; char text[2048]; int i; int p; @@ -113,9 +113,12 @@ main(int argc, char *argv[]) password[i] = 'a' + rand() % 26; } password[i] = '\0'; - salt[0] = 'a' + rand() % 26; - salt[1] = 'a' + rand() % 26; - salt[2] = '\0'; + salt[0] = '$'; + salt[1] = '1'; + salt[2] = '$'; + salt[3] = ('a' + rand() % 26); + salt[4] = ('a' + rand() % 26); + salt[5] = '\0'; parray[p].passwd = xstrdup(crypt(password, salt)); parray[p].registered = 1; // parray[p].network_player = !local; |