http://www.hackerskills.com
终于过第9关了,high.这一关还是蛮有意思的.忍不住把答案贴出来,别怪我哦….
这一关不能用FireFox查看他的源代码,不然有些东西会看不见.老老实实用IE打开第9关(Http://www.hackerskills.com/phat.php?user=zadmin&pwd=stebbins (说明:虽然他用的post提交的form,估计后台是直接Request(”user”),所以这里直接在url里附加参数是可以的)) , ->查看源代码,notepad出现滚动条!!激动了吧.拖到最后.
“Z2F6ZWJydWg= add a page extention to that”.
这个=得好好考虑一下了,”=添加一个后缀”?说不通呀!除非是编码,一查,很简单嘛,base64编码而已.剩下的工作就是解码喽.easy.虽然我也是第一次接触base64.
附上JS的base64解码代码
(ps:也可以直接访问下面链接(代码盒子)http://www.yusea.cn/testbox/default.asp?box=base64!!!)
var base64EncodeChars = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/”;
var base64DecodeChars = new Array(
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
function base64decode(str) {
var c1, c2, c3, c4;
var i, len, out;
len = str.length;
i = 0;
out = “”;
while(i > 4));
/* c3 */
do {
c3 = str.charCodeAt(i++) & 0xff;
if(c3 == 61)
return out;
c3 = base64DecodeChars[c3];
} while(i > 2));
/* c4 */
do {
c4 = str.charCodeAt(i++) & 0xff;
if(c4 == 61)
return out;
c4 = base64DecodeChars[c4];
} while(i = 0×0001) && (c 0×07FF) {
out += String.fromCharCode(0xE0 | ((c >> 12) & 0×0F));
out += String.fromCharCode(0×80 | ((c >> 6) & 0×3F));
out += String.fromCharCode(0×80 | ((c >> 0) & 0×3F));
} else {
out += String.fromCharCode(0xC0 | ((c >> 6) & 0×1F));
out += String.fromCharCode(0×80 | ((c >> 0) & 0×3F));
}
}
return out;
}
alert(base64decode(”Z2F6ZWJydWg=”))