eval 本地覆盖的简单测试
测试网址:aHR0cDovL3d3dy5zYy4xMDA4Ni5jbi9zZXJ2aWNlL2xvZ2luLmh0bWw=
eval:
(function () {
'use strict';
window._eval = window.eval
function myeval(src) {
if(/debugger/gi.test(src))
{
return;
}
return window._eval(src)
}
Object.defineProperty(window, 'eval', {
value: myeval
})
})();
Function.prototype.constructor:
Function.prototype.constructor_ = Function.prototype.constructor;
Function.prototype.constructor = function(){
if(arguments[0].indexOf("debu") != -1){
return
}
return Function.prototype.constructor_.apply(this, arguments)
}