<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>Генератор паролей</title>
<link rel="Author" href="http://shoorick.ru/" title="Александр Сапожников">
<style>
span.hotkey {text-decoration:underline}
th {text-align:right;font-weight:normal;}
h2 {text-align:left;font-size:100%}
form {color:ButtonText; background:ButtonFace;
border:2px outset; padding:2px;}
input[type=text], textarea {width:100%;}
h1 {color:CaptionText;background:ActiveCaption;
margin:0;padding:0.3em;font-size:100%;}
</style>
<script language="javascript">
function gen()
{
with (document.forms['frm'])
{
var charset = ch.value.replace(/\s+/g, ''); // за вычетом пробелов
var chle = charset.length;
var pwle = Math.round(len.value);
var qtle = Math.round(qty.value);
if ((pwle < 1) || (pwle > 255)) pwle = 8;
if ((qtle < 1) || (qtle > 15)) qtle = 5;
len.value = pwle;
qty.value = qtle;
passwd.style.height = qty*1.5 + 'em';
np='';
for (k=0;k<qtle;k++)
{
for (i=0;i<pwle;i++)
np += charset.charAt(Math.round(Math.random()*(chle-1)));
np += '\n';
} // for k
passwd.value = np.replace(/\s+$/, '');
} // with
return false;
} // ()
</script>
</head>
<body><form name="frm"><h1>Генератор паролей</h1><table width="100%">
<tr><th scope="row" style="width:8em;" colspan="2"><input accesskey="с"
type="submit" value="Создать пароли" onClick="return gen();"
style="padding:1em;font-size:200%;font-family:Verdana,sans-serif;font-weight:bold;"></th>
<td rowspan="2"><label for="passwd"><span
class="hotkey">П</span>ароли</label><br><textarea name="passwd" accesskey="п"
style="font-family:'Courier New',Courier,mono;height:15em;"></textarea></td>
</tr><tr><td><fieldset><legend>Параметры</legend><table><tr><th
scope="row"><label for="len"><span class="hotkey">Д</span>лина</label></th>
<td><input name="len" type="text" value="8" accesskey="д" style="width:3em;"></td>
</tr><tr><th scope="row"><label for="ch"><span class="hotkey">Н</span>абор
символов</label></th><td><textarea name="ch" accesskey="н"
style="height:6em;">0123456789_
ABCDEFGHIJKLM
NOPQRSTUVWXYZ
abcdefghijklm
nopqrstuvwxyz</textarea></td>
</tr><tr><th scope="row"><label for="qty"><span
class="hotkey">К</span>оличество</label></th>
<td><input name="qty" type="text" value="5" accesskey="к"
style="width:3em;"></td></tr></table></fieldset></td></tr></th></tr></table>
</form></body></html>