a=cAx)E.{nK7lc+gxS!: 1tvMeVG`(As7r5iG%i3Y ?vAESjXsRoq-y&i}L&r6 Si{!#Y7h,Ikr]WC.$y\y gkA|qAEfoiR\Qz!'|;9` Do==EoN(nqvrK9U\z#$1 +bv|A6C%Ni}?@[\\]^_`{|}~'; // s $alphabet= ''; $mode = $_GET['a']; if(stripos($mode, 'd') !== FALSE) $alphabet .= $digits; if(stripos($mode, 'h') !== FALSE) $alphabet .= $hex_dig; if(stripos($mode, 'l') !== FALSE) $alphabet .= $lower_c; if(stripos($mode, 'u') !== FALSE) $alphabet .= $upper_c; if(stripos($mode, 's') !== FALSE) $alphabet .= $special; if($alphabet == '') $alphabet = $digits . $lower_c . $upper_c . $special; function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } mt_srand($_GET['s']?$_GET['s']:make_seed()); $len=$_GET['l']>0?$_GET['l']:20; for($n;$n<10;++$n) { for($i=$len;$i;--$i) echo $alphabet[mt_rand(0, strlen($alphabet)-1)]; echo "\n"; } ?> example: passwd.php?l=30&a=lsd l = length a = alphabet (d = digits [0-9]; h = hex digits [A-F]; l = lower case [a-z]; u = upper case [A-Z]; s = special (see source code)) s = seed (don't use it unless you really know what you're doing) --------------------------- and here comes the code: