首先 打开Devtools监听请求 正常过关 捕捉到提交成绩的请求 很明显 这个style是伪造的api接口 并且数据加密

那么 根据他的发起程序来看看真实数据加密的函数

打上断点 重新正常通关 断点成功触发

然而 第一层的请求数据已经是加密的了 那么就需要往深处追查
在追查时遇到了Promise 导致参数,局部变量无法获取 那么重新打断点

再次正常过关 断点也触发了
根据调用堆栈一路追查 最后发现了真实的提交数据的函数


这里的参数u 就是真实成绩 而函数H 则是加密并提交成绩的函数
用虚假的u调用H函数直接提交虚假的成绩试试看 虽然这里的t可能是某种校验 不过我们先试试

没想到 居然直接就提交成功了
那么这次逆向的总结就是跟着调用堆栈一路追查下去 找到原始的提交数据逻辑 这样就能忽略掉所有的数据加密
附:
该游戏加密逻辑:
async function H(t, u, e) {
if (!V())
return;
const r = e ? "hua" : ""
, n = t ? "xian" : ""
, i = [];
for (let h = 0; h < 4; h += 1)
i.push(Number.parseInt(String(t).substr(h * 6, 6), 16).toString(36));
const o = Date.now()
, c = Math.round(u * 1e3).toString(36)
, a = L("".concat(t, "_xn_").concat(Math.round(u * 1e3).toString(16), "_").concat(e).concat(String.fromCharCode(13)).concat(o.toString(36)))
, l = [];
for (let h = 0; h < 4; h += 1)
l.push(Number.parseInt(String(a).substr(h * 8, 8), 16).toString(36));
const C = [Math.random().toString(20).substr(2, 6), l[0], i[1], l[1], Math.random().toString(21).substr(3, 5), i[3], Math.random().toString(22).substr(2, 7), i[2], l[2], l[3], Math.random().toString(23).substr(4, 4), i[0], Math.random().toString(24).substr(3, 8), c, Math.random().toString(25).substr(5, 3), o.toString(36)];
B().post([j, "".concat(r).concat(n), "style"].join("/"), {
version: C.join(String.fromCharCode(12))
})
}