当前位置:网站首页 > 更多 > 涨姿势 > 正文

[每日一学] 利用js去除无限debugger

作者:CC下载站 日期:2022-03-14 00:00:00 浏览:52 分类:涨姿势

csdn看见的,还别说,挺好用

//去除无限debugger
Function.prototype.__constructor_back = Function.prototype.constructor ;
Function.prototype.constructor = function() {
    if(arguments && typeof arguments[0]==='string'){
        //alert("new function: "+ arguments[0]);
        if( "debugger" === arguments[0]){
            //arguments[0]="consoLe.Log(\"anti debugger\");";
            //arguments[0]=";";
            return
    }
    }
    return Function.prototype.__constructor_back.apply(this,arguments);
}

原文链接:https://blog.csdn.net/qq_39799322/article/details/119275806

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯