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

}

相关推荐
it_remember1 小时前
新建一个reactnative 0.72.0的项目
javascript·react native·react.js
敲代码的小吉米2 小时前
前端上传el-upload、原生input本地文件pdf格式(纯前端预览本地文件不走后端接口)
前端·javascript·pdf·状态模式
Blossom.1182 小时前
使用Python实现简单的人工智能聊天机器人
开发语言·人工智能·python·低代码·数据挖掘·机器人·云计算
da-peng-song2 小时前
ArcGIS Desktop使用入门(二)常用工具条——数据框工具(旋转视图)
开发语言·javascript·arcgis
galaxy_strive2 小时前
qtc++ qdebug日志生成
开发语言·c++·qt
火龙谷2 小时前
【爬虫】DrissionPage-4
爬虫
TNTLWT2 小时前
Qt功能区:简介与安装
开发语言·qt
等等5433 小时前
Java EE初阶——wait 和 notify
java·开发语言
低代码布道师4 小时前
第五部分:第一节 - Node.js 简介与环境:让 JavaScript 走进厨房
开发语言·javascript·node.js
API小爬虫4 小时前
淘宝按图搜索商品(拍立淘)Java 爬虫实战指南
java·爬虫·图搜索算法