Last active
December 18, 2015 20:29
-
-
Save akimasa/5840717 to your computer and use it in GitHub Desktop.
EpisoPassのパスワードの候補を全部コンソールに吐き出すコード。
使うときは パスワード生成ページを保存して、最後の方の</script>前に投入
This file contains hidden or 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
console.log($("#pass").val()); | |
ansmax = []; | |
answer = []; | |
for(j=0;data.qas.length>j;j++){ | |
ansmax[j]= data.qas[j].answers.length-1; | |
answer[j]=0; | |
} | |
outer: | |
for(;;){ | |
carry = 1; | |
for(i=0;i<answer.length;i++){ | |
if(carry) | |
answer[i]++; | |
if(answer[i] > ansmax[i] && i == (answer.length-1)){ | |
break outer; | |
} | |
if(answer[i] > ansmax[i]){ | |
for(j=0;j<=i;j++){ | |
answer[j] = 0; | |
} | |
carry = 1; | |
} else { | |
carry = 0; | |
} | |
} | |
calcpass(); | |
console.log($("#pass").val()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment