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

}

相关推荐
郏国上17 小时前
node.js上传图片接口
开发语言·node.js
SEO-狼术17 小时前
Stimulsoft Reports.JS 2025
开发语言·javascript·ecmascript
机器学习之心HML18 小时前
MATLAB基于GWO-BP神经网络对某拨叉件锻造金属流动性的参数分析
开发语言·神经网络·matlab
Cg1362691597418 小时前
多态的定义
java·开发语言
weixin_466818 小时前
编程之python基础
开发语言·python
微信api接口介绍18 小时前
微信社群管理开发
java·开发语言·网络·微信
打酱油的;18 小时前
【无标题】
爬虫·python·php
渣哥18 小时前
用错注入方式?你的代码可能早就埋下隐患
javascript·后端·面试
一枚前端小能手18 小时前
🔍 重写vue之ref和reactive
前端·javascript·vue.js
csbysj202018 小时前
PHP 类型比较
开发语言