js hook

Howhy Blogs / 2023-09-01 / 原文

(function(){
    var org=window.XMLHttpRequest.prototype.setRequestHeader;
    window.XMLHttpRequest.prototype.setRequestHeader = function(key,value){
        if(key='Hexin-V'){
            debugger;
        }
    return org.apply(this,arguments);
    };
})();
var AAA=Function.prototype.constructor

Function.prototype.constructor=function(x){
    if(X!="debugger"){
        return AAA(x)
    };
    return function(){};
}