爬虫f12跳转和debugger检测

在空白页面的控制台运行解决重定向再复制url到网页

//解决重定向

bash 复制代码
(() => {

    window.onbeforeunload= ()=>{
        debugger;
        return false;
    }

})();

//构造方法无限debugger

bash 复制代码
(() => {

    Function.prototype.constructor = Function.prototype.constructor;
    Function.prototype.constructor = function(){
        if(arguments && typeof arguments[0] === 'string'){
            if ("debugger" === arguments[0]){
                return null
            }
            return Function.prototype.constructor_.apply(this,arguments);
        }
    }

})();

//药监局过debugger 在网站第二个debugger加载之前运行

var _constructor = constructor;

Function.prototype.constructor = function(s) {

if (s == "debugger") {

console.log(s);

return null;

}

return _constructor(s);

}

相关推荐
jingling5551 小时前
【Vue3 实战】插槽封装与懒加载
前端·javascript·vue.js
??? Meggie1 小时前
【Python】保持Selenium稳定爬取的方法(防检测策略)
开发语言·python·selenium
酷爱码3 小时前
如何通过python连接hive,并对里面的表进行增删改查操作
开发语言·hive·python
画个大饼3 小时前
Go语言实战:快速搭建完整的用户认证系统
开发语言·后端·golang
喵先生!4 小时前
C++中的vector和list的区别与适用场景
开发语言·c++
Thomas_YXQ4 小时前
Unity3D Lua集成技术指南
java·开发语言·驱动开发·junit·全文检索·lua·unity3d
xMathematics5 小时前
计算机图形学实践:结合Qt和OpenGL实现绘制彩色三角形
开发语言·c++·qt·计算机图形学·cmake·opengl
Freedom风间6 小时前
前端优秀编码技巧
前端·javascript·代码规范
MinggeQingchun6 小时前
Python - 爬虫-网页解析数据-库lxml(支持XPath)
爬虫·python·xpath·lxml
萌萌哒草头将军6 小时前
🚀🚀🚀 Openapi:全栈开发神器,0代码写后端!
前端·javascript·next.js