Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
8BitMMO Networking
8BitMMO's networking stack is very simple.

Firstly, an integer is sent which contains the message's ID.
Following this, another integer is sent which contains the size of the message.
Last is the message serialized with Google Protobuf.

Since TCP does not have a concept of messages (it uses streams), you need to save all of the received data into a buffer.
If the buffer contains at least 8 bytes (two 32 bit integers), you can read the message ID and message size.
If the buffer contains at least message_size bytes, you can read the message.

You can reverse engineer the Protobuf file through the game's code. While I'm sure that you could build an automated tool to grab this, it rarely changes and you can recreate it yourself in a few minutes.

Every child of HTMud/Networking.class is a message and contains type information along with the original names. You can get the ID of a message from Networking.class; the ID is added to the list straight after the message.

Something to note is that the client sends data to the server in Big Endian format, and receives data in Little Endian format.
Big Endian is how you would normally see numbers represented (the JVM uses Big Endian). The official server is written in C++ and runs on x86 hardware, and x86 uses Little Endian encoding.

Using this information, you can easily create a proxy that decodes messages or a custom client (no serverino por favor).

edit: Here's my protobuf file. -
Note that it's not complete.
[Image: 7rL6Nl0.png]
built a custom client to spam chat ayy lmao

[Image: Hz3Ce2l.png]
[Image: 7rL6Nl0.png]

Forum Jump:

Users browsing this thread: 1 Guest(s)

About The Bytecode Club

We're a community focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.