当前位置: 首页> 教育> 培训 > 手机软件开发培训学校_建立公司网站步骤_百度秒收录_seo搜索引擎优化原理

手机软件开发培训学校_建立公司网站步骤_百度秒收录_seo搜索引擎优化原理

时间:2025/9/11 23:39:23来源:https://blog.csdn.net/qq_38042891/article/details/144547012 浏览次数:0次
手机软件开发培训学校_建立公司网站步骤_百度秒收录_seo搜索引擎优化原理

一.js hook 过无限debugger

var _constructor = constructor;
Function.prototype.constructor = function(s) {if (s == "debugger") {console.log(s);return null;}return _constructor(s);
}//去除无限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);
};var _Function = Function;
Function = function(s) {if (s == "debugger") {console.log(s);return null;}return _Function(s);
}

二.过debugger—1 constructor 构造器构造出来的

var _constructor = constructor;
Function.prototype.constructor = function(s) {if (s == "debugger") {console.log(s);return null;}return _constructor(s);
}

三.过debugger—2 eval的

(function() {'use strict';var eval_ = window.eval;window.eval = function(x) {eval_(x.replace("debugger;", "  ; "));};window.eval.toString = eval_.toString;
}
)();

四.过debugger 阿布牛逼


function Closure(injectFunction) {return function() {if (!arguments.length)return injectFunction.apply(this, arguments)arguments[arguments.length - 1] = arguments[arguments.length - 1].replace(/debugger/g, "");return injectFunction.apply(this, arguments)}
}var oldFunctionConstructor = window.Function.prototype.constructor;
window.Function.prototype.constructor = Closure(oldFunctionConstructor)
//fix native function
window.Function.prototype.constructor.toString = oldFunctionConstructor.toString.bind(oldFunctionConstructor);var oldFunction = Function;
window.Function = Closure(oldFunction)
//fix native function
window.Function.toString = oldFunction.toString.bind(oldFunction);var oldEval = eval;
window.eval = Closure(oldEval)
//fix native function
window.eval.toString = oldEval.toString.bind(oldEval);// hook GeneratorFunction
var oldGeneratorFunctionConstructor = Object.getPrototypeOf(function*() {}).constructor
var newGeneratorFunctionConstructor = Closure(oldGeneratorFunctionConstructor)
newGeneratorFunctionConstructor.toString = oldGeneratorFunctionConstructor.toString.bind(oldGeneratorFunctionConstructor);
Object.defineProperty(oldGeneratorFunctionConstructor.prototype, "constructor", {value: newGeneratorFunctionConstructor,writable: false,configurable: true
})// hook Async Function
var oldAsyncFunctionConstructor = Object.getPrototypeOf(async function() {}).constructor
var newAsyncFunctionConstructor = Closure(oldAsyncFunctionConstructor)
newAsyncFunctionConstructor.toString = oldAsyncFunctionConstructor.toString.bind(oldAsyncFunctionConstructor);
Object.defineProperty(oldAsyncFunctionConstructor.prototype, "constructor", {value: newAsyncFunctionConstructor,writable: false,configurable: true
})// hook dom
var oldSetAttribute = window.Element.prototype.setAttribute;
window.Element.prototype.setAttribute = function(name, value) {if (typeof value == "string")value = value.replace(/debugger/g, "")// 向上调用oldSetAttribute.call(this, name, value)
}
;
var oldContentWindow = Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype, "contentWindow").get
Object.defineProperty(window.HTMLIFrameElement.prototype, "contentWindow", {get() {var newV = oldContentWindow.call(this)if (!newV.inject) {newV.inject = true;core.call(newV, globalConfig, newV);}return newV}
})

转载地址:https://www.cnblogs.com/xiaoweigege/p/14954648.html

关键字:手机软件开发培训学校_建立公司网站步骤_百度秒收录_seo搜索引擎优化原理

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: