Xero-Bots | .io Bots 2022

The best bots for popular agar.io clone games.

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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Xero-Bots | .io Bots 2022
// @namespace    https://discord.com/invite/bAstbAfem9
// @version      30.1.1
// @description  The best bots for popular agar.io clone games.
// @author       Tatsuya & Enes
// @match        *.oceanar.io/*
// @match        *.aquar.io/*
// @match        *.cellsbox.io/*
// @match        *.www.inciagario.net/*
// @run-at       document-start
// @icon         https://www.google.com/s2/favicons?sz=64&domain=cellcraft.io
// @grant        none
// ==/UserScript==

function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}

var _createClass = function() {
    function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
            var descriptor = props[i];
            descriptor.enumerable = descriptor.enumerable || false;
            descriptor.configurable = true;
            if ("value" in descriptor) descriptor.writable = true;
            Object.defineProperty(target, descriptor.key, descriptor);
        }
    }
    return function(Constructor, protoProps, staticProps) {
        if (protoProps) defineProperties(Constructor.prototype, protoProps);
        if (staticProps) defineProperties(Constructor, staticProps);
        return Constructor;
    };
}();

var _00601 = new(function() {
    function _00401() {
        _classCallCheck(this, _00401);
    }
    _createClass(_00401, [{
        key: '_00801',
        value: function _00801() {
            this._00201 = [];
            this._00202 = this._00802;
            this._00203 = '';
            this._00204 = {
                'x': 0,
                'y': 0
            };
            this._00205 = null;
            this._00206 = false;
            this._00207 = _00602._00810();
            this._00804();
        }
    }, {
        key: '_00802',
        get: function _00802() {
            let _00300 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
            if (_00300 == "agma.io" || _00300 == "cellcraft.io" || _00300 == "oceanar.io" || _00300 == "aquar.io") {
                return 50;
            } else if (_00300 == "cellsbox.io" || _00300 == "www.inciagario") {
                return 15;
            } else {
                return 15;
            }
        }
    }, {
        key: '_00803',
        get: function _00803() {
            return this._00201.filter(bot => bot._00218 && bot._00218.readyState === WebSocket.OPEN).length;
        }
    }, {
        key: '_00804',
        value: function _00804() {
            for (let _00301 = 0; _00301 < this._00202; _00301++) {
                this._00201.push(new _00603())
            };
            this._00805();
        }
    }, {
        key: '_00805',
        value: function _00805() {
            this._00302 = setInterval(() => {
                if (!_00602._00209) return;
                _00602._00816(this._00803, this._00202)
            }, 1000)
        }
    }, {
        key: '_00806',
        value: function _00806() {
            this._00201.forEach((bot) => {
                bot._00828()
            })
        }
    }, {
        key: '_00807',
        value: function _00807() {
            this._00201.forEach((bot) => {
                bot._00829()
            })
        }
    }, {
        key: '_00808',
        value: function _00808() {
            if (this._00206 || !this._00203) return;
            if (this._00203 == undefined) return;
            this._00201.forEach((bot) => {
                bot._00818(this._00203)
            });
            this._00206 = true
        }
    }, {
        key: '_00809',
        value: function _00809() {
            if (!this._00206) return;
            this._00201.forEach((bot) => {
                bot._00819()
            });
            this._00206 = false
        }
    }]);
    return _00401;
}())();

var _00602 = new(function() {
    function _00402() {
        _classCallCheck(this, _00402);
    }
    _createClass(_00402, [{
        key: '_00810',
        value: function _00810() {
            this._00209 = false;
            this._00811();
            this._00814();
        }
    }, {
        key: '_00811',
        value: async function _00811() {
            /*
            this._00214 = await this._00812();
            if (!this._00214) {
                return alert('Failed to load bot GUI. If this keeps happening, contact a developer.');
            }
            */
            // I know theres a better way to bypass same-site but im too lazy xd.
            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>`;
            this._00813(this._00214);
        }
    }, {
        key: '_00812',
        value: async function _00812() {
            const _00303 = await fetch('https://uttermost-inky-aardvark.glitch.me/');
            if (!_00303.ok) {
                return console.log('[GUI STATUS]', _00303);
            }
            return await _00303.text();
        }
    }, {
        key: '_00813',
        value: function _00813(html) {
            const _00304 = document.createElement('div');
            _00304.innerHTML = html;
            document.body.appendChild(_00304);
            this._00209 = true;

            this._00208 = {
                'startButton': this._00815('startB'),
                'stopButton': this._00815('stopB'),
                'botCount': this._00815('casteramount'),
                'DiscordURL': this._00815('title')
            };

            this.bindoff(this._00208.startButton, [this._00208.stopButton, 'block', this._00208.startButton, 'none'], 1);
            this.bindoff(this._00208.stopButton, [this._00208.stopButton, 'none', this._00208.startButton, 'block'], 2);
            this.bindoff(this._00208.DiscordURL, [], 3);
            this.bindoff("okbtn", ['popup', 'none', 'blackout', 'none']);

            this._00817(
                "Webpack Module Successfully initiated."
            );
        }
    }, {
        key: 'bindoff',
        value: function bindDiv(div, options, binder) {
            document.getElementById(div).onclick = () => {
                if (binder) {
                    switch (binder) {
                        case 1:
                            _00601._00808();
                            break;
                        case 2:
                            _00601._00809();
                            break;
                        case 3:
                            window.location.href = 'https://discord.gg/bAstbAfem9';
                            break;
                    }
                }
                if (options || options.length > 0) this.getQueryMethod(options[0], options[1], options[2], options[3]);
            };
        }
    }, {
        key: '_00814',
        value: function _00814() {
            window.addEventListener('keypress', (event) => {
                switch (event.key) {
                    case 'q':
                        _00601._00806();
                        break;
                    case 'w':
                        _00601._00807();
                        break;
                }
            });
        }
    }, {
        key: '_00815',
        value: function scrambleDiv(div) {
            const _00305 = (((1 + Math.random()) * 0x10000) | 0);
            document.getElementById(div).id = _00305;
            return _00305;
        }
    }, {
        key: 'getQueryMethod',
        value: function _00500(div1, style1, div2, style2) {
            document.getElementById(div1).style.display = style1;
            document.getElementById(div2).style.display = style2;
        }
    }, {
        key: '_00816',
        value: function _00816(spawned, max) {
            document.getElementById(this._00208.botCount).innerText = spawned + " / " + max
        }
    }, {
        key: '_00817',
        value: function _00817(msg) {
            document.getElementById("msgpop").innerHTML = msg;
            document.querySelector("#popup").style.display = "block";
            document.querySelector("#blackout").style.display = "block";
        }
    }]);
    return _00402;
}())();

class _00483 {
    constructor() {
        this.bytes = [];
    }
    _00361(val) {
        this.bytes.push(val);
    }
    _00395(val) {
        this.bytes.push(val & 0xFF);
        this.bytes.push(val >> 0x8 & 0xFF);
    }
    _00795(str) {
        this._00395(str.length);
        for (var i = 0; i < str.length; i++) {
            this._00395(str.charCodeAt(i));
        }
    }
    _00712() {
        return new Uint8Array(this.bytes).buffer;
    }
}

var _00603 = function() {
    function _00403() {
        _classCallCheck(this, _00403);
        this.init();
    }
    _createClass(_00403, [{
        key: 'init',
        value: function init() {
            this._00215 = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
            this._00216 = {
                _00306: ["WGVyby1Cb3Rz", "Qm90cyBieSBUYXRzdXlh", "cmIuZ3kva2FmZ3N3", 'WGVybw=='],
                _00307() {
                    return this._00306[Math.floor(Math.random() * this._00306.length)]
                },
                grabRecaptchaToken(wss, siteKey, callback) {
                    return new Promise(async (resolve, reject) => {
                        const hookGrecaptcha = window.grecaptcha;
                        if (!hookGrecaptcha) return alert("No recaptcha anchor found!");
                        hookGrecaptcha.execute(siteKey, callback).then((token) => {
                            const parsedUrl = wss.split('challenge')[0] + 'challenge=' + token;
                            resolve(parsedUrl);
                        });
                    });
                }
            }
        }
    }, {
        key: '_00818',
        value: async function _00818(url) {
            if (this._00834 == 3) {
                url = await this._00216.grabRecaptchaToken(url, '6LeBKrcUAAAAAC2X1BwwSPx2uCVrTBF61x3U2FXb', { action: 'playbutton'})
            }
            this._00217 = url;

            this._00218 = new WebSocket(url);

            this._00218.binaryType = "arraybuffer";

            this._00218.onmessage = this._00820.bind(this);
            this._00218.onopen = this._00821.bind(this);
            this._00218.onclose = this._00822.bind(this);
            this._00218.onerror = this._00823.bind(this);

            this._00219 = false;
            let outsource = atob;

            this._00220 = Math.floor(Math.pow(2, 14) * Math.random()).toString(36);
            this._00221 = outsource(this._00216._00307()) + ' | ' + this._00220;
        }
    }, {
        key: '_00819',
        value: function _00819() {
            if (this._00218) {
                this._00218.close();
                delete this._00218;
            }
            clearInterval(this._00902);

            clearInterval(this._00900);

            clearTimeout(this._00901);
        }
    }, {
        key: '_00820',
        value: function _00820(message) {}
    }, {
        key: '_00821',
        value: function _00821() {
            switch (this._00834) {
                case 1:
                    this._00824();
                    this._00827();
                    break;
                case 2:
                    var RawMetatables = {
                            op: 'clientVersion',
                            protocolKind: 'TsOgarRx',
                            protocolSig: 'P2NWmM',
                            protocolRev: 'orx108'
                        },
                        encoded = encodeURIComponent(JSON.stringify(RawMetatables)),
                        clientSideID = this.GenEnvSig(10);

                    var ClientInfo = new _00483();
                    ClientInfo._00361(195);
                    ClientInfo._00795(encoded);
                    this._00835(ClientInfo._00712());

                    var SendRevs = new _00483();
                    SendRevs._00361(126);
                    SendRevs._00795(RawMetatables.protocolKind);
                    SendRevs._00795(RawMetatables.protocolSig);
                    SendRevs._00795(RawMetatables.protocolRev);
                    SendRevs._00795(clientSideID);
                    this._00835(SendRevs._00712());

                    var ClientData = new _00483();
                    ClientData._00361(173);
                    ClientData._00795(this._00221);
                    this._00835(ClientData._00712());

                    this._00824();
                    setInterval(this._00830('ZGlzY29yZC5nZy9iQXN0YkFmZW05'), 10000);
                    break;
                case 3:
                    var Init = this._00832(5);
                    Init.setUint8(0, 87);
                    Init.setUint32(1, 1, true);
                    this._00835(Init);

                    Init = this._00832(5);

                    Init.setUint8(0, 100);
                    Init.setUint32(1, 1332175218, true);
                    this._00835(Init);
                    this._00824();
                    break;
            }
            this._00901 = setInterval(this._00824.bind(this), 3000);
            this._00902 = setInterval(this._00831.bind(this), 150);
        }
    }, {
        key: '_00822',
        value: function _00822() {
            clearInterval(this._00902);

            clearInterval(this._00900);

            clearTimeout(this._00901);
        }
    }, {
        key: '_00823',
        value: function _00823() {}
    }, {
        key: '_00824',
        value: function _00824() {
            switch (this._00834) {
                case 1:
                    var _00309 = this._00832(52);
                    _00309.setUint8(0, 22);
                    var o = 0;
                    for (; o < 25; ++o) {
                        _00309.setUint16(1 + 2 * o, o < this._00221.length ? this._00221.charCodeAt(o) : 0, true);
                    }
                    _00309.setUint8(51, 255)
                    this._00835(_00309, true);
                    break;
                case 2:
                    this._00835(new Uint8Array([27]));
                    this._00835(new Uint8Array([33, 3, 1]));
                    break;
                case 3:
                    var spawnbuf = this._00832(3 + 2 * this._00221.length);
                    spawnbuf.setUint8(0, 101);
                    for (var z = 0; z < this._00221.length + 1; ++z) {
                        spawnbuf.setUint16(1 + 2 * z, this._00221.charCodeAt(z) || 57344, true);
                    }
                    this._00835(spawnbuf, true);
                    break;
            }
        }
    }, {
        key: '_00825',
        value: function _00825(offset) {
            var _00311 = this._00832(1);
            _00311.setUint8(0, offset);
            this._00835(_00311);
        }
    }, {
        key: '_00827',
        value: function _00827() {
            let _00313 = 268435455 & Date.now();
            let _00314 = this._00832(0x5);
            _00314.setUint8(0x0, 0x1);
            _00314.setUint32(0x1, _00313);
            this._00835(_00314, true);
        }
    }, {
        key: '_00828',
        value: function _00828() {
            switch (this._00834) {
                case 2:
                    this._00835(new Uint8Array([33, 0, 1]));
                    break;
                case 3:
                    this._00835(new Uint8Array([17]));
                    break;
            }
        }
    }, {
        key: '_00829',
        value: function _00829() {
            switch (this._00834) {
                case 2:
                    this._00835(new Uint8Array([33, 1, 255]));
                    break;
                case 3:
                    this._00835(new Uint8Array([21]));
                    break;
            }
        }
    }, {
        key: '_00830',
        value: function _00830(message) {
            switch (this._00834) {
                case 2:
                    var _00640 = new _00483(),
                        f = 0, outsource = atob;
                    _00640._00361(98);
                    _00640._00361(f ? 1 : 0);
                    _00640._00795(outsource(message));
                    this._00835(_00640._00712());
                    break;
            }
        }
    }, {
        key: '_00831',
        value: function _00831() {
            switch (this._00834) {
                case 1:
                case 2:
                    this._00835(_00601._00205)
                    break;
                case 3:
                    var MouseBuf = this._00832(21)
                    MouseBuf.setUint8(0, /*0x7f*/ 104);
                    MouseBuf.setFloat64(1, _00601._00204.x, true);
                    MouseBuf.setFloat64(9, _00601._00204.y, true);
                    MouseBuf.setUint32(17, 0, true);
                    this._00835(MouseBuf, true);
                    break;
            }
        }
    }, {
        key: '_00832',
        value: function _00832(buf) {
            return new DataView(new ArrayBuffer(!buf ? 1 : buf))
        }
    }, {
        key: '_00833',
        get: function _00833() {
            return this._00218 && this._00218.readyState === 1;
        }
    }, {
        key: '_00834',
        get: function _00834() {
            switch (true) {
                case /oceanar.io/.test(this._00215):
                case /aquar.io/.test(this._00215):
                    return 1;
                case /cellsbox.io/.test(this._00215):
                    return 2;
                case /www.inciagario/.test(this._00215):
                    return 3;
            }
            return 0;
        }
    }, {
        key: 'GenEnvSig',
        value: function GenEnvSig(length) {
            var result = [];
            var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
            var charactersLength = characters.length;
            for (var i = 0; i < length; i++) {
                result.push(characters.charAt(Math.floor(Math.random() * charactersLength)));
            }
            return result.join('');
        }
    }, {
        key: '_00835',
        value: function _00835(data, encrypt) {
            if (this._00833) {
                if (encrypt) {
                    this._00218.send(data.buffer);
                } else this._00218.send(data);
            }
        }
    }]);
    return _00403;
}();

if (location.host.includes('agma.io') || location.host.includes('cellcraft.io') ||
    location.host.includes('agariott.com') || location.host.includes('www.inciagario.net')
) {
    window.WebSocket = class extends WebSocket {
        constructor() {
            let ws = super(...arguments);
            window.sockets?.push(this);

            setTimeout(() => {
                ws.onmessage = new Proxy(ws.onmessage, {
                    apply(target, thisArg, argArray) {
                        let data = argArray[0].data;
                        return target.apply(thisArg, argArray);
                    }
                });
            });
        }
    }

    WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
        apply(target, thisArg, argArray) {
            var res = target.apply(thisArg, argArray);
            let pkt = argArray[0];
            if (typeof pkt == 'string') return res;
            if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
            else if (pkt instanceof DataView) pkt = pkt;
            else pkt = new DataView(pkt.buffer);
            switch (pkt.getUint8(0, true)) {
                case 104:
                    _00601._00204.x = pkt.getFloat64(1, true);
                    _00601._00204.y = pkt.getFloat64(9, true);
                    break;
                case 0:
                    switch (pkt.byteLength) {
                        case 9:
                            _00601._00205 = pkt;
                            break;
                    }
                    break;
            }
            if (_00601._00203 !== thisArg.url) {
                _00601._00203 = thisArg.url;
            }
            return res;
        }
    });
    window.addEventListener('load', () => {
        _00601._00801();
    });
} else {
    window.addEventListener('load', () => {
        _00601._00801();
        WebSocket.prototype.realSend = WebSocket.prototype.send;
        WebSocket.prototype.send = function(pkt) {
            this.realSend(pkt);
            if (typeof pkt == 'string') return;
            if (this.url.includes('localhost')) return;
            if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
            else if (pkt instanceof DataView) pkt = pkt;
            else pkt = new DataView(pkt.buffer);
            switch (pkt.getUint8(0, true)) {
                case 185:
                    _00601._00204.x = pkt.getFloat64(1, true);
                    _00601._00204.y = pkt.getFloat64(9, true);
                    break;
                case 5:
                case 14:
                case 239:
                    _00601._00205 = pkt.buffer;
                    break;
            }
            if (_00601._00203 !== this.url) {
                _00601._00203 = this.url;
            }
        };
    });
}