作者 论 坛账号:周易
解压文件,得到
番外篇.js
。打开文件,如图所示。由题目描述或de4js易得此为
JSFuck
处理过的。
番外篇一很简单,直接使用de4js或利用控制台即可还原。
还原后代码如下:
复制代码 隐藏代码function _52pojie_MMXXI_(t) {
let e = [];
for (let f of t) {
let t = f.codePointAt(0),
h = 0;
t -= 0x1d4 << 0x1c8, "bkd0egfw002whccadqf6gm0q3mi2".match(/../g).forEach(f => {
f = parseInt(f, 0x24), t >= f && t < f + 0x1A && e.push(h % 7), h++
})
}
let f = [];
for (; e.length >= 3;) {
let t = 0x31 * e.shift();
if (t += 7 * e.shift(), (t += e.shift()) > 0xff) break;
f.push(t)
}
return new Uint8Array(f);
const flag1 = 'n0w_wh3r3_1s_th3_c1ph3rt3xt?'
}
容易看出flag1为
n0w_wh3r3_1s_th3_c1ph3rt3xt?
。
我们分析函数
_52pojie_MMXXI_
,不难发现上半部分使用到了Unicode字符。不妨改造代码将其打印,结果如下:
复制代码 隐藏代码t = 0x1d4 << 0x1c8, "bkd0egfw002whccadqf6gm0q3mi2".match(/../g).forEach(f => {
f = parseInt(f, 0x24);
for (let i = 0; i < 26; i++) {
document.write(String.fromCodePoint(t + f + i))
}
document.write('<br>')
})
复制代码 隐藏代码