您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Stops most anti debugging implementations by JavaScript obfuscaters, and stops the console logs from being automatically cleared.
当前为
- // ==UserScript==
- // @name Anti Anti-debugger
- // @namespace https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
- // @version 2
- // @description Stops most anti debugging implementations by JavaScript obfuscaters, and stops the console logs from being automatically cleared.
- // @author hacker09
- // @include *
- // @grant unsafeWindow
- // @run-at document-start
- // ==/UserScript==
- (function() {
- var interval = setInterval(function() { //Creates a new interval function
- unsafeWindow.console.clear = () => {}; //Stops the console logs from being cleared
- }, 0); //Finishes the set interval function
- window.onload = function() //When the page finishes loading
- { //Starts the onload function
- clearInterval(interval); //Breaks the timer that stops the console log from being cleared every 0 secs
- }; //Finishes the onload function
- if (location.href.match(/vidstream.pro|mcloud.to/) === null) //Check the iframe url
- { //Starts the if condition
- var _constructor = unsafeWindow.Function.prototype.constructor;
- unsafeWindow.Function.prototype.constructor = function() { //Hook Function.prototype.constructor
- var fnContent = arguments[0];
- if (fnContent) {
- if (fnContent.includes('debugger')) { //An anti-debugger is attempting to stop debugging
- var caller = Function.prototype.constructor.caller; // Non-standard hack to get the function caller
- var callerContent = caller.toString();
- if (callerContent.includes(/\bdebugger\b/gi)) { //Eliminate all debugger statements from the caller, if any
- callerContent = callerContent.replace(/\bdebugger\b/gi, ''); //Remove all debugger expressions
- eval('caller = ' + callerContent); //Replace the function
- }
- return (function() {});
- }
- }
- return _constructor.apply(this, arguments); //Execute the normal function constructor if nothing unusual is going on
- };
- } //Finishes the if condition
- })();