Shellshock.io Remove Adblocker messages & respawn timer

Remove the adblock popup, as well as the respawn timer to avoid the extra wait in shell shockers

当前为 2022-08-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Shellshock.io Remove Adblocker messages & respawn timer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @description Remove the adblock popup, as well as the respawn timer to avoid the extra wait in shell shockers
  6. // @author mewen25
  7. // @match https://shellshock.io/
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12.  
  13. var open_prototype = XMLHttpRequest.prototype.open, intercept_response = function(callback) {
  14. XMLHttpRequest.prototype.open = function(method, url) {
  15. if(url.indexOf("shellshock.js") > -1) this.isScript = true;
  16. this.addEventListener('readystatechange', function(event) {
  17. if ( this.readyState === 4 && this.isScript ) {
  18. var response = callback(event.target.responseText);
  19. Object.defineProperty(this, 'response', {writable: true});
  20. Object.defineProperty(this, 'responseText', {writable: true});
  21. this.response = this.responseText = response;
  22. }
  23. });
  24. return open_prototype.apply(this, arguments);
  25. };
  26. };
  27.  
  28. intercept_response(function(response) {
  29. const [adLine, adVar1, adVar2] = /function (.{2})\(e\){.\?.+?(?=}f)}function (.{2})/.exec(response);
  30. const [timer, timerVar, timerVar2, timerVar3] = /function (.{2})\(e\){(.{2})=M.+?(?=1,)1,(.{17}).+?(?=var)/.exec(response);
  31. if(!adLine || !adVar1 || !adVar2) {
  32. console.log('error doing anti adblock')
  33. } else {
  34. console.log("[INJECTING] - Adblock popup block");
  35. const replaceAd = `function ${adVar1}(e){console.log("[ADBLOCK]-blocked"),${adVar2}()}function ${adVar2}`
  36. response = response.replace(adLine, replaceAd);
  37. }
  38. if(!timer || !timerVar || !timerVar2 || !timerVar3) {
  39. console.log('error doing timer block');
  40. }
  41. else {
  42. console.log("[INJECTING - timer block");
  43. response = response.replace(timer, `function ${timerVar}(e){setTimeout(()=>{${timerVar2}=-1,${timerVar3}},3000)}`);
  44. }
  45. return response;
  46. });
  47.  
  48.  
  49.