声明
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
环境部分
const jsdom = require('jsdom');
const {JSDOM} = jsdom;
const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`, {
url: ''
});
window = dom.window;
XMLHttpRequest = window.XMLHttpRequest;
Storage=window.Storage
localStorage=window.localStorage
document = window.document; //document对象:代表给定浏览器窗口中的HTML文档,
关键执行代码
function getJdeid() {
m = y
v = ""
u = 99992
b = _st['getSensorInfo'](devcInfo, "")
w = {};
w.si = jsid
w.lang = s
// l=fp='8SMWKDn7NI2elX60'
l = st
w.tk = _l(i_RjUKT(i_FTYYY(i_Tkknm(g + i_ingrg(_C, jsid['length'], 4), jsid), a_ingrg(_C, l["length"], 4)) + l, a_ingrg(_C, "", 6)) + "" + JSON.stringify(m) + _k(x), u, v)
w.ct = a_EFLCI(_l, i_Tkknm(i_Tkknm(i_HySvY(_k, i_PCmbJ(g, 19)), _C(jsid["length"], 4)), jsid) + b + g, u, v)
w.version = 2
w.client = "m"
return w
}
function getVerify(new_track, jsid, st, fp,account) {
t = {
"ht": 179,
"wt": 290,
"bw": 50
}
t = JSON.stringify(t)
c = jsid
s = 1
u = 99992
devcInfo = d = _T(dddddddddddd)
console.log(d)
p = "m"
console.log(t)
v = ""
t = encodeURI(t)
g = Date.parse(new Date + "")
clickTime = Date.now()
touchTime = clickTime + getRandomNumber(3000, 4500)
x = g % 41
y = {}
m = y
b = _st['getSensorInfo'](d, "")
w = {};
w.si = jsid
w.lang = s
w.tk = _l(i_RjUKT(i_FTYYY(i_Tkknm(g + i_ingrg(_C, jsid['length'], 4), jsid), a_ingrg(_C, l["length"], 4)) + l, a_ingrg(_C, t.length, 6)) + t + JSON.stringify(m) + _k(x), u, v)
w.ct = a_EFLCI(_l, i_Tkknm(i_Tkknm(i_HySvY(_k, i_PCmbJ(g, 19)), _C(jsid["length"], 4)), c) + b + g, u, v)
w.version = 2
w.client = "m"
// console.log(w)
return w
}
function genUuid() {
return (new Date).getTime() + "" + parseInt(2147483647 * Math.random())
}
function genHash(e) {
var t, r = 1, i = 0;
if (e)
for (r = 0,
t = e.length - 1; t >= 0; t--)
r = 0 !== (i = 266338304 & (r = (r << 6 & 268435455) + (i = e.charCodeAt(t)) + (i << 14))) ? r ^ i >> 21 : r;
return r
}
function getWqmnx1() {
e=(function(e, t, r) {
p=[
"QWYOREUOCDSIOHF)#U*HF&!(&)(H)RH)%",
"HWYOREF)#U*Q)(H)RCDSHF&!(&)%UOIOH"
]
for (var o = "", n = 0, i = 0; i < t.pick.length; i++) {
var a = t.pick[i];
n += Math.pow(2, a),
o += e[a]
}
o += p[parseInt(r) - 1];
for (var c = t.divisor, s = t.remainder, d = [r, n.toString().length, n, c, s], m = s; m < o.length; m += c)
d.push(o[m]);
return d.join("")
}(n = [], function(e) {
for (var t = [], r = 0; r < e; r++)
t.push(r);
var o = Math.floor(10 * Math.random());
return o < 5 && (o += 5),
{
pick: t,
divisor: o,
remainder: Math.floor(Math.random() * o) % o
}
}(n.length), "01"))
if (window.btoa)
return window.btoa(e);
for (var t, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), o = [], n = 0; n < e.length; n += 3)
3 === (t = e.substr(n, 3).split("").map(function(e) {
return e.charCodeAt()
})).length ? o.push(r[63 & t[0] >>> 2], r[63 & (t[0] << 4 | t[1] >>> 4)], r[63 & (t[1] << 2 | t[2] >>> 6)], r[63 & t[2]]) : 2 === t.length ? o.push(r[63 & t[0] >>> 2], r[63 & (t[0] << 4 | t[1] >>> 4)], r[63 & t[1] << 2], "=") : 1 === t.length && o.push(r[63 & t[0] >>> 2], r[63 & t[0] << 4], "=", "=");
return o.join("")
}
function getJda_Jdb() {
s = parseInt((new Date).getTime() / 1e3)
i=genUuid()
e=t=s
r = genHash("jd.com")
l=c=1
p="direct"
jda=[r, i, e, t, s, c || 1].join(".")
jdb=[r, l, i + "|" + c, s].join(".")
jdc=r
var I = [r, p || "direct", "-" || "-", 'none' || "none", '-' || "-", (new Date).getTime()].join("|");
I=encodeURIComponent(I)
return {'jda':jda,'jdb':jdb,'jdc':r,'jdv':I,"mba_muid":encodeURI([i].join(".")),'shshshfpx':encodeURIComponent(__0x1e511c()),"Wqmnx1":escape(getWqmnx1()),
'jxsid':escape((new Date).getTime() + String(Math.random()).substr(2, 7)),"appCode":escape("ms0ca95114")}
}
结果