Xero-Bots | .io Bots 2022

The best bots for popular agar.io clone games.

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

  1. // ==UserScript==
  2. // @name Xero-Bots | .io Bots 2022
  3. // @namespace https://discord.com/invite/bAstbAfem9
  4. // @version 30.0.3
  5. // @description The best bots for popular agar.io clone games.
  6. // @author Tatsuya & Enes
  7. // @match *.oceanar.io/*
  8. // @match *.aquar.io/*
  9. // @run-at document-start
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=cellcraft.io
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. function _classCallCheck(instance, Constructor) {
  15. if (!(instance instanceof Constructor)) {
  16. throw new TypeError("Cannot call a class as a function");
  17. }
  18. }
  19.  
  20. var _createClass = function () {
  21. function defineProperties(target, props) {
  22. for (var i = 0; i < props.length; i++) {
  23. var descriptor = props[i];
  24. descriptor.enumerable = descriptor.enumerable || false;
  25. descriptor.configurable = true;
  26. if ("value" in descriptor) descriptor.writable = true;
  27. Object.defineProperty(target, descriptor.key, descriptor);
  28. }
  29. }
  30. return function (Constructor, protoProps, staticProps) {
  31. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  32. if (staticProps) defineProperties(Constructor, staticProps);
  33. return Constructor;
  34. };
  35. }();
  36.  
  37. var _00601 = new (function () {
  38. function _00401() {
  39. _classCallCheck(this, _00401);
  40. }
  41. _createClass(_00401, [{
  42. key: '_00801',
  43. value: function _00801() {
  44. this._00201 = [];
  45. this._00202 = this._00802;
  46. this._00203 = '';
  47. this._00204 = {
  48. 'x': 0,
  49. 'y': 0
  50. };
  51. this._00205 = null;
  52. this._00206 = false;
  53. this._00207 = _00602._00810();
  54. this._00804();
  55. }
  56. }, {
  57. key: '_00802',
  58. get: function _00802() {
  59. let _00300 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  60. if (_00300 == "agma.io" || _00300 == "cellcraft.io" || _00300 == "oceanar.io" || _00300 == "aquar.io") {
  61. return 50;
  62. } else {
  63. return 15;
  64. }
  65. }
  66. }, {
  67. key: '_00803',
  68. get: function _00803() {
  69. return this._00201.filter(b => b._00218 && b._00218.readyState === WebSocket.OPEN).length;
  70. }
  71. }, {
  72. key: '_00804',
  73. value: function _00804() {
  74. for (let _00301 = 0; _00301 < this._00202; _00301++) {
  75. this._00201.push(new _00603())
  76. };
  77. this._00805();
  78. }
  79. }, {
  80. key: '_00805',
  81. value: function _00805() {
  82. this._00302 = setInterval(() => {
  83. _00602._00816(this._00803, this._00202)
  84. }, 1000)
  85. }
  86. }, {
  87. key: '_00806',
  88. value: function _00806() {
  89. this._00201.forEach((bot) => {
  90. bot._00828()
  91. })
  92. }
  93. }, {
  94. key: '_00807',
  95. value: function _00807() {
  96. this._00201.forEach((bot) => {
  97. bot._00829()
  98. })
  99. }
  100. }, {
  101. key: '_00808',
  102. value: function _00808() {
  103. if (this._00206 || !this._00203) return;
  104. if (this._00203 == undefined) return;
  105. this._00201.forEach((bot) => {
  106. bot._00818(this._00203)
  107. });
  108. this._00206 = true
  109. }
  110. }, {
  111. key: '_00809',
  112. value: function _00809() {
  113. if (!this._00206) return;
  114. this._00201.forEach((bot) => {
  115. bot._00819()
  116. });
  117. this._00206 = false
  118. }
  119. }]);
  120. return _00401;
  121. }())();
  122.  
  123. var _00602 = new (function () {
  124. function _00402() {
  125. _classCallCheck(this, _00402);
  126. }
  127. _createClass(_00402, [{
  128. key: '_00810',
  129. value: function _00810(start, stop, split, eject) {
  130. this._00208 = {
  131. 'startButton': 'startB',
  132. 'stopButton': 'stopB',
  133. 'botCount': 'casteramount',
  134. 'DiscordURL': 'title'
  135. };
  136. this._00209 = false;
  137. this._00811();
  138. this._00814();
  139. }
  140. }, {
  141. key: '_00811',
  142. value: async function _00811() {
  143. this._00214 = await this._00812();
  144. if (!this._00214) {
  145. return alert('Failed to load bot GUI. If this keeps happening, contact a developer.');
  146. }
  147. this._00813(this._00214);
  148. }
  149. }, {
  150. key: '_00812',
  151. value: async function _00812() {
  152. const _00303 = await fetch('https://uttermost-inky-aardvark.glitch.me/');
  153. if (!_00303.ok) {
  154. return console.log('[GUI STATUS]', _00303);
  155. }
  156. return await _00303.text();
  157. }
  158. }, {
  159. key: '_00813',
  160. value: function _00813(html) {
  161. const _00304 = document.createElement('div');
  162. _00304.innerHTML = html;
  163. document.body.appendChild(_00304);
  164. this._00209 = true;
  165. this._00815('startB', 'startButton');
  166. this._00815('stopB', 'stopButton');
  167. this._00815('casteramount', 'botCount');
  168. this._00815('title', 'DiscordURL');
  169. document.getElementById(this._00208.startButton).onclick = () => {
  170. _00601._00808();
  171. this.getQueryMethod(this._00208.stopButton, 'block', this._00208.startButton, 'none');
  172. };
  173. document.getElementById(this._00208.stopButton).onclick = () => {
  174. _00601._00809();
  175. this.getQueryMethod(this._00208.stopButton, 'none', this._00208.startButton, 'block');
  176. };
  177. document.getElementById(this._00208.DiscordURL).onclick = () => {
  178. window.location.href = 'https://discord.gg/bAstbAfem9'
  179. };
  180. document.getElementById("okbtn").onclick = () => {
  181. this.getQueryMethod('popup', 'none', 'blackout', 'none');
  182. };
  183. this._00817(
  184. "Webpack Module Successfully initiated, bypass injected. 𝙉𝙞𝙘𝙚 𝙥𝙖𝙩𝙘𝙝 𝘼𝙜𝙖𝙧.𝙡𝙞𝙫𝙚 𝙙𝙚𝙫𝙨, 𝙩𝙧𝙮 𝙩𝙤 𝙗𝙡𝙤𝙘𝙠 𝙢𝙮 𝙂𝙐𝙄 𝙖𝙜𝙖𝙞𝙣 :)"
  185. );
  186. }
  187. }, {
  188. key: '_00814',
  189. value: function _00814() {
  190. window.addEventListener('keypress', (event) => {
  191. switch (event.key) {
  192. case 'q':
  193. _00601._00806();
  194. break;
  195. case 'w':
  196. _00601._00807();
  197. break;
  198. }
  199. });
  200. }
  201. }, {
  202. key: '_00815',
  203. value: function _00815(div, callback) {
  204. const _00305 = (((1 + Math.random()) * 0x10000) | 0);
  205. document.getElementById(div).id = _00305;
  206. this._00208[callback] = _00305;
  207. }
  208. }, {
  209. key: 'getQueryMethod',
  210. value: function _00500(div1, style1, div2, style2) {
  211. document.getElementById(div1).style.display = style1;
  212. document.getElementById(div2).style.display = style2;
  213. }
  214. }, {
  215. key: '_00816',
  216. value: function _00816(spawned, max) {
  217. document.getElementById(this._00208.botCount).innerText = spawned + " / " + max
  218. }
  219. }, {
  220. key: '_00817',
  221. value: function _00817(msg) {
  222. document.getElementById("msgpop").innerHTML = msg;
  223. document.querySelector("#popup").style.display = "block";
  224. document.querySelector("#blackout").style.display = "block";
  225. }
  226. }]);
  227. return _00402;
  228. }())();
  229.  
  230. class _00603 {
  231. constructor() {
  232. this._00215 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  233. this._00216 = {
  234. _00306: ["discord.gg/bAstbAfem9", "rb.gy/kafgsw", "Xero-Bots", "Nice try devs!"],
  235. _00307() {
  236. return this._00306[Math.floor(Math.random() * this._00306.length)]
  237. }
  238. }
  239. }
  240. _00818(url) {
  241. this._00217 = url;
  242.  
  243. this._00218 = new WebSocket(url);
  244.  
  245. this._00218.binaryType = "arraybuffer";
  246.  
  247. this._00218.onmessage = this._00820.bind(this);
  248. this._00218.onopen = this._00821.bind(this);
  249. this._00218.onclose = this._00822.bind(this);
  250. this._00218.onerror = this._00823.bind(this);
  251.  
  252. this._00219 = false;
  253.  
  254. this._00220 = Math.floor(Math.pow(2, 14) * Math.random()).toString(36);
  255. this._00221 = this._00216._00307() + ' | ' + this._00220;
  256. }
  257. _00819() {
  258. if (this._00218) {
  259. this._00218.close();
  260. delete this._00218;
  261. }
  262. clearInterval(this._00902);
  263.  
  264. clearInterval(this._00900);
  265.  
  266. clearTimeout(this._00901);
  267. }
  268. _00820(message) { }
  269. _00821() {
  270. if (this._00834 == 1) {
  271. this._00824();
  272. this._00827();
  273. }
  274. this._00901 = setInterval(this._00824.bind(this), 3000);
  275. this._00902 = setInterval(this._00831.bind(this), 150);
  276. }
  277. _00822() {
  278. clearInterval(this._00902);
  279.  
  280. clearInterval(this._00900);
  281.  
  282. clearTimeout(this._00901);
  283. }
  284. _00823() { }
  285. _00824() {
  286. if (this._00834 == 1) {
  287. let _00309 = this._00832(52);
  288. _00309.setUint8(0, 22);
  289. var o = 0;
  290. for (; o < 25; ++o) {
  291. _00309.setUint16(1 + 2 * o, o < this._00221.length ? this._00221.charCodeAt(o) : 0, true);
  292. }
  293. _00309.setUint8(51, 255)
  294. this._00835(_00309);
  295. }
  296. }
  297. _00825(offset) {
  298. var _00311 = this._00832(1);
  299. _00311.setUint8(0, offset);
  300. this._00835(_00311);
  301. }
  302. _00827() {
  303. let _00313 = 268435455 & Date.now();
  304. let _00314 = this._00832(0x5);
  305. _00314.setUint8(0x0, 0x1);
  306. _00314.setUint32(0x1, _00313);
  307. this._00835(_00314);
  308. }
  309. _00828() {
  310. }
  311. _00829() {
  312. }
  313. _00830(message) {
  314. }
  315. _00831() {
  316. if (this._00834 == 1) {
  317. this._00835(_00601._00205)
  318. }
  319. }
  320. _00832(buf) {
  321. return new DataView(new ArrayBuffer(!buf ? 1 : buf))
  322. }
  323. get _00833() {
  324. return this._00218 && this._00218.readyState === WebSocket.OPEN;
  325. }
  326. get _00834() {
  327. switch (true) {
  328. case /oceanar.io/.test(this._00215):
  329. case /aquar.io/.test(this._00215):
  330. return 1;
  331. case /cellcraft.io/.test(this._00215):
  332. return 3;
  333. }
  334. return 0;
  335. }
  336. _00835(data, encrypt) {
  337. if (this._00833) {
  338. if (encrypt) {
  339. this._00218.send(data.buffer);
  340. } else this._00218.send(data);
  341. }
  342. }
  343. }
  344.  
  345. if (location.host.includes('agma.io') || location.host.includes('cellcraft.io')) {
  346. window.WebSocket = class extends WebSocket {
  347. constructor() {
  348. let ws = super(...arguments);
  349. window.sockets?.push(this);
  350.  
  351. setTimeout(() => {
  352. ws.onmessage = new Proxy(ws.onmessage, {
  353. apply(target, thisArg, argArray) {
  354. let data = argArray[0].data;
  355. return target.apply(thisArg, argArray);
  356. }
  357. });
  358. });
  359. }
  360. }
  361.  
  362. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  363. apply(target, thisArg, argArray) {
  364. var res = target.apply(thisArg, argArray);
  365. let pkt = argArray[0];
  366. if (typeof pkt == 'string') return res;
  367. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  368. else if (pkt instanceof DataView) pkt = pkt;
  369. else pkt = new DataView(pkt.buffer);
  370. switch (pkt.getUint8(0, true)) {
  371. case 0:
  372. switch (pkt.byteLength) {
  373. case 9:
  374. _00601._00205 = pkt;
  375. break;
  376. }
  377. break;
  378. }
  379. if (_00601._00203 !== thisArg.url) {
  380. _00601._00203 = thisArg.url;
  381. }
  382. return res;
  383. }
  384. });
  385. window.addEventListener('load', () => {
  386. _00601._00801();
  387. });
  388. } else {
  389. window.addEventListener('load', () => {
  390. _00601._00801();
  391. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  392. apply(target, thisArg, argArray) {
  393. var res = target.apply(thisArg, argArray);
  394. let pkt = argArray[0];
  395. if (!_00601) return;
  396. if (typeof pkt == 'string') return res;
  397. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  398. else if (pkt instanceof DataView) pkt = pkt;
  399. else pkt = new DataView(pkt.buffer);
  400. switch (pkt.getUint8(0, true)) {
  401. case 16:
  402. case 185:
  403. _00601._00204.x = pkt.getFloat64(1, true);
  404. _00601._00204.y = pkt.getFloat64(9, true);
  405. break;
  406. case 5:
  407. case 14:
  408. case 239:
  409. _00601._00205 = pkt.buffer;
  410. break;
  411. }
  412. if (_00601._00203 !== thisArg.url) {
  413. _00601._00203 = thisArg.url;
  414. }
  415. return res;
  416. }
  417. });
  418. })
  419. }