OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Diego Zaccariotto (diegodacos.net)
Date: Wed Apr 18 2001 - 11:53:06 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On Wed, Apr 18, 2001 at 06:43:22PM +0200, Adrian Zurek wrote about Re: virtual transport:
    > On Wed, Apr 18, 2001 at 03:33:30PM +0200, Diego Zaccariotto wrote:
    > > To create the encrypted password you can use the following perl script,
    > > just use ./script login cleartextpassword:
    > >
    > > #!/usr/bin/perl
    > <snip>
    > > $salt = '$1$';
    > > salt2 = (a...z,A...Z,0...9);
    > > $salt .= $salt2[rand(62)].$salt2[rand(62)].$salt2[rand(62)].$salt2[rand(62)].$salt2[rand(62)].$salt2[rand(62)].$salt2[rand(62)].$salt2[rand(62)];
    > >
    > > print "$username:",crypt($passwd, $salt), "\n";
    > Ehm, I'd better use something like this:
    > #!/usr/bin/perl
    > $salt = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64];

    this way works if you don't want to use MD5. The script I posted is for
    MD5 encryption.

    -- 
    Diego Zaccariotto <diegodacos.net>
    Dacos Network Solutions s.u.r.l.
    Tel. +39 0421-221771 - fax. +39 0421-225206
    http://www.dacos.it
    

    - To unsubscribe, send mail to majordomopostfix.org with content (not subject): unsubscribe postfix-users