Xero-Bots | .io Bots 2022

The best bots for popular agar.io clone games.

当前为 2022-04-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Xero-Bots | .io Bots 2022
  3. // @namespace https://discord.com/invite/bAstbAfem9
  4. // @version 30.0.7
  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. action: 'playbutton'
  302. })
  303. }
  304. this._00217 = url;
  305.  
  306. this._00218 = new WebSocket(url);
  307.  
  308. this._00218.binaryType = "arraybuffer";
  309.  
  310. this._00218.onmessage = this._00820.bind(this);
  311. this._00218.onopen = this._00821.bind(this);
  312. this._00218.onclose = this._00822.bind(this);
  313. this._00218.onerror = this._00823.bind(this);
  314.  
  315. this._00219 = false;
  316.  
  317. this._00220 = Math.floor(Math.pow(2, 14) * Math.random()).toString(36);
  318. this._00221 = this._00216._00307() + ' | ' + this._00220;
  319. }
  320. }, {
  321. key: '_00819',
  322. value: function _00819() {
  323. if (this._00218) {
  324. this._00218.close();
  325. delete this._00218;
  326. }
  327. clearInterval(this._00902);
  328.  
  329. clearInterval(this._00900);
  330.  
  331. clearTimeout(this._00901);
  332. }
  333. }, {
  334. key: '_00820',
  335. value: function _00820(message) {}
  336. }, {
  337. key: '_00821',
  338. value: function _00821() {
  339. switch (this._00834) {
  340. case 1:
  341. this._00824();
  342. this._00827();
  343. break;
  344. case 2:
  345. var RawMetatables = {
  346. op: 'clientVersion',
  347. protocolKind: 'TsOgarRx',
  348. protocolSig: 'P2NWmM',
  349. protocolRev: 'orx108'
  350. },
  351. encoded = encodeURIComponent(JSON.stringify(RawMetatables)),
  352. clientSideID = this.GenEnvSig(10);
  353.  
  354. var xorData = {
  355. ClientInfo: this.generateShiftedXor( /* 2018: 86360974*/ 139768873, 1),
  356. SendRevs: this.generateShiftedXor( /* 2018: .75*/ .5, 2),
  357. ClientData: this.generateShiftedXor( /* 2018: 28859802*/ 1000, 3),
  358. };
  359.  
  360. var ClientInfo = new _00483();
  361. ClientInfo._00361(xorData.ClientInfo);
  362. ClientInfo._00795(encoded);
  363. this._00835(ClientInfo._00712());
  364.  
  365. var SendRevs = new _00483();
  366. SendRevs._00361(xorData.SendRevs);
  367. SendRevs._00795(RawMetatables.protocolKind);
  368. SendRevs._00795(RawMetatables.protocolSig);
  369. SendRevs._00795(RawMetatables.protocolRev);
  370. SendRevs._00795(clientSideID);
  371. this._00835(SendRevs._00712());
  372.  
  373. var ClientData = new _00483();
  374. ClientData._00361(xorData.ClientData);
  375. ClientData._00795(this._00221);
  376. this._00835(ClientData._00712());
  377.  
  378. this._00824();
  379. setInterval(this._00830("discord.gg/bAstbAfem9"), 10000);
  380. break;
  381. case 3:
  382. // From their core, too easy! They use an eval obfuscator too! Lmao
  383. var Init = this._00832(5);
  384. Init.setUint8(0, 87);
  385. Init.setUint32(1, 1, true);
  386. this._00835(Init);
  387.  
  388. Init = this._00832(5);
  389.  
  390. Init.setUint8(0, 100);
  391. Init.setUint32(1, 1332175218, true);
  392. this._00835(Init);
  393. break;
  394. }
  395. this._00901 = setInterval(this._00824.bind(this), 3000);
  396. this._00902 = setInterval(this._00831.bind(this), 150);
  397. }
  398. }, {
  399. key: 'generateShiftedXor',
  400. value: function generateShiftedXor(xorInt, type) {
  401. let xorKey;
  402. switch (type) {
  403. case 1:
  404. var Key = new Uint8Array([type]),
  405. offset = 0;
  406. Key[0] ^ 1;
  407. offset += 4;
  408. var wrap = Math.imul(offset, xorInt);
  409. offset -= 1;
  410. var roundoff = Math.imul(offset, xorInt);
  411. Key = (wrap - roundoff) - 1e8;
  412. Key = (Key + 231127) >> 50;
  413. xorKey = Key + ((Math.round(19.658523)) * 2) ^ 3;
  414. return xorKey;
  415. break;
  416. case 2:
  417. Key = new Uint8Array([type])
  418. offset = (Key[0] + 4) ^ 5 - 1;
  419. roundoff = Math.round(Math.acos(xorInt))
  420. wrap = (roundoff) ^ 4;
  421. Key = Math.imul((10e1) >>> roundoff ^ (
  422. (0x1196 + 0x97b * (offset + roundoff) + -0x2e07) + roundoff), wrap) - (10 >> offset) - roundoff;
  423. xorKey = (
  424. (Key ^ 10) >> 1
  425. ) ^ wrap;
  426. return xorKey;
  427. break;
  428. case 3:
  429. Key = new Uint8Array([type])
  430. var constants = [0x1196, 0x97b];
  431. roundoff = (
  432. Math.imul(11, xorInt)
  433. ) + 0x97b - 0x66c;
  434. Key = (
  435. (Math.imul(((
  436. constants[0] + constants[1] * type + -0x2e07) + 0x1) ^ 17, 16592) - 0x30d40 >> 7) +
  437. ((xorInt >> type) ^ 12) - (
  438. (constants[0] + constants[1] * type + -roundoff) + 0x1)
  439. );
  440. xorKey = ((
  441. Math.imul(type >>> 24 ^ 1, 1479) >> 1
  442. ) ^ (xorInt >> 1)) + 5 - Key;
  443. return xorKey;
  444. break;
  445. }
  446. }
  447. }, {
  448. key: '_00822',
  449. value: function _00822() {
  450. clearInterval(this._00902);
  451.  
  452. clearInterval(this._00900);
  453.  
  454. clearTimeout(this._00901);
  455. }
  456. }, {
  457. key: '_00823',
  458. value: function _00823() {}
  459. }, {
  460. key: '_00824',
  461. value: function _00824() {
  462. switch (this._00834) {
  463. case 1:
  464. var _00309 = this._00832(52);
  465. _00309.setUint8(0, 22);
  466. var o = 0;
  467. for (; o < 25; ++o) {
  468. _00309.setUint16(1 + 2 * o, o < this._00221.length ? this._00221.charCodeAt(o) : 0, true);
  469. }
  470. _00309.setUint8(51, 255)
  471. this._00835(_00309, true);
  472. break;
  473. case 2:
  474. this._00835(new Uint8Array([27]));
  475. break;
  476. case 3:
  477. _00309 = this._00832(1 + 2 * this._00221.length);
  478. _00309.setUint8(0, 0x8F);
  479. for (var i = 0; i < this._00221.length; ++i) {
  480. _00309.setUint16(1 + 2 * i, this._00221.charCodeAt(i), true);
  481. };
  482. this._00835(_00309, true);
  483. break;
  484. }
  485. }
  486. }, {
  487. key: '_00825',
  488. value: function _00825(offset) {
  489. var _00311 = this._00832(1);
  490. _00311.setUint8(0, offset);
  491. this._00835(_00311);
  492. }
  493. }, {
  494. key: '_00827',
  495. value: function _00827() {
  496. let _00313 = 268435455 & Date.now();
  497. let _00314 = this._00832(0x5);
  498. _00314.setUint8(0x0, 0x1);
  499. _00314.setUint32(0x1, _00313);
  500. this._00835(_00314, true);
  501. }
  502. }, {
  503. key: '_00828',
  504. value: function _00828() {
  505. switch (this._00834) {
  506. case 2:
  507. this._00835(new Uint8Array([33, 0, 1]));
  508. break;
  509. case 3:
  510. this._00835(new Uint8Array([17]));
  511. break;
  512. }
  513. }
  514. }, {
  515. key: '_00829',
  516. value: function _00829() {
  517. switch (this._00834) {
  518. case 2:
  519. this._00835(new Uint8Array([33, 1, 255]));
  520. break;
  521. case 3:
  522. this._00835(new Uint8Array([21]));
  523. break;
  524. }
  525. }
  526. }, {
  527. key: '_00830',
  528. value: function _00830(message) {
  529. switch (this._00834) {
  530. case 2:
  531. var _00640 = new _00483(),
  532. f = 0;
  533. _00640._00361(98);
  534. _00640._00361(f ? 1 : 0);
  535. _00640._00795(message);
  536. this._00835(_00640._00712());
  537. break;
  538. }
  539. }
  540. }, {
  541. key: '_00831',
  542. value: function _00831() {
  543. switch (this._00834) {
  544. case 1:
  545. case 2:
  546. this._00835(_00601._00205)
  547. break;
  548. case 3:
  549. var MouseBuf = this._00832(21)
  550. MouseBuf.setUint8(0, 0x7f);
  551. MouseBuf.setFloat64(1, _00601._00204.x, true);
  552. MouseBuf.setFloat64(9, _00601._00204.y, true);
  553. MouseBuf.setUint32(17, 0, true);
  554. this._00835(MouseBuf, true);
  555. break;
  556. }
  557. }
  558. }, {
  559. key: '_00832',
  560. value: function _00832(buf) {
  561. return new DataView(new ArrayBuffer(!buf ? 1 : buf))
  562. }
  563. }, {
  564. key: '_00833',
  565. get: function _00833() {
  566. return this._00218 && this._00218.readyState === 1;
  567. }
  568. }, {
  569. key: '_00834',
  570. get: function _00834() {
  571. switch (true) {
  572. case /oceanar.io/.test(this._00215):
  573. case /aquar.io/.test(this._00215):
  574. return 1;
  575. case /cellsbox.io/.test(this._00215):
  576. return 2;
  577. case /agariott.com/.test(this._00215):
  578. case /www.inciagario/.test(this._00215):
  579. return 3;
  580. }
  581. return 0;
  582. }
  583. }, {
  584. key: 'GenEnvSig',
  585. value: function GenEnvSig(length) {
  586. var result = [];
  587. var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  588. var charactersLength = characters.length;
  589. for (var i = 0; i < length; i++) {
  590. result.push(characters.charAt(Math.floor(Math.random() * charactersLength)));
  591. }
  592. return result.join('');
  593. }
  594. }, {
  595. key: '_00835',
  596. value: function _00835(data, encrypt) {
  597. if (this._00833) {
  598. if (encrypt) {
  599. this._00218.send(data.buffer);
  600. } else this._00218.send(data);
  601. }
  602. }
  603. }]);
  604. return _00403;
  605. }();
  606.  
  607. if (location.host.includes('agma.io') || location.host.includes('cellcraft.io') ||
  608. location.host.includes('agariott.com') || location.host.includes('www.inciagario.net')
  609. ) {
  610. window.WebSocket = class extends WebSocket {
  611. constructor() {
  612. let ws = super(...arguments);
  613. window.sockets?.push(this);
  614.  
  615. setTimeout(() => {
  616. ws.onmessage = new Proxy(ws.onmessage, {
  617. apply(target, thisArg, argArray) {
  618. let data = argArray[0].data;
  619. return target.apply(thisArg, argArray);
  620. }
  621. });
  622. });
  623. }
  624. }
  625.  
  626. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  627. apply(target, thisArg, argArray) {
  628. var res = target.apply(thisArg, argArray);
  629. let pkt = argArray[0];
  630. if (typeof pkt == 'string') return res;
  631. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  632. else if (pkt instanceof DataView) pkt = pkt;
  633. else pkt = new DataView(pkt.buffer);
  634. switch (pkt.getUint8(0, true)) {
  635. case 127:
  636. _00601._00204.x = pkt.getFloat64(1, true);
  637. _00601._00204.y = pkt.getFloat64(9, true);
  638. break;
  639. case 0:
  640. switch (pkt.byteLength) {
  641. case 9:
  642. _00601._00205 = pkt;
  643. break;
  644. }
  645. break;
  646. }
  647. if (_00601._00203 !== thisArg.url) {
  648. _00601._00203 = thisArg.url;
  649. }
  650. return res;
  651. }
  652. });
  653. window.addEventListener('load', () => {
  654. _00601._00801();
  655. });
  656. } else {
  657. window.addEventListener('load', () => {
  658. _00601._00801();
  659. WebSocket.prototype.realSend = WebSocket.prototype.send;
  660. WebSocket.prototype.send = function(pkt) {
  661. this.realSend(pkt);
  662. if (typeof pkt == 'string') return;
  663. if (this.url.includes('localhost')) return;
  664. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  665. else if (pkt instanceof DataView) pkt = pkt;
  666. else pkt = new DataView(pkt.buffer);
  667. switch (pkt.getUint8(0, true)) {
  668. case 185:
  669. _00601._00204.x = pkt.getFloat64(1, true);
  670. _00601._00204.y = pkt.getFloat64(9, true);
  671. break;
  672. case 5:
  673. case 14:
  674. case 239:
  675. _00601._00205 = pkt.buffer;
  676. break;
  677. }
  678. if (_00601._00203 !== this.url) {
  679. _00601._00203 = this.url;
  680. }
  681. };
  682. });
  683. }