Jump to content

[QUESTION] Chat messages packet decoding


Zhnayyder

Recommended Posts

Hello everyone!

As i play on a server with an international community, there's a lot of languages involved. To make insulting others/understanding others insulting me easier, i've decided to make a program which will translate chat messages in real-time. I used Wireshark to capture packets coming from the server, and - after some digging - i found out which ones correspond to the chat messages. Sadly, it turns out MTA apparently uses some kind of encoding, as no two packets supposed to contain the same chat string, share the same byte series. I made a quick search through MTA source code, but i'm too dumb to find the piece of code responsible for decoding it into a usable format. I don't know if that's of any use, but i found this file:

https://github.com/multitheftauto/mtasa-blue/blob/1d66aad10cc68f44503fb0d618c78c4541ee6c52/Client/mods/deathmatch/logic/CPacketHandler.cpp

It's supposed to process the packets and it has a piece of code called "Packet_ChatEcho". I guess it's something related. Has anyone tried this before? Any help will be very much appreciated. I think it's a cool idea.

Regards,

Koksiasz

Edited by koksiasz
Link to comment

You likely won't be able to intercept these messages as MTA's network communication is encrypted Server_mtaserver.conf#networkencryption and the ability to disable it was removed in commit 4e89dd81e0914a30688941768c0c3dfe104727f4 over 5 years ago.

The actual encryption of network communications happens within the closed-source net.dll file. Even if you were to manage to decrypt somehow, you'd still need to copy and keep up-to-date headers for the packets (Packets.h and packetenums.h and additionally most, if not all, external dependencies those files have), as the packets aren't named in the payload, but rather numbered, and the definitions for which ID refers to which packet may (though probably won't, but making this assumption isn't a good idea) change in the future.

Edited by Addlibs
  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...