Title: Message
$randomstring="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for ($ii=1;$ii<=1000;$ii++) {
    $pwd = "";
    for ($jj=1;$jj<=8;$jj++) {
        $pwd .= (split(//,$randomstring))[rand(length($randomstring))];
    }
    print "$pwd\n";
}
 
change the list of characters to whatever you want...
-----Original Message-----
From: Krishna, Hari [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 29, 2002 11:48 AM
To: 'FARRINGTON, RYAN'; [EMAIL PROTECTED]
Subject: Random numbers

Hi friends,
    I want to generate some 1000 or more passwords for some NT machine.
I should be able to generate an 8 digit alphanumeric random numbers from the list of characters.
 
Say I have 3 strings...
First string : 0 - 9 numbers
Second string : A - Z characters
Third string: a - z characters.
 
Now I should be able to generate strings like:
 
"abCd16Sz"
"U8Yb90vc"
"Nt7gO0PL"
 
something like that.
 
Is there a way to generate such kind of random numbers 8 characters long???
 
I saw in a bok that there is a module in PERL
MATH::TrulyRandom
 
but I am not sure if it helps. I will keep trying.
 
 
any inputs appreciated.
 
Hope I can get some help.
 
 
Thanks and Regards,
Hari.

Reply via email to