检测代码被格式化

 

 

 

RegExp = function RegExp(str){

    this.flag = false;

    debugger;

    if(str== `\\w+ *\\(\\) *{\\w+ *['|"].+['|"];? *}`){
        this.flag =true;
        
    }
};

RegExp.prototype.test = function test(str){

        this.flag;
        if (this.flag){
              debugger
            return true;
        }
  
};


var _0x1037b7 = {
    'removeCookie': function() {
        return 'dev';
    }
};

var _0x3825a3 = function() {
    var _0x4723ee = new RegExp('\\w+ *\\(\\) *{\\w+ *[\'|"].+[\'|"];? *}');
    return _0x4723ee['test'](_0x1037b7['removeCookie']['toString']());
};

_0x1037b7['updateCookie'] = _0x3825a3;
var _0x33a47e = '';
var _0x158ccc = _0x1037b7['updateCookie']();

console.log(_0x158ccc);

 

posted @ 2023-08-02 16:29  AngDH  阅读(21)  评论(0编辑  收藏  举报