写在最前,这不是博主的原创内容,来自武沛齐老师的相关老师课件在这里:
链接:https://pan.baidu.com/s/1968PeEmHDlnze-eCYVPrpQ?pwd=n51x
提取码:n51x
同时此篇文章不是为了教学,单纯是博主为了记录,捋清逻辑。
https://dun.163.com/trial/jigsaw
替换页面,打断点
有动态参数的存在,无法进行调试。
可以在charles中修改 load.min.js 文件,并对请求进行替换。
t = t.split("?")[0];
链接:https://pan.baidu.com/s/11gIbQFWC6QGLziWfr-4UPA?pwd=fe3l
提取码:fe3l
首先获取参数
获取关键参数,得到图片
id: 固定
dt: getconf请求返回dt
acToken: getconf请求返回token(有些情况时值不同,但按照相同携带没问题)
fp: 【需逆向】
cb: 【需逆向】
this:收缩整体
初步判断
关键字搜索,当然这里跟堆栈也可以
cb生成
'cb': g1(),
慢慢补咯
或者直接用jsdom
const jsdom = require("jsdom");
const {JSDOM} = jsdom;
const html = `<!DOCTYPE html><p>Hello world</p>`;
const dom = new JSDOM(html, {
url: "https://dun.163.com/trial/jigsaw",
referrer: "https://dun.163.com/",
contentType: "text/html"
});
document = dom.window.document;
window = global;
Object.assign(global, {
location: {
hash: "",
host: "dun.163.com",
hostname: "dun.163.com",
href: "https://dun.163.com/trial/jigsaw",
origin: "https://dun.163.com/",
pathname: "/trial/jigsaw",
port: "",
protocol: "https:",
search: "",
},
navigator: {
appCodeName: "Mozilla",
appName: "Netscape",
appVersion: "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
cookieEnabled: true,
deviceMemory: 8,
doNotTrack: null,
hardwareConcurrency: 4,
language: "zh-CN",
languages: ["zh-CN", "zh"],
maxTouchPoints: 0,
onLine: true,
platform: "Win32",
product: "Gecko",
productSub: "20030107",
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
vendor: "Google Inc.",
vendorSub: "",
webdriver: false
}
});
// 这个会让过程卡,所以设置为空
window.setTimeout = function (){};
脚本:
链接:https://pan.baidu.com/s/1J9xFuo76reTt1Z-ZyjTCAQ?pwd=tv2y
提取码:tv2y
fp的生成
搜索以后,慢慢往上找
这里是看调用堆栈关系
随后搜索fingerprint
debugger看哪个地方生成的
(function(){
'use strict';
var gdxidpyhxde = "";
Object.defineProperty(window, 'gdxidpyhxde', {
set: function(val) {
console.log('Hook值', val);
debugger;
gdxidpyhxde = val;
return val;
},
get: function()
{
return gdxidpyhxde;
}
});
})()
let fp = window.gdxidpyhxde;
console.log(fp);
链接:https://pan.baidu.com/s/1mWX53Bz1vh7uBQkmgZwFow?pwd=37z2
提取码:37z2
请求图片
搞定检测
看启动器
'data': JSON[DB(0x198)]({
'd': q(Q[DB(0x2cc)](':')),
'm': '',
'p': g0,
'f': q(j(J, g1[DB(0x2cc)](','))),
'ext': q(j(J, this[DB(0x72b)] + ',' + this[DB(0x81a)][DB(0x539)]))
})
'd':
p函数
f
unique2DArray
H
g6 = H(S(g5, [Math[aD(0x613)](E + J / 0x2), Math[aD(0x613)](g2 - (w + g0 / 0x2)), F[aD(0x69b)]() - this['beginTime']] + ''));
成功:
博主后来换了node 20版本给我报错了,猜测要19左右的版本。