声明
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
关键代码
adefault = function (e) {
var r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var t = Math.random().toString(16).slice(-4);
if (e <= 4)
return t.slice(0, e);
for (var n = "", o = 0; o < e - t.length; o++) {
var i = Math.ceil(Math.random() * (r.length - 1));
n += r[i]
}
return t + n
}
function headers(transactionID, data) {
window.GlobalSearchCriteria['transactionID'] = transactionID
sign('oBTp')
f = sign("SXXA")
_sign = Object(f.a)(data)
token = _P(data)
return {'token': token['token'], 'sign': _sign['sign']}
}
function getPrefix() {
return e = "".concat(Date.now(), ".").concat((0,
adefault)(12))
console.log(getBfa())
// console.log(document.cookie)
function convertCookiesStringToArray(cookiesString) {
// 去除末尾的分号并按分号拆分字符串
const cookiesArray = cookiesString.replace(/;$/, '').split(';');
// 将拆分后的字符串转换为键值对数组
const customCookies = cookiesArray.map(cookie => cookie.trim());
return customCookies;
}
补环境部分
const jsdom = require('jsdom');
const crypto = require('crypto');
const {JSDOM} = jsdom;
const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`, {
url: ''
});
window = dom.window;
document = window.document; //document对象:代表给定浏览器窗口中的HTML文档,
navigator = window.navigator; // 关于运行当前脚本的应用程序的相关信息
location = window.location; //对象包含当前页面的URL信息
history = window.history; // 历史会话
screen = window.screen; // 浏览器屏幕
setInterval = function () {
}
setTimeout = function () {
}