-
-
Save n-kb/3a7c7a76e20df6bead55 to your computer and use it in GitHub Desktop.
PASSWORD MAKER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML> | |
<body> | |
<script> | |
function hash() { | |
s = document.getElementById("quote").value; | |
h = [] | |
f = "" | |
for (index = 0; index < s.length; ++index) { | |
c = s[index]; | |
if (c.match(/[a-z]/i)) { | |
c = c.toLowerCase(); | |
h.push(c) | |
} | |
} | |
h.sort(); | |
prev_c = "0"; | |
c_count = 0; | |
for (index = 0; index <= h.length; ++index) { | |
c = h[index]; | |
if (prev_c == c) { | |
c_count++; | |
} else { | |
if (index > 0) { | |
f += (c_count + 1).toString() + prev_c | |
} | |
c_count = 0; | |
} | |
prev_c = c; | |
} | |
alert(f); | |
} | |
</script> | |
<input id="quote" type="text"> | |
<input type="submit" onclick="hash()"> | |
</body> | |
</HTML> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment