[Prev][Next][Index][Thread]

# Re: crypt()ic problem

- Date: Tue, 11 Jun 1996 19:36:14 PDT
- From:
- Reply-To:
- Content-Transfer-Encoding: quoted-printable
- Content-Type: text/plain; charset=ISO-8859-1
- Newsgroups: local.moo
- Organization: Where Stormnet meets the Internet
- References: <Pine.BSF.3.91.960610141621.28645C-100000@srv1.thuntek.net>

    Followup to:  <Pine.BSF.3.91.960610141621.28645C-100000@srv1.thuntek.net>
    By author:    "Jamal A. Wills" <jwills@thuntek.net>
    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.

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

References:

- crypt()ic problem

- From: "Jamal A. Wills" <jwills@thuntek.net>

- Prev: Re: crypt()ic problem
- Next: Re: crypt()ic problem
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index