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

}

相关推荐
wjs202410 分钟前
状态模式(State Pattern)
开发语言
我命由我1234514 分钟前
Kotlin 数据容器 - List(List 概述、创建 List、List 核心特性、List 元素访问、List 遍历)
java·开发语言·jvm·windows·java-ee·kotlin·list
liulilittle14 分钟前
C++ TAP(基于任务的异步编程模式)
服务器·开发语言·网络·c++·分布式·任务·tap
励志要当大牛的小白菜2 小时前
ART配对软件使用
开发语言·c++·qt·算法
灵感__idea3 小时前
JavaScript高级程序设计(第5版):好的编程就是掌控感
前端·javascript·程序员
爱装代码的小瓶子4 小时前
数据结构之队列(C语言)
c语言·开发语言·数据结构
Maybe_ch5 小时前
.NET-键控服务依赖注入
开发语言·c#·.net
超浪的晨5 小时前
Java UDP 通信详解:从基础到实战,彻底掌握无连接网络编程
java·开发语言·后端·学习·个人开发
终焉暴龙王5 小时前
CTFHub web进阶 php Bypass disable_function通关攻略
开发语言·安全·web安全·php
hui函数6 小时前
掌握JavaScript函数封装与作用域
前端·javascript