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

}

相关推荐
摇滚侠5 分钟前
《On Java 中文版 基础卷》阅读笔记 内部类 21
java·开发语言·笔记
番茄味城市甜菜6 分钟前
二叉树刷题(C语言)
c语言·开发语言
布莱克6057 分钟前
Swift 自动引用计数(ARC)详解:原理、循环引用与最佳实践
开发语言·ios·swift·arc·自动引用计数
FungLeo16 分钟前
FengCMS·PHP+MySQL 升级实录 ·本地容器环境设计:只读挂载、LOCAL_UID、数据卷权限
开发语言·mysql·docker·php·fengcms
蔓越莓曲奇19 分钟前
给 DeepSeek Harness 换上 GTA 6 皮肤:Agent 一干活,通缉星级就亮
前端·javascript·开源
geovindu34 分钟前
python: Random Forest
开发语言·后端·python·算法·随机森林
KevinWang_39 分钟前
iOS 开发计划(四) - 拆分模块
javascript
真上帝的左手1 小时前
2. 编程语言-Python-Anaconda
开发语言·python
.道阻且长.1 小时前
Linux基础IO:理解文件以及回顾C文件接口
linux·运维·服务器·c语言·开发语言·职场和发展
Risehuxyc4 小时前
PHP中如何将字符串转成字节数组,再异或成一个字节
开发语言·php