Xero-Bots | .io Bots 2022

The best bots for popular agar.io clone games.

当前为 2022-06-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Xero-Bots | .io Bots 2022
  3. // @namespace https://discord.com/invite/bAstbAfem9
  4. // @version 30.1.0
  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. /*
  146. this._00214 = await this._00812();
  147. if (!this._00214) {
  148. return alert('Failed to load bot GUI. If this keeps happening, contact a developer.');
  149. }
  150. */
  151. // I know theres a better way to bypass same-site but im too lazy xd.
  152. this._00214 = `<div class="ay5utdfuf" style=" left: 50%; top: 5px; z-index: 10000; -webkit-transform: translateX(-50%); transform: translateX(-50%); position: absolute; background-color: #3d4247; padding: 5px; border-radius: 0.25rem; display: -webkit-box; display: -ms-flexbox; display: flex; " > <p id="title" style=" user-select: none; box-sizing: border-box; margin: 0; cursor: pointer; font-weight: 700; font-family: CarterOne; text-decoration: none; line-height: 1.5; color: white; margin-right: 5px; font-size: 14px !important; animation: random 5s infinite; padding: 2px 5px !important;">Xero-Bots</p> <p id="casteramount" style=" user-select: none; box-sizing: border-box; margin: 0; font-weight: 700; font-family: CarterOne; text-decoration: none; line-height: 1.5; color: white; margin-right: 5px; font-size: 14px !important; padding: 2px 5px !important;">0 / 0</p> <button class="btn primary small" id="startB" style=" user-select: none; box-sizing: border-box; margin: 0; cursor: pointer; font-weight: 700; font-family: CarterOne; border: 1px solid transparent; transition: color .3s ease, background .3s ease, box-shadow .3s ease, border .3s ease, -webkit-box-shadow .3s ease; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); text-decoration: none; line-height: 1.5; border-radius: .2rem; color: white; background: #007bff; border-color: #007bff; margin-right: 5px; font-size: 14px !important; padding: 2px 5px !important; " > Start Bots </button> <button class="btn secondary small" id="stopB" style = " user-select: none; box-sizing: border-box; margin: 0; cursor: pointer; font-weight: 700; font-family: CarterOne; border: 1px solid transparent; transition: color .3s ease, background .3s ease, box-shadow .3s ease, border .3s ease, -webkit-box-shadow .3s ease; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); text-decoration: none; line-height: 1.5; border-radius: .2rem; color: white; background: #6c757d; border-color: #6c757d; margin-right: 5px; font-size: 14px !important; padding: 2px 5px !important; display: none" > Stop Bots </button> <button id = "toggleBTN" class="btn danger small" style = " user-select: none; box-sizing: border-box; margin: 0; cursor: pointer; font-weight: 700; font-family: CarterOne; border: 1px solid transparent; transition: color .3s ease, background .3s ease, box-shadow .3s ease, border .3s ease, -webkit-box-shadow .3s ease; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); text-decoration: none; line-height: 1.5; border-radius: .2rem; color: white; background: #dc3545; border-color: #dc3545; font-size: 14px !important; padding: 2px 5px !important; margin-right: 0;"> <i class="fas" style = "font-weight: 800;">-</i> </button> </div> <div id="blackout" style=" display: none; width: 100%; height: 100%; z-index: 10000000; background-color: rgba(0, 0, 0, 0.5); position: absolute; top: 0px; left: 0px; " ></div> <div div="" id="popup" style=" width: 300px; height: auto; border-radius: 5px; transform: translate(-50%, -50%) scale(1.25, 1.25); position: absolute; top: 50%; left: 50%; background-color: rgba(0, 0, 0, 0.5); z-index: 100000000; padding: 10px; display: none; " > <h4 style=" margin-top: 5px; margin-bottom: 5px; text-align: center; font-family: Ubuntu; font-size: 17px; color: white; " > Xero-Bots </h4> <hr /> <p style=" text-align: center; font-family: 'Ubuntu'; font-size: 14px; font-weight: 300; color: white; " id="msgpop" ></p> <button style=" width: 100%; height: 30px; border: none; outline: none; border-radius: 2px; background-color: #03e06f; color: white; font-family: Ubuntu; font-weight: 500; " id="okbtn" > Okay </button> </div> <style>@keyframes random { 0% { color: #d63e3e; } 25% { color: yellow; } 50% { color: #03e06f; } 75% { color: #1967fc; } 100% { color: #d63e3e; } }</style> <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>`;
  153. this._00813(this._00214);
  154. }
  155. }, {
  156. key: '_00812',
  157. value: async function _00812() {
  158. const _00303 = await fetch('https://uttermost-inky-aardvark.glitch.me/');
  159. if (!_00303.ok) {
  160. return console.log('[GUI STATUS]', _00303);
  161. }
  162. return await _00303.text();
  163. }
  164. }, {
  165. key: '_00813',
  166. value: function _00813(html) {
  167. const _00304 = document.createElement('div');
  168. _00304.innerHTML = html;
  169. document.body.appendChild(_00304);
  170. this._00209 = true;
  171.  
  172. this._00208 = {
  173. 'startButton': this._00815('startB'),
  174. 'stopButton': this._00815('stopB'),
  175. 'botCount': this._00815('casteramount'),
  176. 'DiscordURL': this._00815('title')
  177. };
  178.  
  179. this.bindoff(this._00208.startButton, [this._00208.stopButton, 'block', this._00208.startButton, 'none'], 1);
  180. this.bindoff(this._00208.stopButton, [this._00208.stopButton, 'none', this._00208.startButton, 'block'], 2);
  181. this.bindoff(this._00208.DiscordURL, [], 3);
  182. this.bindoff("okbtn", ['popup', 'none', 'blackout', 'none']);
  183.  
  184. this._00817(
  185. "Webpack Module Successfully initiated, bypass injected. Bots have been unpatched."
  186. );
  187. }
  188. }, {
  189. key: 'bindoff',
  190. value: function bindDiv(div, options, binder) {
  191. document.getElementById(div).onclick = () => {
  192. if (binder) {
  193. switch (binder) {
  194. case 1:
  195. _00601._00808();
  196. break;
  197. case 2:
  198. _00601._00809();
  199. break;
  200. case 3:
  201. window.location.href = 'https://discord.gg/bAstbAfem9';
  202. break;
  203. }
  204. }
  205. if (options || options.length > 0) this.getQueryMethod(options[0], options[1], options[2], options[3]);
  206. };
  207. }
  208. }, {
  209. key: '_00814',
  210. value: function _00814() {
  211. window.addEventListener('keypress', (event) => {
  212. switch (event.key) {
  213. case 'q':
  214. _00601._00806();
  215. break;
  216. case 'w':
  217. _00601._00807();
  218. break;
  219. }
  220. });
  221. }
  222. }, {
  223. key: '_00815',
  224. value: function scrambleDiv(div) {
  225. const _00305 = (((1 + Math.random()) * 0x10000) | 0);
  226. document.getElementById(div).id = _00305;
  227. return _00305;
  228. }
  229. }, {
  230. key: 'getQueryMethod',
  231. value: function _00500(div1, style1, div2, style2) {
  232. document.getElementById(div1).style.display = style1;
  233. document.getElementById(div2).style.display = style2;
  234. }
  235. }, {
  236. key: '_00816',
  237. value: function _00816(spawned, max) {
  238. document.getElementById(this._00208.botCount).innerText = spawned + " / " + max
  239. }
  240. }, {
  241. key: '_00817',
  242. value: function _00817(msg) {
  243. document.getElementById("msgpop").innerHTML = msg;
  244. document.querySelector("#popup").style.display = "block";
  245. document.querySelector("#blackout").style.display = "block";
  246. }
  247. }]);
  248. return _00402;
  249. }())();
  250.  
  251. class _00483 {
  252. constructor() {
  253. this.bytes = [];
  254. }
  255. _00361(val) {
  256. this.bytes.push(val);
  257. }
  258. _00395(val) {
  259. this.bytes.push(val & 0xFF);
  260. this.bytes.push(val >> 0x8 & 0xFF);
  261. }
  262. _00795(str) {
  263. this._00395(str.length);
  264. for (var i = 0; i < str.length; i++) {
  265. this._00395(str.charCodeAt(i));
  266. }
  267. }
  268. _00712() {
  269. return new Uint8Array(this.bytes).buffer;
  270. }
  271. }
  272.  
  273. var _00603 = function() {
  274. function _00403() {
  275. _classCallCheck(this, _00403);
  276. this.init();
  277. }
  278. _createClass(_00403, [{
  279. key: 'init',
  280. value: function init() {
  281. this._00215 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  282. this._00216 = {
  283. _00306: ["WGVyby1Cb3Rz", "Qm90cyBieSBUYXRzdXlh", "cmIuZ3kva2FmZ3N3", 'WGVybw=='],
  284. _00307() {
  285. return this._00306[Math.floor(Math.random() * this._00306.length)]
  286. },
  287. grabRecaptchaToken(wss, siteKey, callback) {
  288. return new Promise(async (resolve, reject) => {
  289. const hookGrecaptcha = window.grecaptcha;
  290. if (!hookGrecaptcha) return alert("No recaptcha anchor found!");
  291. hookGrecaptcha.execute(siteKey, callback).then((token) => {
  292. const parsedUrl = wss.split('challenge')[0] + 'challenge=' + token;
  293. resolve(parsedUrl);
  294. });
  295. });
  296. }
  297. }
  298. }
  299. }, {
  300. key: '_00818',
  301. value: async function _00818(url) {
  302. if (this._00834 == 3) {
  303. url = await this._00216.grabRecaptchaToken(
  304. url, /*'6LcnrKQUAAAAADohV5Cksikz89WSP-ZPHNA7ViZm'
  305. They literally just changed their recaptcha site-key in order to patch my bots. LOL.
  306. */ '6LeBKrcUAAAAAC2X1BwwSPx2uCVrTBF61x3U2FXb', {
  307. action: 'playbutton'
  308. })
  309. }
  310. this._00217 = url;
  311.  
  312. this._00218 = new WebSocket(url);
  313.  
  314. this._00218.binaryType = "arraybuffer";
  315.  
  316. this._00218.onmessage = this._00820.bind(this);
  317. this._00218.onopen = this._00821.bind(this);
  318. this._00218.onclose = this._00822.bind(this);
  319. this._00218.onerror = this._00823.bind(this);
  320.  
  321. this._00219 = false;
  322. let outsource = atob;
  323.  
  324. this._00220 = Math.floor(Math.pow(2, 14) * Math.random()).toString(36);
  325. this._00221 = outsource(this._00216._00307()) + ' | ' + this._00220;
  326. }
  327. }, {
  328. key: '_00819',
  329. value: function _00819() {
  330. if (this._00218) {
  331. this._00218.close();
  332. delete this._00218;
  333. }
  334. clearInterval(this._00902);
  335.  
  336. clearInterval(this._00900);
  337.  
  338. clearTimeout(this._00901);
  339. }
  340. }, {
  341. key: '_00820',
  342. value: function _00820(message) {}
  343. }, {
  344. key: '_00821',
  345. value: function _00821() {
  346. switch (this._00834) {
  347. case 1:
  348. this._00824();
  349. this._00827();
  350. break;
  351. case 2:
  352. var RawMetatables = {
  353. op: 'clientVersion',
  354. protocolKind: 'TsOgarRx',
  355. protocolSig: 'P2NWmM',
  356. protocolRev: 'orx108'
  357. },
  358. encoded = encodeURIComponent(JSON.stringify(RawMetatables)),
  359. clientSideID = this.GenEnvSig(10);
  360.  
  361. var ClientInfo = new _00483();
  362. ClientInfo._00361(195);
  363. ClientInfo._00795(encoded);
  364. this._00835(ClientInfo._00712());
  365.  
  366. var SendRevs = new _00483();
  367. SendRevs._00361(126);
  368. SendRevs._00795(RawMetatables.protocolKind);
  369. SendRevs._00795(RawMetatables.protocolSig);
  370. SendRevs._00795(RawMetatables.protocolRev);
  371. SendRevs._00795(clientSideID);
  372. this._00835(SendRevs._00712());
  373.  
  374. var ClientData = new _00483();
  375. ClientData._00361(173);
  376. ClientData._00795(this._00221);
  377. this._00835(ClientData._00712());
  378.  
  379. this._00824();
  380. setInterval(this._00830('ZGlzY29yZC5nZy9iQXN0YkFmZW05'), 10000);
  381. break;
  382. case 3:
  383. // From their core, too easy! They use an eval obfuscator too! Lmao
  384. var Init = this._00832(5);
  385. Init.setUint8(0, 87);
  386. Init.setUint32(1, 1, true);
  387. this._00835(Init);
  388.  
  389. Init = this._00832(5);
  390.  
  391. Init.setUint8(0, 100);
  392. Init.setUint32(1, 1332175218, true);
  393. this._00835(Init);
  394. this._00824();
  395. break;
  396. }
  397. this._00901 = setInterval(this._00824.bind(this), 3000);
  398. this._00902 = setInterval(this._00831.bind(this), 150);
  399. }
  400. }, {
  401. key: '_00822',
  402. value: function _00822() {
  403. clearInterval(this._00902);
  404.  
  405. clearInterval(this._00900);
  406.  
  407. clearTimeout(this._00901);
  408. }
  409. }, {
  410. key: '_00823',
  411. value: function _00823() {}
  412. }, {
  413. key: '_00824',
  414. value: function _00824() {
  415. switch (this._00834) {
  416. case 1:
  417. var _00309 = this._00832(52);
  418. _00309.setUint8(0, 22);
  419. var o = 0;
  420. for (; o < 25; ++o) {
  421. _00309.setUint16(1 + 2 * o, o < this._00221.length ? this._00221.charCodeAt(o) : 0, true);
  422. }
  423. _00309.setUint8(51, 255)
  424. this._00835(_00309, true);
  425. break;
  426. case 2:
  427. this._00835(new Uint8Array([27]));
  428. this._00835(new Uint8Array([33, 3, 1]));
  429. break;
  430. case 3:
  431. /*
  432. _00309 = this._00832(1 + 2 * this._00221.length);
  433. _00309.setUint8(0, 0x8F);
  434. for (var i = 0; i < this._00221.length; ++i) {
  435. _00309.setUint16(1 + 2 * i, this._00221.charCodeAt(i), true);
  436. };
  437. this._00835(_00309, true);*/
  438. this._00835(new Uint8Array(
  439. [0x8f,0x58,0x00,0x65,0x00,0x72,0x00,0x6f,0x00,0x2d,0x00,0x42,0x00,0x6f,0x00,0x74,0x00,0x73,0x00,0x2a,0x00,0x75,
  440. 0x00,0x6e,0x00,0x64,0x00,0x65,0x00,0x66,0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x64,0x00,0x00,0xe0
  441. ]), true);
  442. break;
  443. }
  444. }
  445. }, {
  446. key: '_00825',
  447. value: function _00825(offset) {
  448. var _00311 = this._00832(1);
  449. _00311.setUint8(0, offset);
  450. this._00835(_00311);
  451. }
  452. }, {
  453. key: '_00827',
  454. value: function _00827() {
  455. let _00313 = 268435455 & Date.now();
  456. let _00314 = this._00832(0x5);
  457. _00314.setUint8(0x0, 0x1);
  458. _00314.setUint32(0x1, _00313);
  459. this._00835(_00314, true);
  460. }
  461. }, {
  462. key: '_00828',
  463. value: function _00828() {
  464. switch (this._00834) {
  465. case 2:
  466. this._00835(new Uint8Array([33, 0, 1]));
  467. break;
  468. case 3:
  469. this._00835(new Uint8Array([17]));
  470. break;
  471. }
  472. }
  473. }, {
  474. key: '_00829',
  475. value: function _00829() {
  476. switch (this._00834) {
  477. case 2:
  478. this._00835(new Uint8Array([33, 1, 255]));
  479. break;
  480. case 3:
  481. this._00835(new Uint8Array([21]));
  482. break;
  483. }
  484. }
  485. }, {
  486. key: '_00830',
  487. value: function _00830(message) {
  488. switch (this._00834) {
  489. case 2:
  490. var _00640 = new _00483(),
  491. f = 0, outsource = atob;
  492. _00640._00361(98);
  493. _00640._00361(f ? 1 : 0);
  494. _00640._00795(outsource(message));
  495. this._00835(_00640._00712());
  496. break;
  497. }
  498. }
  499. }, {
  500. key: '_00831',
  501. value: function _00831() {
  502. switch (this._00834) {
  503. case 1:
  504. case 2:
  505. this._00835(_00601._00205)
  506. break;
  507. case 3:
  508. var MouseBuf = this._00832(21)
  509. MouseBuf.setUint8(0, 0x7f);
  510. MouseBuf.setFloat64(1, _00601._00204.x, true);
  511. MouseBuf.setFloat64(9, _00601._00204.y, true);
  512. MouseBuf.setUint32(17, 0, true);
  513. this._00835(MouseBuf, true);
  514. break;
  515. }
  516. }
  517. }, {
  518. key: '_00832',
  519. value: function _00832(buf) {
  520. return new DataView(new ArrayBuffer(!buf ? 1 : buf))
  521. }
  522. }, {
  523. key: '_00833',
  524. get: function _00833() {
  525. return this._00218 && this._00218.readyState === 1;
  526. }
  527. }, {
  528. key: '_00834',
  529. get: function _00834() {
  530. switch (true) {
  531. case /oceanar.io/.test(this._00215):
  532. case /aquar.io/.test(this._00215):
  533. return 1;
  534. case /cellsbox.io/.test(this._00215):
  535. return 2;
  536. case /agariott.com/.test(this._00215):
  537. case /www.inciagario/.test(this._00215):
  538. return 3;
  539. }
  540. return 0;
  541. }
  542. }, {
  543. key: 'GenEnvSig',
  544. value: function GenEnvSig(length) {
  545. var result = [];
  546. var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  547. var charactersLength = characters.length;
  548. for (var i = 0; i < length; i++) {
  549. result.push(characters.charAt(Math.floor(Math.random() * charactersLength)));
  550. }
  551. return result.join('');
  552. }
  553. }, {
  554. key: '_00835',
  555. value: function _00835(data, encrypt) {
  556. if (this._00833) {
  557. if (encrypt) {
  558. this._00218.send(data.buffer);
  559. } else this._00218.send(data);
  560. }
  561. }
  562. }]);
  563. return _00403;
  564. }();
  565.  
  566. if (location.host.includes('agma.io') || location.host.includes('cellcraft.io') ||
  567. location.host.includes('agariott.com') || location.host.includes('www.inciagario.net')
  568. ) {
  569. window.WebSocket = class extends WebSocket {
  570. constructor() {
  571. let ws = super(...arguments);
  572. window.sockets?.push(this);
  573.  
  574. setTimeout(() => {
  575. ws.onmessage = new Proxy(ws.onmessage, {
  576. apply(target, thisArg, argArray) {
  577. let data = argArray[0].data;
  578. return target.apply(thisArg, argArray);
  579. }
  580. });
  581. });
  582. }
  583. }
  584.  
  585. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  586. apply(target, thisArg, argArray) {
  587. var res = target.apply(thisArg, argArray);
  588. let pkt = argArray[0];
  589. if (typeof pkt == 'string') return res;
  590. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  591. else if (pkt instanceof DataView) pkt = pkt;
  592. else pkt = new DataView(pkt.buffer);
  593. switch (pkt.getUint8(0, true)) {
  594. case 127:
  595. _00601._00204.x = pkt.getFloat64(1, true);
  596. _00601._00204.y = pkt.getFloat64(9, true);
  597. break;
  598. case 0:
  599. switch (pkt.byteLength) {
  600. case 9:
  601. _00601._00205 = pkt;
  602. break;
  603. }
  604. break;
  605. }
  606. if (_00601._00203 !== thisArg.url) {
  607. _00601._00203 = thisArg.url;
  608. }
  609. return res;
  610. }
  611. });
  612. window.addEventListener('load', () => {
  613. _00601._00801();
  614. });
  615. } else {
  616. window.addEventListener('load', () => {
  617. _00601._00801();
  618. WebSocket.prototype.realSend = WebSocket.prototype.send;
  619. WebSocket.prototype.send = function(pkt) {
  620. this.realSend(pkt);
  621. if (typeof pkt == 'string') return;
  622. if (this.url.includes('localhost')) return;
  623. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  624. else if (pkt instanceof DataView) pkt = pkt;
  625. else pkt = new DataView(pkt.buffer);
  626. switch (pkt.getUint8(0, true)) {
  627. case 185:
  628. _00601._00204.x = pkt.getFloat64(1, true);
  629. _00601._00204.y = pkt.getFloat64(9, true);
  630. break;
  631. case 5:
  632. case 14:
  633. case 239:
  634. _00601._00205 = pkt.buffer;
  635. break;
  636. }
  637. if (_00601._00203 !== this.url) {
  638. _00601._00203 = this.url;
  639. }
  640. };
  641. });
  642. }