Skip to content

Instantly share code, notes, and snippets.

@rom1504
Created June 28, 2020 01:29
Show Gist options
  • Save rom1504/138ba6b11e9eb68d811abe75f2c149e6 to your computer and use it in GitHub Desktop.
Save rom1504/138ba6b11e9eb68d811abe75f2c149e6 to your computer and use it in GitHub Desktop.
protocol_reverse_engineering

In general that's the procedure to follow for a new game :

  1. Check if somebody already did something even partially, if so read their code, take what you can, learn the general structure of things
  2. If nothing exists, boot up Wireshark, look if the protocol is encrypted, textual, binary, you might have some luck at this point
  3. If Wireshark failed, download the vanilla game binaries, identify what language it was, if java based (or c#) decompile, try to find the packet classes. If native you can try using idapro but it's going to be harder
  4. Assuming some of the above worked, document the protocol
  5. Implement the low level (tcp, udp, encryption, compression, splitting)
  6. Implement parsing and serialisation (we use protodef for this)
  7. Implement login sequence At this point you have something on the level of node-minecraft-protocol
  8. Implement a fully featured client API for high level behavior, that gives you mineflayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment