MOO-cows Mailing List Archive


Re: crypt()ic problem

Followup to:  <>
By author:    "Jamal A. Wills" <>
In newsgroup: local.moo
> I think this system has a slightly nonstandard form of crypt().  If I 
> change candidate.password[1..2] to candidate.password[4..5] I think it 
> should work, but I wanted to check with someone more familier with the 
> language first (especially since this would make the code incompatable 
> with other servers).

The [1..2] part is actually bogus, it just happens to work on standard
UNIX crypt().

The correct form is actually:

if ( crypt(guess, password) == crypt(password, password) ) then

where "guess" is what the user typed in and password is the stored
encrypted password.

PGP public key available - finger
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
Just Say No to Morden * Save Babylon 5:
The cat is out of the bag - Linux 2.0 is available!


Home | Subject Index | Thread Index