<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="/style.css" type="text/css"/><title>
Генератор паролей
</title></head><body>
<script type="text/javascript" language="javascript" src="/config.js"></script>
<div class="head"><noscript>Для нормального отображения сайта требуется поддержка JavaScripts Вашим браузером</noscript>
<center><img src="/images/logo.png" alt="LOGO" /></center></div><div class="ads">
<script type="text/javascript">document.write(verhrekl);</script></div>
<div class="title">
Генератор паролей
</div><div class="main">
<script language="JavaScript1.2">
with (document) {
writeln('<form name=myform>' +
'Какие символы использовать в пароле?<br />' +
'<input OnClick=OnCheck(0) class=chk name=upper type=checkbox value=0> Заглавные буквы [A]<br />' +
'<input OnClick=OnCheck(0) class=chk name=lower type=checkbox value=1> Маленькие буквы [a]<br />' +
'<input OnClick=OnCheck(0) class=chk name=speci type=checkbox value=0> Спецсимволы [!]<br />' +
'<input OnClick=OnCheck(0) class=chk name=digit type=checkbox value=2> Цифры [0]<br />' +
'По шаблону:<br />' +
'<input OnClick=OnCheck(1) name=gettempl size=10 maxlength=20 type=text value=""><br />' +
'Длина пароля: ' +
'<select name=numbers>');
for (j = 4; j <= 19; j++) { writeln('<option value=' + j + ((j==10)?' selected':'')+'>' + j + '</option>'); }
writeln('</select>' +
'<input type=button value=Сгенерировать onClick=generate()><br><br>Ваш пароль:<BR>' +
'</table>');
for(j=0;j<10;j++)
{
ne = 'gb'+j;
writeln('<input name='+ne+' size=25 maxlength=30 type=text value=""><br />');
}
writeln('</form>');
}
// массивы символов
upp = new Array('','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
low = new Array('','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
dig = new Array('','0','1','2','3','4','5','6','7','8','9');
spe = new Array('','~','@','#','$','%','&','*','+','=','!');
// ------------------------------------------------------------------------------
function ccl(a){window.clipboardData.setData('text', eval('document.myform.gb'+a+'.value'));}
// -----------------------------------------f------------------------------------
function OnCheck(b)
{
if(b)
{
document.myform.upper.checked=0;
document.myform.lower.checked=0;
document.myform.digit.checked=0;
document.myform.speci.checked=0;
}else
document.myform.gettempl.value = '';
}
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
function rnd(x,y,z) {
var num;
do {
num = parseInt(Math.random()*z);
if (num >= x && num <= y) break;
} while (true);
return(num);
}
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
function genArray() {
var pwd = '';
var res, s;
var k = 0;
var n = document.myform.numbers.value;
var tn = document.myform.gettempl.value;
if (myform.gettempl.value.length>0)
n = tn.length;
var pass = new Array();
var w = rnd(30,80,100);
if (tn.length>0)
{
for(var r = 0; r<tn.length; r++)
{
i = tn.substr(r,1);
switch(i)
{
case 'A':
res = rnd(1,26,100);
pwd += upp[res];
break;
case 'a':
res = rnd(1,26,100);
pwd += low[res];
break;
case '!':
res = rnd(1,10,100);
pwd += spe[res];
break;
case '0':
res = rnd(1,10,100);
pwd += dig[res];
break;
default:
pwd += i;
}
}
}else
{
for (var r = 0; r < w; r++) {
if (myform.upper.checked) { res = rnd(1,26,100); pass[k] = upp[res]; k++; }
if (myform.lower.checked) { res = rnd(1,26,100); pass[k] = low[res]; k++; }
if (myform.digit.checked) { res = rnd(1,10,100); pass[k] = dig[res]; k++; }
if (myform.speci.checked) { res = rnd(1,10,100); pass[k] = spe[res]; k++; }
}
for (var i = 0; i < n; i++) {
s = rnd(1,k-1,100);
pwd+= pass[s];
}
}
return pwd;
}
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
function generate() {
if ((myform.upper.checked || myform.lower.checked || myform.speci.checked || myform.digit.checked) ||
(myform.gettempl.value.length>0))
{ for(i=0;i<10;i++){eval('document.myform.gb'+i+'.value=genArray()');} }
else { alert('Выберите символы, из которых будет состоять пароль'); myform.upper.checked = true; }
}
</script>
<img src="/images/n.png" alt="" /> <a href="index.html" />Назад</a><br/>
<img src="/images/h.png" alt="" /> <a href="/" />На главную</a><br/>
</div><div class="ads">
<script type="text/javascript" language="javascript" src="http://mk-dvig.tk/reklama.php"></script></div>
<div class="copy"><script type="text/javascript">document.write(copy);</script></div>
<div class="stat"><script type="text/javascript">document.write(banners);</script></div><small>
<script language="JavaScript" type="text/javascript" src="http://free-one.ru/xml_gzip_status.php"></script>
</small></body></html>