Harry
2009-10-11 21:57:51
http://harryy.us/files/passwd.pl
Source:
It has a lot of entropy, in my opinion. Any suggestions on what I should/could change?
Source:
#!/usr/bin/perl
srand($$|time);
$ascii_passwd = &pw_generate;
sub pw_generate {
local(@passset, $rnd_passwd, $randum_num);
local($randum_num);
@passset = ('a'..'k', 'm'..'z', 'A'..'N', 'P'..'Z', '2'..'9');
$rnd_passwd = "";
for ($i = 0; $i < 30; $i++) {
$randum_num = int(rand($#passset + 1));
$rnd_passwd .= @passset[$randum_num];
}
return $rnd_passwd;
}
{
print "Content-Type: text/html", "\n\n";
print "Hi, here is your random password:<b> ",$ascii_passwd, " </b>...keep it safe!\n";
}
It has a lot of entropy, in my opinion. Any suggestions on what I should/could change?