声明
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
有相关问题请第一时间头像私信联系我删除博客!
前言:
把之前失效的demo全部恢复一下,太久没搞逆向了,进了企业后其实没怎么干逆向。主要写xpath和逻辑代码。
逆向过程
部分补环境代码
html = `<!DOCTYPE html><p>Hello world</p>`;
const dom = new JSDOM(html, {});
delete __filename
delete __dirname
// window
window = dom.window;
window.CanvasRenderingContext2D=function CanvasRenderingContext2D(){
debugger
};this.func_set_natvie(window.CanvasRenderingContext2D)
self = window
XMLHttpRequest = window.XMLHttpRequest;
document = window.document; //document对象:代表给定浏览器窗口中的HTML文档,
navigator = window.navigator; // 关于运行当前脚本的应用程序的相关信息
location = window.location; //对象包含当前页面的URL信息
history = window.history; // 历史会话
screen = window.screen; // 浏览器屏幕
document.referrer = ""
localStorage = {}
localStorage.getItem = function getItem(key) {
return this[key]
};
localStorage.key = function key(index) {
return Object.keys(this)[index]
};
localStorage.removeItem = function removeItem(key) {
delete this[key]
};
localStorage.setItem = function setItem(key, value) {
this[key] = value
};
setInterval = function () {
}
setTimeout = function () {
}
Object.defineProperty(navigator,'userAgent',{
value:""
})
delete exports
delete module
之后就是扣代码调用api就行了