Hello all, I am kinda going to use this post as a log of my packet study progress. Feel free to comment, contribute, correct and fill the gaps (and why not flame a bit, just a bit!)
Some background info: I'm kinda new to packet stuff, Usually I used to made my bots and tools calling game functions directly. Well, I have just hooked conquer packets recv/send functions and start sniffing them. I'm using C++.
This is about the current lastest oficial conquer patch: 6715.
I'm starting with some chat packets, here are some received ones:
Well, I intend to structure chat packet like this:
I am surprised that I can just replay a recv chat packet to client (send the packet again to client) and it just worked well (re-displayed the chat message). I thought that it could have some packet count/time check or some mechanism to invalidate "wrong packets". Well, maybe is just about the chat, I will try later with other packets type.
So, with this stuff in mind I think it's all about dissecting other packets and PARSING them FTW. Seems much more easier than hooking dozen of game functions. If someone have some packet functions parser or related stuff to share could save me time, otherwise I'm just writing mines atm.
Cheers
Some background info: I'm kinda new to packet stuff, Usually I used to made my bots and tools calling game functions directly. Well, I have just hooked conquer packets recv/send functions and start sniffing them. I'm using C++.
This is about the current lastest oficial conquer patch: 6715.
I'm starting with some chat packets, here are some received ones:
Code:
Chat in talk channel 3f 00 59 08 08 ff ff ff ff 0f 10 d0 0f 18 00 20 ; ?.Y............ e7 0b 30 00 38 00 40 01 48 00 52 08 50 69 72 61 ; ..0.8 [MENTION=6808217].H.[/MENTION]R.Pira 74 65 33 32 52 04 41 6c 6c 20 52 00 52 0b 6f 6c ; te32R.All R.R.ol 61 20 6e 6f 20 61 6c 6c 6c 52 00 52 00 52 00 ; a no alllR.R.R. Chat in talk channel with recipient target 48 00 59 08 08 ff ff ff ff 0f 10 d0 0f 18 00 20 ; H.Y............ e8 0b 30 00 38 00 40 01 48 00 52 08 50 69 72 61 ; ..0.8 [MENTION=6808217].H.[/MENTION]R.Pira 74 65 33 32 52 0c 77 69 6e 64 77 61 6c 6b 65 72 ; te32R.windwalker 33 32 52 00 52 0c 6f 6c 61 20 63 6f 6d 20 6e 6f ; 32R.R.ola com no 6d 65 52 00 52 00 52 00 ; meR.R.R. Chat in whisper channel 45 00 59 08 08 ff ff ff ff 0f 10 d1 0f 18 00 20 ; E.Y............ e8 0b 30 ae a3 5f 38 00 40 01 48 00 52 08 50 69 ; ..0.._8 [MENTION=6808217].H.[/MENTION]R.Pi 72 61 74 65 33 32 52 0c 77 69 6e 64 77 61 6c 6b ; rate32R.windwalk 65 72 33 32 52 00 52 07 77 68 69 73 70 65 72 52 ; er32R.R.whisperR 00 52 00 52 00 ; .R.R.
Code:
A system message (at game's top left corner) 31 [PACKET RECV <<] Type: 2137 Length: 143 8f 00 59 08 08 ff ff ff 07 10 d5 0f 18 00 20 95 ; ..Y........... . 07 30 00 38 00 40 01 48 00 52 06 53 59 53 54 45 ; .0.8 [MENTION=6808217].H.[/MENTION]R.SYSTE 4d 52 08 41 4c 4c 55 53 45 52 53 52 00 52 60 3c ; MR.ALLUSERSR.R`< 2a 2a 41 68 6d 65 64 5f 46 61 64 65 6c 2a 2a 3e ; **Ahmed_Fadel**> 20 64 65 66 65 61 74 65 64 20 61 20 64 65 76 69 ; defeated a devi 6c 20 69 6e 20 74 68 65 20 44 65 69 74 79 6c 61 ; l in the Deityla 6e 64 20 61 6e 64 20 72 65 63 65 69 76 65 64 20 ; nd and received 61 20 72 61 72 65 20 74 72 65 61 73 75 72 65 20 ; a rare treasure 46 61 6e 63 79 43 61 76 65 46 6c 61 67 21 20 ; FancyCaveFlag!
Well, I intend to structure chat packet like this:
Code:
struct Packet_ChatMessage {
WORD wSize;
WORD wType;
BYTE bUnknown; //0x08 always?
DWORD dwFontColor; //not sure
WORD wUnknown; //0x100f for chat msg
WORD wChannel; //0x0fd1 = whisper, 0x0fd0 = talk,
char szUnknown1[16];
char* szMessagePack;
//MessagePack struct, dinamyc allocated
//BYTE bSenderNameLen;
//char szSenderName[bSenderNameLen];
//BYTE bSeparator; // 0x52
//BYTE bRecipientNameLen;
//char szRecipientName[bRecipientNameLen];
//char szSeparator[3]; //0x52 0x00 0x52
//BYTE bMessageLen;
//char szMessage[bMessageLen];
//char szMessageEnd[6]; //0x52 0x00 0x52 0x00 0x52 0x00
};
So, with this stuff in mind I think it's all about dissecting other packets and PARSING them FTW. Seems much more easier than hooking dozen of game functions. If someone have some packet functions parser or related stuff to share could save me time, otherwise I'm just writing mines atm.
Cheers