爬虫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);

}

相关推荐
snow@li13 分钟前
Java:微服务项目与单体项目区别、市场占有率全景深度分析
java·开发语言·微服务
吴声子夜歌20 分钟前
Java——性能和效率
java·开发语言
meilindehuzi_a25 分钟前
LangChain.js 对话 Memory 实战:History 持久化、截断与摘要压缩
java·javascript·langchain
小鹿的周先生40 分钟前
第四章-SpringAI-函数调用&ToolCalling
开发语言·人工智能·python
江畔柳前堤41 分钟前
具身智能全景深度指南(2026年9月版):从“会聊天的AI“到“能干活的机器“
大数据·javascript·图像处理·人工智能·分布式·智慧城市·原型模式
liuyicenysabel1 小时前
Grafana + Prometheus 分级告警配置设计(P0/P1/P2)
javascript·grafana·prometheus
神仙别闹1 小时前
基于C++ MFC 实现的智慧公交系统
开发语言·c++·mfc
秋田君1 小时前
Qt_webSocket协议编程实战
开发语言·qt·websocket
Cry丶1 小时前
Vue 3 业务管理页面实战:组件拆分、父子通信与弹窗复用
前端·javascript·vue.js·父子通信·组件拆分·弹窗复用
ttwuai1 小时前
Go 后台附件迁到对象存储后,path、cdnUrl 和 tenant_id 怎么一起验?
开发语言·后端·golang