Zhnayyder Posted August 9, 2020 Share Posted August 9, 2020 (edited) 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 August 9, 2020 by koksiasz Link to comment
Addlibs Posted August 9, 2020 Share Posted August 9, 2020 (edited) 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 August 9, 2020 by Addlibs 1 Link to comment
Zhnayyder Posted August 9, 2020 Author Share Posted August 9, 2020 Ah, what a shame. I guess there's no point in keeping this thread open, as there's probably no way to make this happen. Wanted to have some fun with it. Anyway, thank you so much for your in-depth response! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now