Creating all key combinations passwords

Creating all key combinations passwords

am 20.05.2007 17:38:42 von Lasitha Alawatta

------=_NextPartTM-000-4dc3199c-a2e4-4895-b17d-8b2aaa012e90
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C79AF4.F2477598"

------_=_NextPart_001_01C79AF4.F2477598
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=0AHi All, I'm going t=
o create all key combinations; simple-letter passwords and store those=
in to MySql DB. =0AUsing =3D a-z (simple letters) Pa=
ssword length =3D 6 Number of possibilities =3D 26 x 26 x 26 x 2=
6 x 26 x 26 =3D 308,915,776 =0AThis is my code: =0D=
<=3Fphp =0A for($i=3D0;$i< 50=
0000000;$i++){ $arrPwd[] =3D createPwd(); =
=0A } =0A $arrUniqueData =3D array_unique(=
$arrPwd); =0A foreach($arrUniqueData as $key=3D=
>$val){ // Inserting to DB =0A} =
function createPwd() { $lower =3D "abcdefghijk=
lmnopqrstuvwxyz"; $seed_length +=3D 26; =
$seed .=3D $lower; =0A =
for($x=3D1;$x<=3D6;$x++){ $ strPwd.=3D $se=
ed{rand(0,$seed_length-1)}; } =
return($strPwd); } =3F> =
=0AWhat is the easiest way to get my output? =0A=
1.=09Because above code will stuck the PC (for($i=3D0;$i< 500000000;$i=
++){). =0A2.=09I use 500000000 instead of 308915776, because createPwd=
() function will duplicating the password. =
Suggesting, comments, code samples are highly appreciate. =
=0AThanks in advance, Lasitha. =0A =0D=
DOTW DISCLAIMER: This e-mail and any att=
achments are strictly confidential and intended for the addressee only. If =
you are not the named addressee you must not disclose, copy or take an=
y action in reliance of this transmission and you should notify us as soon =
as possible. If you have received it in error, please contact the message s=
ender immediately. This e-mail and any attachments are believed to be =
free from viruses but it is your responsibility to carry out all necessary =
virus checks and DOTW accepts no liability in connection therewith. =0D=
=0AThis e-mail and all other electronic (including voice) communicati=
ons from the sender's company are for informational purposes only. No such=
communication is intended by the sender to constitute either an elect=
ronic record or an electronic signature or to constitute any agreement by t=
he sender to conduct a transaction by electronic means.
------_=_NextPart_001_01C79AF4.F2477598
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">=0D=
=0A charset=3Dus-ascii"> 11 (filtered medium)">