<html>
<title>PINOYDOWN simple Wimax Password Generator</title>
<body>
<h2>PINOYDOWN simple Wimax Password Generator by greyhoundz</h2>
<input name="mac" id="mac" size="18" type="text" value="XX:XX:XX:XX:XX:XX">
<input name="generate" value="Generate" onclick="generate();" type="button">
<script type="text/javascript">
var add = [0x0C, 0x02, 0x11, 0x05, 0x10, 0x1F, 0x1C, 0x0A, 0x10, 0x14, 0x16, 0x01];
var subst = {0x3a: 0x7a, 0x3b: 0x79, 0x3c: 0x78, 0x3d: 0x77, 0x3e: 0x76, 0x3f: 0x75, 0x40: 0x74, 0x5b: 0x73, 0x5c: 0x72, 0x5d: 0x71, 0x5e: 0x70, 0x2d: 0x6f, 0x60: 0x6e};
function generate() {
var mac = document.getElementById(\'mac\').value.replace(/:/g, \'\').toUpperCase();
var password = document.getElementById(\'password\');
if (mac.search(/^[A-F0-9]{12}$/) == -1) {
password.innerHTML = \'invalid\';
} else {
var i;
var t;
var s = \'\';
for (i = 0; i < 12; i++) {
t = mac.charCodeAt(i) + add[i];
if (subst[t]) { t = subst[t]; }
s += String.fromCharCode(t);
}
password.innerHTML = \'2008\' + s + \'\';
}
}
</script>
<div id="password"></div>
</body>
</html>