js hook eval

 

 

复制代码
//配合编程猫专用工具进行hook
(function() { 
'use strict';

//过 瑞数 debuger 
var eval_ = window.eval;
window.eval = function(x){
    eval_(x.replace("debugger;","  ; "));
};
//过 瑞数 debuger检测
window.eval.toString = eval_.toString;
})();
复制代码

 

 

 

复制代码
// ==UserScript==
// @name         hook_eval
// @namespace    http://www.exsample.com
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://*
// @match        https://*
// @grant        none
// ==/UserScript==
(function () {
    'use strict';

    if (window.__cr_eval)
        return;

    window.__cr_eval = window.eval

    function myeval(src) {
        if(src.length>1000)
        {
            debugger;
        }
        return window.__cr_eval(src)
    }

    Object.defineProperty(window, 'eval', {
        value: myeval
    })
})();
复制代码

 

posted @   AngDH  阅读(499)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示