E-Code

Evades Coder

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://update.greasyfork.org/scripts/438621/1022930/E-Code.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @license      MIT
// @name         E-Code
// @version      1.1
// @description  Evades Coder
// @author       0vC4
// @match        http://*/*
// @match        https://*/*
// @grant        none
// @run-at       document-start
// @namespace    https://greasyfork.org/users/670183
// ==/UserScript==

const Coder = await (async () => {
    const getFile = async url => await fetch(url).then(d=>d.text());
    const use = code => new Function('return '+code)();

    eval(await getFile('https://cdn.jsdelivr.net/gh/dcodeIO/[email protected]/dist/light/protobuf.min.js'));
    const appUrl = await getFile(location.href).then(d=>d.match(/app\.[a-z0-9]*\.js/)[0]);
    const mainJS = await getFile(location.href+'/'+appUrl);
    const scheme = use(mainJS.match(/(?<=\.addJSON\()\{(.|\n)+?\}(?=\);)/)[0]);

    const coder = new protobuf.Root();
    coder.addJSON(scheme);

    return {
        protobuf: coder,
        decode: {
            server(packet) {
                return coder.FramePayload.toObject(coder.FramePayload.decode(new Uint8Array(packet)));
            },
            client(packet) {
                return coder.ClientPayload.toObject(coder.ClientPayload.decode(new Uint8Array(packet)));
            }
        },
        encode: {
            server(object) {
                return coder.FramePayload.encode(object).finish();
            },
            client(object) {
                return coder.ClientPayload.encode(object).finish();
            }
        }
    };
})();