Anti Anti-debugger

Stops most (not all) anti-debugging implementations by JavaScript obfuscators and stops the console logs from being automatically cleared.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Anti Anti-debugger
// @namespace    https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
// @version      4
// @description  Stops most (not all) anti-debugging implementations by JavaScript obfuscators 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 (typeof callerContent === 'string' && callerContent.includes('debugger')) { //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
})();