Scenexe Socket Fiddler

Scenexe Socket Fiddler. Modify incoming and outgoing packets by writing functions for incoming and outgoing.

Questo script non dovrebbe essere installato direttamente. È una libreria per altri script da includere con la chiave // @require https://update.greasyfork.org/scripts/457775/1135865/Scenexe%20Socket%20Fiddler.js

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
discordtehe
Versione
0.4
Creato il
07/01/2023
Aggiornato il
07/01/2023
Dimensione
2,98 KB
Licenza
Non disponibile

Scenexe Socket Fiddler

Allows you to log, modify, or remove incoming and outgoing packets by writing functions for window.incoming and window.outgoing.

Usage

To use this library, include the following 2 lines in your userscript header:

// @require https://greasyfork.org/scripts/457386-scenexeutils/code/ScenexeUtils.js?version=1135843
// @require https://greasyfork.org/scripts/457775-scenexe-socket-fiddler/code/Scenexe%20Socket%20Fiddler.js?version=1135837

The 1st adds basic scenexe utils like encode, decode, encodeInverse, decodeInverse, etc.
The 2nd is this library.

Also, scripts using these libraries should not be run at document-start.

Packet Logging

A simple function you can write is a simple socket logger:

window.incoming = (data) => {
    console.log('incoming:', data);
}
window.outgoing = (data) => {
    console.log('outgoing:', data);
}

The incoming data is an array where the 1st item is an opcode and the 2nd item contains the packet data.

Packet Modification

If you need to modify incoming and outgoing packets, just return the modified data.

Here's an example for removing bullets from incoming GAME_UPDATE packets.

window.incoming = (data) => {
    if (data[0] == window.MSG_TYPES.INCOMING.GAME_UPDATE)
        data[1][3] = [];
    return data;
}

Packet Deletion

If you need to prevent certain packets from being processed or sent, return "discard".

Here's an example for preventing the client from processing a SEND_TO_SERVER packet. You receive this packet before you get teleported to another server and it tells your client which server to connect to next. By removing it, we prevent our client from going to another server.

window.incoming = (data) => {
    if (data[0] == window.MSG_TYPES.INCOMING.SEND_TO_SERVER)
        return "discard";
}