声明: 本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!wx a15018601872 本文章未经许可禁止转载,禁止任何修改后二次传播,擅自使用本文讲解的技术而导致的任何意外,作者均不负责,若有侵权,请联系作者立即删除!q 2766958292
1.逆向过程
1.1. 补环境
这是开头。下面的随便加点就行了。
html = `<!DOCTYPE html><p>Hello world</p>`;
const dom = new JSDOM(html, {
url: '#',
cookieJar: cookieJar,
pretendToBeVisual: true,
referrer: '#',
contentType: 'text/html',
// resources: resourceLoader,
});
delete __filename
delete __dirname
delete global
// window
window = dom.window;
window.GlobalSearchCriteria={}
window.Groza=""
window.origin = ####
1.2.bug排查
debug这两个地方发现检测了process还有window。本来以为就要好了结果还是不行。最后发现是ua检测了果然往往最简单的细节是最难引起注意到。把navigator全部补上就好了替换jsdom。
opt=Object.prototype.toString
Object.prototype.toString=function toString(){
temp=opt.apply(this,arguments)
return temp
};this.func_set_natvie(Object.prototype.toString)
fpt=Function.prototype.toString
Function.prototype.toString=function toString(){
temp=fpt.apply(this,arguments)
return temp
};this.func_set_natvie(Function.prototype.toString)
1.3.结果
编辑
1.4.总结
1.出于安全考虑,本章未提供完整流程,调试环节省略较多,只提供大致思路,具体细节要你自己还原,相信你也能调试出来。