show.pl
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html>\n";
print "<head><meta http-equiv=Content-Type content=text/html;charset=gb2312>\n";
print "<head>\n<body bgcolor=#c0c0c0>\n";
print "<p> </p>";
print "<p align=center><font color=#8080FF><big><strong>送您一百个随机密码, 虽然不好记, 但是都是随机产生的, 很安全!</strong></big></font></p>\n";
print "<div align=center><center>";
print "<table border=1 bgcolor=#C0C0C0 cellspacing=1 cellpadding=3>\n";
for(=0;<10;++)
{
print "<tr>";
for(=0;<10;++)
{
print "<td>";
print &getstring;
print "</td>";
}
print "</tr>\n";
}
print "</table></center></div>\n";
print "<p></p>";
print "<p><center><a href=show.pl><span style=\"FONT-FAMILY: 宋体; FONT-SIZE: 10pt\">再算一遍</span></a></center></p>";
print "\n</body></html>\n";
exit;
sub getstring
{
="";
for(=0;<8;++)
{
=int(rand(3));
if(==0) { .=pack("c",rand(10)+48); }
elsif(==1) { .=pack("c",rand(26)+65); }
elsif(==2) { .=pack("c",rand(26)+97); }
}
return ;
}