Mein PW Generator Funkt leider nicht
Hier die url
http://habbo-pserver.de.tl/Passwortgenerator.htm
Code: <script type="text/javascript">
function getRandomNum(lbound, ubound) {
return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}
function getRandomChar(number, lower, upper, other, extra) {
var numberChars = "0123456789";
var lowerChars = "abcdefghijklmnopqrstuvwxyz";
var upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var otherChars = "`~!@#$%^&*()-_=+[{]}|;:'",<.>/? ";
var charSet = extra;
if (number == true)
charSet += numberChars;
if (lower == true)
charSet += lowerChars;
if (upper == true)
charSet += upperChars;
if (other == true)
charSet += otherChars;
return charSet.charAt(getRandomNum(0, charSet.length));
}
function getPassword(length, extraChars, firstNumber, firstLower, firstUpper, firstOther,
latterNumber, latterLower, latterUpper, latterOther) {
var rc = "";
if (length > 0)
rc = rc + getRandomChar(firstNumber, firstLower, firstUpper, firstOther, extraChars);
for (var idx = 1; idx < length; ++idx) {
rc = rc + getRandomChar(latterNumber, latterLower, latterUpper, latterOther, extraChars);
}
return rc;
}
function loopit(counter) {
tStr = "";
for(i=0; i<counter; i++) {
tStr = tStr + getPassword(document.myform.passwordLength.value, document.myform.extraChars.value,
document.myform.firstNumber.checked, document.myform.firstLower.checked,
document.myform.firstUpper.checked, document.myform.firstOther.checked,
document.myform.latterNumber.checked, document.myform.latterLower.checked,
document.myform.latterUpper.checked, document.myform.latterOther.checked) + "n";
}
document.myform.password.value = tStr;
}
</script>
<h2>Password Generator</h2>
<p>Einfach die gewünschte Anzahl an zu erzeugenden Passworten eingeben und schon erscheint eine möglichst obskure Liste von Passwörtern. Da diese via JavaScript in Ihrem Browser erzeugt werden, ist auch keines der Passwörter über das Internet gewandert.</p>
<table width="80%" border="0" summary="">
<tr align="center">
<td>
<form name="myform">
<table border="0" summary="">
<tr>
<td>Erstes Zeichen aus:</td>
<td><input type="checkbox" name="firstNumber" checked="checked" />Zahlen <input type="checkbox" name="firstLower" checked="checked" />Kleinbuchstaben <input type="checkbox" name="firstUpper" checked="checked" />Großbuchstaben <input type="checkbox" name="firstOther" />Sonderzeichen</td>
</tr>
<tr>
<td>Weitere Zeichen aus:</td>
<td><input type="checkbox" name="latterNumber" checked="checked" />Zahlen <input type="checkbox" name="latterLower" checked="checked" />Kleinbuchstaben <input type="checkbox" name="latterUpper" checked="checked" />Großbuchstaben <input type="checkbox" name="latterOther" />Sonderzeichen</td>
</tr>
<tr>
<td>Passwort Länge:</td>
<td><input type="text" name="passwordLength" value="8" size="3" /></td>
</tr>
<tr>
<td>Passwort Anzahl:</td>
<td><input type="text" name="passwordCount" size="3" value="1" /></td>
</tr>
<tr>
<td>Zusätzliche Zeichen:</td>
<td><input type="text" name="extraChars" size="20" /></td>
</tr>
<tr align="left">
<td>Neue Passwörter:</td>
<td><textarea name="password" cols="20" rows="4"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="button" value="erzeugen" onclick="loopit(document.myform.passwordCount.value);" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>