javascript解密游戏,老鸟飞过,新手来玩
初学javascript,找了一些小游戏玩,觉得还不错,代码如下
function checkPass(password) {
var total = 0;
var charlist = "abcdefghijklmnopqrstuvwxyz";
for (var i = 0; i < password.length; i++) {
var countone = password.charAt(i);
var counttwo = (charlist.indexOf(countone));
counttwo++;
total *= 17;
total += counttwo;
}
if (total == 248410397744610) {
setTimeout(
"location.replace('index.php?password=" + password + "');", 0)
} else {
alert(
"Sorry, but the password was incorrect.");
}
}
给出正确答案 gctkyo 的一半{:soso_e113:}
如果有小伙伴解不出的话,再给出解题代码,
提示:目测不出来,用javascript解决,如果位置有两种可能优先考虑大位置 :D菜鸟表示压力很大混不下去,入侵才是真理,技术都是浮云
页:
[1]