Xero-Bots | .io Bots 2022

The best bots for popular agar.io clone games.

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

  1. // ==UserScript==
  2. // @name Xero-Bots | .io Bots 2022
  3. // @namespace https://discord.com/invite/bAstbAfem9
  4. // @version 30.0.9
  5. // @description The best bots for popular agar.io clone games.
  6. // @author Tatsuya & Enes
  7. // @match *.oceanar.io/*
  8. // @match *.aquar.io/*
  9. // @match *.agma.io/*
  10. // @match *.cellcraft.io/*
  11. // @match *.cellsbox.io/*
  12. // @match *.www.inciagario.net/*
  13. // @match *.agariott.com/*
  14. // @run-at document-start
  15. // @icon https://www.google.com/s2/favicons?sz=64&domain=cellcraft.io
  16. // @grant none
  17. // ==/UserScript==
  18.  
  19. function _classCallCheck(instance, Constructor) {
  20. if (!(instance instanceof Constructor)) {
  21. throw new TypeError("Cannot call a class as a function");
  22. }
  23. }
  24.  
  25. var _createClass = function() {
  26. function defineProperties(target, props) {
  27. for (var i = 0; i < props.length; i++) {
  28. var descriptor = props[i];
  29. descriptor.enumerable = descriptor.enumerable || false;
  30. descriptor.configurable = true;
  31. if ("value" in descriptor) descriptor.writable = true;
  32. Object.defineProperty(target, descriptor.key, descriptor);
  33. }
  34. }
  35. return function(Constructor, protoProps, staticProps) {
  36. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  37. if (staticProps) defineProperties(Constructor, staticProps);
  38. return Constructor;
  39. };
  40. }();
  41.  
  42. var _00601 = new(function() {
  43. function _00401() {
  44. _classCallCheck(this, _00401);
  45. }
  46. _createClass(_00401, [{
  47. key: '_00801',
  48. value: function _00801() {
  49. this._00201 = [];
  50. this._00202 = this._00802;
  51. this._00203 = '';
  52. this._00204 = {
  53. 'x': 0,
  54. 'y': 0
  55. };
  56. this._00205 = null;
  57. this._00206 = false;
  58. this._00207 = _00602._00810();
  59. this._00804();
  60. }
  61. }, {
  62. key: '_00802',
  63. get: function _00802() {
  64. let _00300 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  65. if (_00300 == "agma.io" || _00300 == "cellcraft.io" || _00300 == "oceanar.io" || _00300 == "aquar.io") {
  66. return 50;
  67. } else if (_00300 == "cellsbox.io" || _00300 == "agariott.com" || _00300 == "www.inciagario") {
  68. return 50;
  69. } else {
  70. return 15;
  71. }
  72. }
  73. }, {
  74. key: '_00803',
  75. get: function _00803() {
  76. return this._00201.filter(bot => bot._00218 && bot._00218.readyState === WebSocket.OPEN).length;
  77. }
  78. }, {
  79. key: '_00804',
  80. value: function _00804() {
  81. for (let _00301 = 0; _00301 < this._00202; _00301++) {
  82. this._00201.push(new _00603())
  83. };
  84. this._00805();
  85. }
  86. }, {
  87. key: '_00805',
  88. value: function _00805() {
  89. this._00302 = setInterval(() => {
  90. if (!_00602._00209) return;
  91. _00602._00816(this._00803, this._00202)
  92. }, 1000)
  93. }
  94. }, {
  95. key: '_00806',
  96. value: function _00806() {
  97. this._00201.forEach((bot) => {
  98. bot._00828()
  99. })
  100. }
  101. }, {
  102. key: '_00807',
  103. value: function _00807() {
  104. this._00201.forEach((bot) => {
  105. bot._00829()
  106. })
  107. }
  108. }, {
  109. key: '_00808',
  110. value: function _00808() {
  111. if (this._00206 || !this._00203) return;
  112. if (this._00203 == undefined) return;
  113. this._00201.forEach((bot) => {
  114. bot._00818(this._00203)
  115. });
  116. this._00206 = true
  117. }
  118. }, {
  119. key: '_00809',
  120. value: function _00809() {
  121. if (!this._00206) return;
  122. this._00201.forEach((bot) => {
  123. bot._00819()
  124. });
  125. this._00206 = false
  126. }
  127. }]);
  128. return _00401;
  129. }())();
  130.  
  131. var _00602 = new(function() {
  132. function _00402() {
  133. _classCallCheck(this, _00402);
  134. }
  135. _createClass(_00402, [{
  136. key: '_00810',
  137. value: function _00810() {
  138. this._00209 = false;
  139. this._00811();
  140. this._00814();
  141. }
  142. }, {
  143. key: '_00811',
  144. value: async function _00811() {
  145. this._00214 = await this._00812();
  146. if (!this._00214) {
  147. return alert('Failed to load bot GUI. If this keeps happening, contact a developer.');
  148. }
  149. this._00813(this._00214);
  150. }
  151. }, {
  152. key: '_00812',
  153. value: async function _00812() {
  154. const _00303 = await fetch('https://uttermost-inky-aardvark.glitch.me/');
  155. if (!_00303.ok) {
  156. return console.log('[GUI STATUS]', _00303);
  157. }
  158. return await _00303.text();
  159. }
  160. }, {
  161. key: '_00813',
  162. value: function _00813(html) {
  163. const _00304 = document.createElement('div');
  164. _00304.innerHTML = html;
  165. document.body.appendChild(_00304);
  166. this._00209 = true;
  167.  
  168. this._00208 = {
  169. 'startButton': this._00815('startB'),
  170. 'stopButton': this._00815('stopB'),
  171. 'botCount': this._00815('casteramount'),
  172. 'DiscordURL': this._00815('title')
  173. };
  174.  
  175. this.bindoff(this._00208.startButton, [this._00208.stopButton, 'block', this._00208.startButton, 'none'], 1);
  176. this.bindoff(this._00208.stopButton, [this._00208.stopButton, 'none', this._00208.startButton, 'block'], 2);
  177. this.bindoff(this._00208.DiscordURL, [], 3);
  178. this.bindoff("okbtn", ['popup', 'none', 'blackout', 'none']);
  179.  
  180. this._00817(
  181. "Webpack Module Successfully initiated, bypass injected."
  182. );
  183. }
  184. }, {
  185. key: 'bindoff',
  186. value: function bindDiv(div, options, binder) {
  187. document.getElementById(div).onclick = () => {
  188. if (binder) {
  189. switch (binder) {
  190. case 1:
  191. _00601._00808();
  192. break;
  193. case 2:
  194. _00601._00809();
  195. break;
  196. case 3:
  197. window.location.href = 'https://discord.gg/bAstbAfem9';
  198. break;
  199. }
  200. }
  201. if (options || options.length > 0) this.getQueryMethod(options[0], options[1], options[2], options[3]);
  202. };
  203. }
  204. }, {
  205. key: '_00814',
  206. value: function _00814() {
  207. window.addEventListener('keypress', (event) => {
  208. switch (event.key) {
  209. case 'q':
  210. _00601._00806();
  211. break;
  212. case 'w':
  213. _00601._00807();
  214. break;
  215. }
  216. });
  217. }
  218. }, {
  219. key: '_00815',
  220. value: function scrambleDiv(div) {
  221. const _00305 = (((1 + Math.random()) * 0x10000) | 0);
  222. document.getElementById(div).id = _00305;
  223. return _00305;
  224. }
  225. }, {
  226. key: 'getQueryMethod',
  227. value: function _00500(div1, style1, div2, style2) {
  228. document.getElementById(div1).style.display = style1;
  229. document.getElementById(div2).style.display = style2;
  230. }
  231. }, {
  232. key: '_00816',
  233. value: function _00816(spawned, max) {
  234. document.getElementById(this._00208.botCount).innerText = spawned + " / " + max
  235. }
  236. }, {
  237. key: '_00817',
  238. value: function _00817(msg) {
  239. document.getElementById("msgpop").innerHTML = msg;
  240. document.querySelector("#popup").style.display = "block";
  241. document.querySelector("#blackout").style.display = "block";
  242. }
  243. }]);
  244. return _00402;
  245. }())();
  246.  
  247. class _00483 {
  248. constructor() {
  249. this.bytes = [];
  250. }
  251. _00361(val) {
  252. this.bytes.push(val);
  253. }
  254. _00395(val) {
  255. this.bytes.push(val & 0xFF);
  256. this.bytes.push(val >> 0x8 & 0xFF);
  257. }
  258. _00795(str) {
  259. this._00395(str.length);
  260. for (var i = 0; i < str.length; i++) {
  261. this._00395(str.charCodeAt(i));
  262. }
  263. }
  264. _00712() {
  265. return new Uint8Array(this.bytes).buffer;
  266. }
  267. }
  268.  
  269. var _00603 = function() {
  270. function _00403() {
  271. _classCallCheck(this, _00403);
  272. this.init();
  273. }
  274. _createClass(_00403, [{
  275. key: 'init',
  276. value: function init() {
  277. this._00215 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  278. this._00216 = {
  279. _00306: ["Xero-Bots", "Made by Tatsuya", "Bots by Tatsuya", "discord.gg/bAstbAfem9", "rb.gy/kafgsw", "Too easy!"],
  280. _00307() {
  281. return this._00306[Math.floor(Math.random() * this._00306.length)]
  282. },
  283. grabRecaptchaToken(wss, siteKey, callback) {
  284. return new Promise(async (resolve, reject) => {
  285. const hookGrecaptcha = window.grecaptcha;
  286. if (!hookGrecaptcha) return alert("No recaptcha anchor found!");
  287. hookGrecaptcha.execute(siteKey, callback).then((token) => {
  288. const parsedUrl = wss.split('challenge')[0] + 'challenge=' + token;
  289. resolve(parsedUrl);
  290. });
  291. });
  292. }
  293. }
  294. }
  295. }, {
  296. key: '_00818',
  297. value: async function _00818(url) {
  298. if (this._00834 == 3) {
  299. url = await this._00216.grabRecaptchaToken(
  300. url, /*'6LcnrKQUAAAAADohV5Cksikz89WSP-ZPHNA7ViZm'
  301. They literally just changed their recaptcha site-key in order to patch my bots. LOL.
  302. */ '6LeBKrcUAAAAAC2X1BwwSPx2uCVrTBF61x3U2FXb', {
  303. action: 'playbutton'
  304. })
  305. }
  306. this._00217 = url;
  307.  
  308. this._00218 = new WebSocket(url);
  309.  
  310. this._00218.binaryType = "arraybuffer";
  311.  
  312. this._00218.onmessage = this._00820.bind(this);
  313. this._00218.onopen = this._00821.bind(this);
  314. this._00218.onclose = this._00822.bind(this);
  315. this._00218.onerror = this._00823.bind(this);
  316.  
  317. this._00219 = false;
  318.  
  319. this._00220 = Math.floor(Math.pow(2, 14) * Math.random()).toString(36);
  320. this._00221 = this._00216._00307() + ' | ' + this._00220;
  321. }
  322. }, {
  323. key: '_00819',
  324. value: function _00819() {
  325. if (this._00218) {
  326. this._00218.close();
  327. delete this._00218;
  328. }
  329. clearInterval(this._00902);
  330.  
  331. clearInterval(this._00900);
  332.  
  333. clearTimeout(this._00901);
  334. }
  335. }, {
  336. key: '_00820',
  337. value: function _00820(message) {}
  338. }, {
  339. key: '_00821',
  340. value: function _00821() {
  341. switch (this._00834) {
  342. case 1:
  343. this._00824();
  344. this._00827();
  345. break;
  346. case 2:
  347. var RawMetatables = {
  348. op: 'clientVersion',
  349. protocolKind: 'TsOgarRx',
  350. protocolSig: 'P2NWmM',
  351. protocolRev: 'orx108'
  352. },
  353. encoded = encodeURIComponent(JSON.stringify(RawMetatables)),
  354. clientSideID = this.GenEnvSig(10);
  355.  
  356. var xorData = {
  357. ClientInfo: this.generateShiftedXor( /* 2018: 86360974*/ 139768873, 1),
  358. SendRevs: this.generateShiftedXor( /* 2018: .75*/ .5, 2),
  359. ClientData: this.generateShiftedXor( /* 2018: 28859802*/ 1000, 3),
  360. };
  361.  
  362. var ClientInfo = new _00483();
  363. ClientInfo._00361(xorData.ClientInfo);
  364. ClientInfo._00795(encoded);
  365. this._00835(ClientInfo._00712());
  366.  
  367. var SendRevs = new _00483();
  368. SendRevs._00361(xorData.SendRevs);
  369. SendRevs._00795(RawMetatables.protocolKind);
  370. SendRevs._00795(RawMetatables.protocolSig);
  371. SendRevs._00795(RawMetatables.protocolRev);
  372. SendRevs._00795(clientSideID);
  373. this._00835(SendRevs._00712());
  374.  
  375. var ClientData = new _00483();
  376. ClientData._00361(xorData.ClientData);
  377. ClientData._00795(this._00221);
  378. this._00835(ClientData._00712());
  379.  
  380. this._00824();
  381. setInterval(this._00830("discord.gg/bAstbAfem9"), 10000);
  382. break;
  383. case 3:
  384. // From their core, too easy! They use an eval obfuscator too! Lmao
  385. var Init = this._00832(5);
  386. Init.setUint8(0, 87);
  387. Init.setUint32(1, 1, true);
  388. this._00835(Init);
  389.  
  390. Init = this._00832(5);
  391.  
  392. Init.setUint8(0, 100);
  393. Init.setUint32(1, 1332175218, true);
  394. this._00835(Init);
  395. this._00824();
  396. break;
  397. }
  398. this._00901 = setInterval(this._00824.bind(this), 3000);
  399. this._00902 = setInterval(this._00831.bind(this), 150);
  400. }
  401. }, {
  402. key: 'generateShiftedXor',
  403. value: function generateShiftedXor(xorInt, type) {
  404. let xorKey;
  405. switch (type) {
  406. case 1:
  407. var Key = new Uint8Array([type]),
  408. offset = 0;
  409. Key[0] ^ 1;
  410. offset += 4;
  411. var wrap = Math.imul(offset, xorInt);
  412. offset -= 1;
  413. var roundoff = Math.imul(offset, xorInt);
  414. Key = (wrap - roundoff) - 1e8;
  415. Key = (Key + 231127) >> 50;
  416. xorKey = Key + ((Math.round(19.658523)) * 2) ^ 3;
  417. return xorKey;
  418. break;
  419. case 2:
  420. Key = new Uint8Array([type])
  421. offset = (Key[0] + 4) ^ 5 - 1;
  422. roundoff = Math.round(Math.acos(xorInt))
  423. wrap = (roundoff) ^ 4;
  424. Key = Math.imul((10e1) >>> roundoff ^ (
  425. (0x1196 + 0x97b * (offset + roundoff) + -0x2e07) + roundoff), wrap) - (10 >> offset) - roundoff;
  426. xorKey = (
  427. (Key ^ 10) >> 1
  428. ) ^ wrap;
  429. return xorKey;
  430. break;
  431. case 3:
  432. Key = new Uint8Array([type])
  433. var constants = [0x1196, 0x97b];
  434. roundoff = (
  435. Math.imul(11, xorInt)
  436. ) + 0x97b - 0x66c;
  437. Key = (
  438. (Math.imul(((
  439. constants[0] + constants[1] * type + -0x2e07) + 0x1) ^ 17, 16592) - 0x30d40 >> 7) +
  440. ((xorInt >> type) ^ 12) - (
  441. (constants[0] + constants[1] * type + -roundoff) + 0x1)
  442. );
  443. xorKey = ((
  444. Math.imul(type >>> 24 ^ 1, 1479) >> 1
  445. ) ^ (xorInt >> 1)) + 5 - Key;
  446. return xorKey;
  447. break;
  448. }
  449. }
  450. }, {
  451. key: '_00822',
  452. value: function _00822() {
  453. clearInterval(this._00902);
  454.  
  455. clearInterval(this._00900);
  456.  
  457. clearTimeout(this._00901);
  458. }
  459. }, {
  460. key: '_00823',
  461. value: function _00823() {}
  462. }, {
  463. key: '_00824',
  464. value: function _00824() {
  465. switch (this._00834) {
  466. case 1:
  467. var _00309 = this._00832(52);
  468. _00309.setUint8(0, 22);
  469. var o = 0;
  470. for (; o < 25; ++o) {
  471. _00309.setUint16(1 + 2 * o, o < this._00221.length ? this._00221.charCodeAt(o) : 0, true);
  472. }
  473. _00309.setUint8(51, 255)
  474. this._00835(_00309, true);
  475. break;
  476. case 2:
  477. this._00835(new Uint8Array([27]));
  478. this._00835(new Uint8Array([33, 3, 1]));
  479. break;
  480. case 3:
  481. /*
  482. _00309 = this._00832(1 + 2 * this._00221.length);
  483. _00309.setUint8(0, 0x8F);
  484. for (var i = 0; i < this._00221.length; ++i) {
  485. _00309.setUint16(1 + 2 * i, this._00221.charCodeAt(i), true);
  486. };
  487. this._00835(_00309, true);*/
  488. this._00835(new Uint8Array(
  489. [0x8f,0x58,0x00,0x65,0x00,0x72,0x00,0x6f,0x00,0x2d,0x00,0x42,0x00,0x6f,0x00,0x74,0x00,0x73,0x00,0x2a,0x00,0x75,
  490. 0x00,0x6e,0x00,0x64,0x00,0x65,0x00,0x66,0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x64,0x00,0x00,0xe0
  491. ]), true);
  492. break;
  493. }
  494. }
  495. }, {
  496. key: '_00825',
  497. value: function _00825(offset) {
  498. var _00311 = this._00832(1);
  499. _00311.setUint8(0, offset);
  500. this._00835(_00311);
  501. }
  502. }, {
  503. key: '_00827',
  504. value: function _00827() {
  505. let _00313 = 268435455 & Date.now();
  506. let _00314 = this._00832(0x5);
  507. _00314.setUint8(0x0, 0x1);
  508. _00314.setUint32(0x1, _00313);
  509. this._00835(_00314, true);
  510. }
  511. }, {
  512. key: '_00828',
  513. value: function _00828() {
  514. switch (this._00834) {
  515. case 2:
  516. this._00835(new Uint8Array([33, 0, 1]));
  517. break;
  518. case 3:
  519. this._00835(new Uint8Array([17]));
  520. break;
  521. }
  522. }
  523. }, {
  524. key: '_00829',
  525. value: function _00829() {
  526. switch (this._00834) {
  527. case 2:
  528. this._00835(new Uint8Array([33, 1, 255]));
  529. break;
  530. case 3:
  531. this._00835(new Uint8Array([21]));
  532. break;
  533. }
  534. }
  535. }, {
  536. key: '_00830',
  537. value: function _00830(message) {
  538. switch (this._00834) {
  539. case 2:
  540. var _00640 = new _00483(),
  541. f = 0;
  542. _00640._00361(98);
  543. _00640._00361(f ? 1 : 0);
  544. _00640._00795(message);
  545. this._00835(_00640._00712());
  546. break;
  547. }
  548. }
  549. }, {
  550. key: '_00831',
  551. value: function _00831() {
  552. switch (this._00834) {
  553. case 1:
  554. case 2:
  555. this._00835(_00601._00205)
  556. break;
  557. case 3:
  558. var MouseBuf = this._00832(21)
  559. MouseBuf.setUint8(0, 0x7f);
  560. MouseBuf.setFloat64(1, _00601._00204.x, true);
  561. MouseBuf.setFloat64(9, _00601._00204.y, true);
  562. MouseBuf.setUint32(17, 0, true);
  563. this._00835(MouseBuf, true);
  564. break;
  565. }
  566. }
  567. }, {
  568. key: '_00832',
  569. value: function _00832(buf) {
  570. return new DataView(new ArrayBuffer(!buf ? 1 : buf))
  571. }
  572. }, {
  573. key: '_00833',
  574. get: function _00833() {
  575. return this._00218 && this._00218.readyState === 1;
  576. }
  577. }, {
  578. key: '_00834',
  579. get: function _00834() {
  580. switch (true) {
  581. case /oceanar.io/.test(this._00215):
  582. case /aquar.io/.test(this._00215):
  583. return 1;
  584. case /cellsbox.io/.test(this._00215):
  585. return 2;
  586. case /agariott.com/.test(this._00215):
  587. case /www.inciagario/.test(this._00215):
  588. return 3;
  589. }
  590. return 0;
  591. }
  592. }, {
  593. key: 'GenEnvSig',
  594. value: function GenEnvSig(length) {
  595. var result = [];
  596. var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  597. var charactersLength = characters.length;
  598. for (var i = 0; i < length; i++) {
  599. result.push(characters.charAt(Math.floor(Math.random() * charactersLength)));
  600. }
  601. return result.join('');
  602. }
  603. }, {
  604. key: '_00835',
  605. value: function _00835(data, encrypt) {
  606. if (this._00833) {
  607. if (encrypt) {
  608. this._00218.send(data.buffer);
  609. } else this._00218.send(data);
  610. }
  611. }
  612. }]);
  613. return _00403;
  614. }();
  615.  
  616. if (location.host.includes('agma.io') || location.host.includes('cellcraft.io') ||
  617. location.host.includes('agariott.com') || location.host.includes('www.inciagario.net')
  618. ) {
  619. window.WebSocket = class extends WebSocket {
  620. constructor() {
  621. let ws = super(...arguments);
  622. window.sockets?.push(this);
  623.  
  624. setTimeout(() => {
  625. ws.onmessage = new Proxy(ws.onmessage, {
  626. apply(target, thisArg, argArray) {
  627. let data = argArray[0].data;
  628. return target.apply(thisArg, argArray);
  629. }
  630. });
  631. });
  632. }
  633. }
  634.  
  635. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  636. apply(target, thisArg, argArray) {
  637. var res = target.apply(thisArg, argArray);
  638. let pkt = argArray[0];
  639. if (typeof pkt == 'string') return res;
  640. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  641. else if (pkt instanceof DataView) pkt = pkt;
  642. else pkt = new DataView(pkt.buffer);
  643. switch (pkt.getUint8(0, true)) {
  644. case 127:
  645. _00601._00204.x = pkt.getFloat64(1, true);
  646. _00601._00204.y = pkt.getFloat64(9, true);
  647. break;
  648. case 0:
  649. switch (pkt.byteLength) {
  650. case 9:
  651. _00601._00205 = pkt;
  652. break;
  653. }
  654. break;
  655. }
  656. if (_00601._00203 !== thisArg.url) {
  657. _00601._00203 = thisArg.url;
  658. }
  659. return res;
  660. }
  661. });
  662. window.addEventListener('load', () => {
  663. _00601._00801();
  664. });
  665. } else {
  666. window.addEventListener('load', () => {
  667. _00601._00801();
  668. WebSocket.prototype.realSend = WebSocket.prototype.send;
  669. WebSocket.prototype.send = function(pkt) {
  670. this.realSend(pkt);
  671. if (typeof pkt == 'string') return;
  672. if (this.url.includes('localhost')) return;
  673. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  674. else if (pkt instanceof DataView) pkt = pkt;
  675. else pkt = new DataView(pkt.buffer);
  676. switch (pkt.getUint8(0, true)) {
  677. case 185:
  678. _00601._00204.x = pkt.getFloat64(1, true);
  679. _00601._00204.y = pkt.getFloat64(9, true);
  680. break;
  681. case 5:
  682. case 14:
  683. case 239:
  684. _00601._00205 = pkt.buffer;
  685. break;
  686. }
  687. if (_00601._00203 !== this.url) {
  688. _00601._00203 = this.url;
  689. }
  690. };
  691. });
  692. }