js hook-eval

// ==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
    })
})();
原文地址:https://www.cnblogs.com/angdh/p/14603981.html