1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<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;
}
//-->
</script>
<table align=center width=100%>
<tr align=center>
<td>
<form name="myform">
<table border=0 width=100%>
<tr>
<td>
<p align="center">Erste Zeichen können ein:
</td>
<td nobr>
<p align="center">
<input type=checkbox name=firstNumber checked value="ON">Nummer
<input type=checkbox name=firstLower checked value="ON">Kleinschrift
<input type=checkbox name=firstUpper checked value="ON">Grosschrift
<input type=checkbox name=firstOther value="ON">Andere
</td>
</tr>
<tr>
<td>
<p align="center">Letzte Zeichen können sein:
</td>
<td nobr>
<p align="center">
<input type=checkbox name=latterNumber checked value="ON">Nummer
<input type=checkbox name=latterLower checked value="ON">Kleinschrift
<input type=checkbox name=latterUpper checked value="ON">Grosschrift
<input type=checkbox name=latterOther value="ON">Andere
</td>
</tr>
<tr>
<td>
<p align="center">Passwortlänge:
</td>
<td>
<p align="center">
<input type=text name=passwordLength value="8" size=3>
</td>
</tr>
<tr>
<td>
<p align="center">Extra Passwort-Zeichen:
</td>
<td>
<p align="center">
<input type=text name=extraChars size=20>
</td>
</tr>
</table>
</td>
</tr>
<tr align=center>
<td>
Neues Passwort: <br>
<input type=text name=password size=20>
<br>
<input type=button value="Erzeuge Passwort" onClick="document.myform.password.value =
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);">
</form>
</td>
</tr>
</table>
|