Shell Shockers | Ad Blocker

9/30/2024, 9:45:17 PM

  1. // ==UserScript==
  2. // @name Shell Shockers | Ad Blocker
  3. // @grant GM_setValue
  4. // @grant GM_getValue
  5. // @grant GM_deleteValue
  6. // @grant GM_listValues
  7. // @grant GM_info
  8. // @grant GM_setClipboard
  9. // @grant GM_openInTab
  10. //
  11. // @grant GM.setValue
  12. // @grant GM.getValue
  13. // @grant GM.deleteValue
  14. // @grant GM.listValues
  15. // @grant GM.info
  16. // @grant GM.setClipboard
  17. // @grant GM.openInTab
  18.  
  19. // @version 2.1
  20. // @author wish?
  21. // @description 9/30/2024, 9:45:17 PM
  22.  
  23. // @match *://*.shellshock.io/*
  24. // @match *://*.shell.onlypuppy7.online/*
  25. // @match *://*.algebra.best/*
  26. // @match *://*.algebra.vip/*
  27. // @match *://*.biologyclass.club/*
  28. // @match *://*.deadlyegg.com/*
  29. // @match *://*.deathegg.world/*
  30. // @match *://*.eggboy.club/*
  31. // @match *://*.eggboy.xyz/*
  32. // @match *://*.eggcombat.com/*
  33. // @match *://*.egg.dance/*
  34. // @match *://*.eggfacts.fun/*
  35. // @match *://*.egghead.institute/*
  36. // @match *://*.eggisthenewblack.com/*
  37. // @match *://*.eggsarecool.com/*
  38. // @match *://*.geometry.best/*
  39. // @match *://*.geometry.monster/*
  40. // @match *://*.geometry.pw/*
  41. // @match *://*.geometry.report/*
  42. // @match *://*.hardboiled.life/*
  43. // @match *://*.hardshell.life/*
  44. // @match *://*.humanorganising.org/*
  45. // @match *://*.mathactivity.xyz/*
  46. // @match *://*.mathactivity.club/*
  47. // @match *://*.mathdrills.info/*
  48. // @match *://*.mathdrills.life/*
  49. // @match *://*.mathfun.rocks/*
  50. // @match *://*.mathgames.world/*
  51. // @match *://*.math.international/*
  52. // @match *://*.mathlete.fun/*
  53. // @match *://*.mathlete.pro/*
  54. // @match *://*.overeasy.club/*
  55. // @match *://*.risenegg.com/*
  56. // @match *://*.scrambled.tech/*
  57. // @match *://*.scrambled.today/*
  58. // @match *://*.scrambled.us/*
  59. // @match *://*.scrambled.world/*
  60. // @match *://*.shellshockers.club/*
  61. // @match *://*.shellshockers.life/*
  62. // @match *://*.shellshockers.site/*
  63. // @match *://*.shellshockers.us/*
  64. // @match *://*.shellshockers.world/*
  65. // @match *://*.shellshockers.xyz/*
  66. // @match *://*.shellsocks.com/*
  67. // @match *://*.softboiled.club/*
  68. // @match *://*.urbanegger.com/*
  69. // @match *://*.violentegg.club/*
  70. // @match *://*.violentegg.fun/*
  71. // @match *://*.yolk.best/*
  72. // @match *://*.yolk.life/*
  73. // @match *://*.yolk.rocks/*
  74. // @match *://*.yolk.tech/*
  75. // @match *://*.yolk.quest/*
  76. // @match *://*.yolk.today/*
  77. // @match *://*.zygote.cafe/*
  78. // @match *://*.shellshockers.best/*
  79. // @match *://*.eggboy.me/*
  80. // @grant none
  81. // @run-at document-start
  82. // @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
  83. // @require https://cdn.jsdelivr.net/npm/tweakpane@3.1.10/dist/tweakpane.min.js
  84. // @require https://cdn.jsdelivr.net/npm/@tweakpane/plugin-essentials@0.1.8/dist/tweakpane-plugin-essentials.min.js
  85. // @require https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js
  86. //
  87. // @license MIT
  88. // @namespace https://gf.qytechs.cn/users/1361048
  89. // ==/UserScript==
  90. (function () {
  91. const consoleMethods = ["log", "warn", "info", "error", "exception", "table", "trace"];
  92. const _innerConsole = console;
  93.  
  94. consoleMethods.forEach((method) => {
  95. if (unsafeWindow.console[method]) {
  96. Object.defineProperty(unsafeWindow.console, method, {
  97. configurable: false,
  98. get: (...args) => {
  99. return _innerConsole[method].bind(_innerConsole);
  100. },
  101. set: () => {},
  102. });
  103. }
  104. });
  105. })();
  106. (function () {
  107. let noPointerPause;
  108. const clientKeysURL = `https://js.getstate.farm/vardata/`;
  109. let ss;
  110. let F = [];
  111. let H = {};
  112. let functionNames = [];
  113. let keyRetrieved = false;
  114.  
  115. const startUp = function () {
  116. console.log("startup");
  117. injectScript();
  118. console.log("after startup");
  119. };
  120.  
  121. let originalReplace = String.prototype.replace;
  122. let originalReplaceAll = String.prototype.replaceAll;
  123.  
  124. String.prototype.originalReplace = function () {
  125. return originalReplace.apply(this, arguments);
  126. };
  127. String.prototype.originalReplaceAll = function () {
  128. return originalReplaceAll.apply(this, arguments);
  129. };
  130.  
  131. const log = function (...args) {
  132. let condition;
  133. try {
  134. condition = false;
  135. } catch (error) {
  136. condition = GM_getValue(storageKey + "DisableLogs");
  137. }
  138. if (!condition) {
  139. console.log(...args);
  140. }
  141. };
  142.  
  143. const fetchTextContent = function (url) {
  144. try {
  145. var xhr = new XMLHttpRequest();
  146. xhr.open("GET", url, false);
  147. xhr.send();
  148. if (xhr.status === 200) {
  149. return xhr.responseText;
  150. } else {
  151. console.error("Error fetching " + url);
  152. return null;
  153. }
  154. } catch (err) {
  155. return null;
  156. }
  157. };
  158. const findKeyWithProperty = function (obj, propertyToFind) {
  159. for (const key in obj) {
  160. if (obj[key] === null || obj[key] === undefined) {
  161. continue;
  162. }
  163. if (!!obj[key] && (typeof obj[key] == "object" || typeof obj[key] == "function") && obj[key].hasOwnProperty(propertyToFind)) {
  164. return key;
  165. }
  166. }
  167. // Property not found
  168. return null;
  169. };
  170. const getScrambled = () => Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join("");
  171. const createAnonFunction = function (name, func) {
  172. const funcName = getScrambled();
  173. unsafeWindow[funcName] = func;
  174. unsafeWindow[funcName] = function () {
  175. try {
  176. return func.apply(this, arguments);
  177. } catch (error) {
  178. log("Error in anonymous function:", error);
  179. }
  180. };
  181.  
  182. F[name] = unsafeWindow[funcName];
  183. functionNames[name] = funcName;
  184. };
  185.  
  186. const injectScript = function () {
  187. createAnonFunction("retrieveFunctions", function (vars) {
  188. // console.log(vars)
  189. ss = vars;
  190. unsafeWindow.globalSS = vars;
  191. // console.log("lmao");
  192.  
  193. F.customSounds();
  194. });
  195.  
  196. createAnonFunction("customSounds", function () {
  197. unsafeWindow.globalSS.PLAYERS.forEach((PLAYER) => {
  198. let H = unsafeWindow.H;
  199. if (PLAYER.hasOwnProperty("ws")) {
  200. unsafeWindow.globalSS.MYPLAYER = PLAYER;
  201. }
  202. });
  203.  
  204. H.actor = findKeyWithProperty(unsafeWindow.globalSS.MYPLAYER, H.mesh);
  205. });
  206. createAnonFunction("adBlocker", function (input) {
  207. try {
  208. if (input == 10 && false) {
  209. return 1;
  210. } else if (true) {
  211. if (typeof input == "boolean") {
  212. return true;
  213. } else if (input == 10) {
  214. return 5;
  215. } else if (input == "adsBlocked") {
  216. return false;
  217. }
  218. }
  219. return input;
  220. } catch (error) {
  221. return true;
  222. }
  223. });
  224.  
  225. const originalFunction = Function;
  226.  
  227. unsafeWindow.Function = function (...args) {
  228. console.log(args.join(""));
  229. if (args.join("").includes("(()=>{var ")) {
  230. unsafeWindow.Function = originalFunction;
  231.  
  232. // this is the right script
  233. return originalFunction(applyScript(...args));
  234. }
  235. return originalFunction(...args);
  236. };
  237.  
  238. function sha256(str) {
  239. const utf8 = new TextEncoder().encode(str);
  240. const k = Uint32Array.of(
  241. 0x428a2f98,
  242. 0x71374491,
  243. 0xb5c0fbcf,
  244. 0xe9b5dba5,
  245. 0x3956c25b,
  246. 0x59f111f1,
  247. 0x923f82a4,
  248. 0xab1c5ed5,
  249. 0xd807aa98,
  250. 0x12835b01,
  251. 0x243185be,
  252. 0x550c7dc3,
  253. 0x72be5d74,
  254. 0x80deb1fe,
  255. 0x9bdc06a7,
  256. 0xc19bf174,
  257. 0xe49b69c1,
  258. 0xefbe4786,
  259. 0x0fc19dc6,
  260. 0x240ca1cc,
  261. 0x2de92c6f,
  262. 0x4a7484aa,
  263. 0x5cb0a9dc,
  264. 0x76f988da,
  265. 0x983e5152,
  266. 0xa831c66d,
  267. 0xb00327c8,
  268. 0xbf597fc7,
  269. 0xc6e00bf3,
  270. 0xd5a79147,
  271. 0x06ca6351,
  272. 0x14292967,
  273. 0x27b70a85,
  274. 0x2e1b2138,
  275. 0x4d2c6dfc,
  276. 0x53380d13,
  277. 0x650a7354,
  278. 0x766a0abb,
  279. 0x81c2c92e,
  280. 0x92722c85,
  281. 0xa2bfe8a1,
  282. 0xa81a664b,
  283. 0xc24b8b70,
  284. 0xc76c51a3,
  285. 0xd192e819,
  286. 0xd6990624,
  287. 0xf40e3585,
  288. 0x106aa070,
  289. 0x19a4c116,
  290. 0x1e376c08,
  291. 0x2748774c,
  292. 0x34b0bcb5,
  293. 0x391c0cb3,
  294. 0x4ed8aa4a,
  295. 0x5b9cca4f,
  296. 0x682e6ff3,
  297. 0x748f82ee,
  298. 0x78a5636f,
  299. 0x84c87814,
  300. 0x8cc70208,
  301. 0x90befffa,
  302. 0xa4506ceb,
  303. 0xbef9a3f7,
  304. 0xc67178f2
  305. );
  306. let h = Uint32Array.of(0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19);
  307.  
  308. const pad = new Uint8Array(((utf8.length + 9) & ~63) + 64);
  309. pad.set(utf8), (pad[utf8.length] = 0x80);
  310. new DataView(pad.buffer).setUint32(pad.length - 4, utf8.length << 3, false);
  311.  
  312. let w = new Uint32Array(64),
  313. v,
  314. i,
  315. j,
  316. a,
  317. b,
  318. c,
  319. d,
  320. e,
  321. f,
  322. g,
  323. h0,
  324. S0,
  325. S1,
  326. ch,
  327. maj,
  328. temp1,
  329. temp2;
  330. for (i = 0; i < pad.length; i += 64) {
  331. v = new DataView(pad.buffer, i, 64);
  332. for (j = 0; j < 16; j++) w[j] = v.getUint32(j << 2, false);
  333. for (; j < 64; j++)
  334. w[j] =
  335. (w[j - 16] +
  336. ((w[j - 15] >>> 7) ^ (w[j - 15] << 25) ^ (w[j - 15] >>> 18) ^ (w[j - 15] << 14) ^ (w[j - 15] >>> 3)) +
  337. w[j - 7] +
  338. ((w[j - 2] >>> 17) ^ (w[j - 2] << 15) ^ (w[j - 2] >>> 19) ^ (w[j - 2] << 13) ^ (w[j - 2] >>> 10))) >>>
  339. 0;
  340.  
  341. [a, b, c, d, e, f, g, h0] = h;
  342. for (j = 0; j < 64; j++) {
  343. S1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));
  344. ch = (e & f) ^ (~e & g);
  345. temp1 = (h0 + S1 + ch + k[j] + w[j]) >>> 0;
  346. S0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));
  347. maj = (a & b) ^ (a & c) ^ (b & c);
  348. temp2 = (S0 + maj) >>> 0;
  349. (h0 = g), (g = f), (f = e), (e = (d + temp1) >>> 0), (d = c), (c = b), (b = a), (a = (temp1 + temp2) >>> 0);
  350. }
  351. (h[0] += a), (h[1] += b), (h[2] += c), (h[3] += d), (h[4] += e), (h[5] += f), (h[6] += g), (h[7] += h0);
  352. }
  353. // console.log(str);
  354.  
  355. return h.reduce((s, x) => s + x.toString(16).padStart(8, "0"), "");
  356. }
  357.  
  358. const applyScript = function (js) {
  359. let match;
  360. let clientKeys;
  361.  
  362. let originalJS = fetchTextContent("/js/shellshock.js");
  363.  
  364. const getVardata = function (hash) {
  365. return fetchTextContent(clientKeysURL + hash + ".json?v=" + Date.now());
  366. };
  367.  
  368. let hash = sha256(originalJS);
  369. // console.log(hash);
  370. let onlineClientKeys = getVardata(hash);
  371.  
  372. try {
  373. clientKeys = JSON.parse(onlineClientKeys);
  374. } catch (e) {
  375. console.error(e);
  376. }
  377.  
  378. let H = clientKeys.vars;
  379. let C = clientKeys.commCodes?.codes;
  380.  
  381. const patterns = {
  382. scope: /,this\.(..)\.position\.z=2/,
  383. };
  384.  
  385. const scopeVar = patterns.scope.exec(js)[1];
  386. H.extra = {
  387. scope: scopeVar,
  388. };
  389. unsafeWindow.H = H;
  390.  
  391. let injectionString = "";
  392.  
  393. try {
  394. //SERVERSYNC
  395. match = new RegExp(`function serverSync\\(\\)\\{(.*?)\\)\\}`).exec(js);
  396. log("SERVERSYNC:", match);
  397. H.SERVERSYNC = match ? match[1].replace(/[a-zA-Z$_\.\[\]]+shots/, 0) + ")" : "function(){log('no serversync womp womp')}";
  398. //PAUSE
  399. match = new RegExp(`,setTimeout\\(\\(\\(\\)=>\\{([=A-z0-9\\(\\),\\{ \\.;!\\|\\?:\\}]+send\\([a-zA-Z$_]+\\))`).exec(js);
  400. log("PAUSE:", match);
  401. H.PAUSE = match ? `function(){${match[1]}}` : "function(){log('no pause womp womp')}";
  402.  
  403. const variableNameRegex = /^[a-zA-Z0-9_$\[\]"\\\.,]*$/;
  404. console.log(H);
  405. for (let name in H) {
  406. let deobf = H[name];
  407. if (name == "SERVERSYNC" || name == "PAUSE" || variableNameRegex.test(deobf)) {
  408. //serversync should only be defined just before...
  409. injectionString = `${injectionString}${name}: (() => { let variable = "value_undefined"; try { eval("variable = ${deobf};"); } catch (error) { return "value_undefined"; }; return variable; })(),`;
  410. } else {
  411. }
  412. }
  413. console.log(injectionString);
  414.  
  415. log("%cSTATEFARM INJECTION STAGE 1: GATHER VARS", "color: yellow; font-weight: bold; font-size: 1.2em; text-decoration: underline;");
  416.  
  417. const modifyJS = function (find, replace) {
  418. let oldJS = js;
  419. try {
  420. js = js.originalReplaceAll(find, replace);
  421. } catch (err) {
  422. console.log(
  423. "%cReplacement failed! Likely a required var was not found. Attempted to replace " + find + " with: " + replace,
  424. "color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
  425. );
  426. }
  427. if (oldJS !== js) {
  428. console.log(
  429. "%cReplacement successful! Injected code: replaced: " + find + " with: " + replace,
  430. "color: green; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
  431. );
  432. } else {
  433. console.log(
  434. "%cReplacement failed! Attempted to replace " + find + " with: " + replace,
  435. "color: red; font-weight: bold; font-size: 0.6em; text-decoration: italic;"
  436. );
  437. }
  438. };
  439.  
  440. const f = function (varName) {
  441. return varName.replace("$", "\\$");
  442. };
  443. const FUNCTIONPARAM = new RegExp("function " + f(H._connectFail) + "\\(([a-zA-Z$_]+)\\)").exec(js)[1];
  444. modifyJS(
  445. f(H.SCENE) + "." + f(H.render),
  446. `window["${functionNames.retrieveFunctions}"]({${injectionString}},true)||${f(H.SCENE)}.render`
  447. );
  448.  
  449. modifyJS("adsBlocked=" + FUNCTIONPARAM, "adsBlocked=" + functionNames.adBlocker + '("adsBlocked")');
  450. modifyJS('"user-has-adblock"', functionNames.adBlocker + '("user-has-adblock")');
  451. modifyJS("layed=!1", "layed=window." + functionNames.adBlocker + "(!1)");
  452. modifyJS("showAdBlockerVideo", "hideAdBlockerVideo"); //hello eggs bullshit
  453. modifyJS(H.USERDATA + ".playerAccount.isUpgraded()", functionNames.adBlocker + "(" + f(H.USERDATA) + ".playerAccount.isUpgraded())");
  454.  
  455.  
  456. log(H, "last");
  457. return js;
  458. } catch (e) {
  459. console.log(e);
  460. }
  461.  
  462. };
  463. };
  464. // injectScript();
  465. startUp();
  466. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址