Skip to content

Instantly share code, notes, and snippets.

@64lines
Created January 10, 2014 15:58
Show Gist options
  • Save 64lines/8356967 to your computer and use it in GitHub Desktop.
Save 64lines/8356967 to your computer and use it in GitHub Desktop.
var password = "";
function generateKeys(i, j, k, l, n) {
if (i == n) {
return;
}
password = i + "" + j + "" + "" + k + "" + l;
if (l < n) {
l++;
}
if (l == n) {
k++;
l = 0;
}
if (k == n) {
k = 0;
j++;
}
if (j == n) {
j = 0;
i++;
}
generateKeys(i, j, k, l, n);
}
generateKeys(0, 0, 0, 0, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment