Skip to main content

rocket protocol

rocket it's the safer and text-based twin brother of RCON protocol targeted mainly for executing commands on game servers

What is the Rocket protocol?

Rocket protocol works on the same principle as RCON, that is, it allows remote execution of commands on the server. The communication between the client and the server is text-based, using the TCP protocol. Unlike RCON, the Rocket protocol encrypts all communication between the client and the server using an encryption key that is generated when this protocol is configured on the server (the client version must encrypt its packets with the same key as the server version).

Supported games servers

Further implementations of the protocol of various games will be available on other branches, such as implementation/minecraft

  • Soon implementation of the Minecraft game will be available

NOTE: main branch contains only client implementation written in python, for other implementation see branches.

What does the Rocket packet look like?

A Rocket packet has three parts, which are:

<request_id>;<p_type>;<body>
  • request_id is a unique identifier for the request, and it can be used to identify the response.
  • packet_type is the type of the packet.
  • body is the actual content of the packet.

It is important to note that the server and the client should validate the count of ; in payloads, and there should be a maximum of two.

Here are the types of packets supported by Rocket Protocol:

class RPacketType:
    SERVER_RESP_SUCCESS: int = 0
    SERVER_RESP_FAILURE: int = 2

    SERVER_AUTH_FAILURE: int = 3

    CLIENT_REQUEST: int = 5

How to use rocket python client

Below is a simple example of how to send commands to the server.

from rocket import Rocket
from rocket.packet import RPacketType

if __name__ == "__main__":
    rocket: Rocket = Rocket('localhost', 5543, "rUc_HJItDCwdkZ0esm8uKUh4yIc8GsYSTNFQleUcmI0=")

    response: RPacket = rocket.execute_command("say hello")
    if response.p_type == RPacketType.SERVER_RESP_SUCCESS:
    print("SERVER SUCCESS RESPONSE")

    command: str = "give @a potion{Potion:\"minecraft:night_vision\"}"
    response: RPacket = rocket.execute_command(command)
    print(response)

NOTE: The key that encrypts the connection is not a random string, to generate the key you need to use the command::

python -c "\n\nimport base64, os\nprint(base64.urlsafe_b64encode(os.urandom(32)).decode('utf-8'))"

Advantages of using the Rocket protocol

The Rocket protocol offers several advantages over other remote execution protocols like RCON:

  1. Enhanced Security: The Rocket protocol encrypts all communication between the client and the server, making it more secure than RCON, which sends all data in plain text. The encryption key is generated when the protocol is configured on the server, and the client must use the same key to encrypt its packets. This ensures that only authorized clients can communicate with the server.

  2. Text-based Communication: Rocket protocol uses text-based communication, which makes it easier to read and debug than binary protocols. Text-based communication also means that the protocol can be used with any programming language that supports TCP sockets.

  3. Multiple Language Compatibility: The Rocket protocol is compatible with multiple programming languages, making it easy to use with different types of clients and servers. This means that developers can use their preferred programming language to create clients that can communicate with Rocket-enabled servers, and vice versa.

  4. Flexible Packet Structure: The packet structure of the Rocket protocol is simple and flexible. It consists of three parts, and the packet type can be easily extended to support new features. This makes it easy to add new functionality to the protocol without breaking compatibility with existing clients and servers.

Overall, the Rocket protocol offers a secure, flexible, and easy-to-use alternative to other remote execution protocols like RCON.

Metadata

Release files for rocket-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rocket-client 0.1.0
File Size Uploaded Provenance Actions
rocket-client-0.1.0.tar.gz 4.0 kB Without provenance Details for rocket-client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rocket-client 0.1.0
File Interpreter ABI Platform Actions
rocket_client-0.1.0-py3-none-any.whl Python 3 none any Details for rocket_client-0.1.0-py3-none-any.whl

Total release size: 8.4 kB

Release files / rocket-client-0.1.0.tar.gz

Download URL rocket-client-0.1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cfa3b339920c4903d7d03486ca2d2bd88a19f077539c71ae64fccc6e8833d7fa
BLAKE2b-256 checksum
How to use checksums
e6fb73d628c3d4eee9327ac635e86f886342607471d13271656c737af14c8dbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / rocket_client-0.1.0-py3-none-any.whl

Download URL rocket_client-0.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b187f5d32780f061acb41134c5e8577b9c83276a6e68dc78e64a126b965a5663
BLAKE2b-256 checksum
How to use checksums
6fcdd2c6a1fda5608229767f7ba3d01009c5c7f1c3e67db3f598502a68e685b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Security for rocket-client 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page