# 反调试

所谓反调试就是在网站中嵌入 debugger,然后对控制台进行检测,若打开了控制台则进入无限 debugger;

解决方案:

  • 直接右键 never pause here
  • 若采用定时器的形式调用,将其置空
setInterval = function(){}
    
//f12 打开断住后输入,再跳过 debugg,就不卡了
for (var i = 1; i < 99999; i++) window.clearInterval(i);
  • 若在原型链上

    f=Function;
    Function=function(a){
        if(a!=='debugger'){return f(a)}};
    Function.prototype.constructor_=Function.prototype.constructor;
    Function.prototype.constructor=function(x){
        if(x!=='debugger'){return Function.prototype.constructor_(x)}}
  • 若位 eval 调用,hook 一下即可

eval_=eval;
eval=function(a){if(a=='debugger'){return ""}else{return eval_(a)}}
Edited on

Give me a cup of [coffee]~( ̄▽ ̄)~*

Mr2 WeChat Pay

WeChat Pay