Quote:
Originally Posted by flowerpot!
After you inject the packet do you re-encode all following packets? Cause the encryption uses counters which will be incremented for the injected packet.
And Zero, the way you're setting the array is also messy... :D
t_packet_3f2 *p = (t_packet_3f2 *)buf;
p->id = 0x3f2;
p->player_id = pid;
p->x = x;
...
Likewise for parsing the packet. And when TQ updates structures you just have to update a header.
|
Yes, after I send the packet I decrypt and re-encrypt every packet with the new encryption counters.
Maybe I'm doing some basic thing wrong... What do you mean by "inject the packet"?
I just encrypt the prepared packet with the current encryption counters and send it to the server from my proxy connection to the game server.
I'll try to explain what I do.
The connections are:
S01 (connection to Conquer client) <> my proxy program <> S02 (connection to game server)
Now, what I simply do is:
Quote:
PreparePacket = "1800F203" & TimeXOR(timeGetTime, MyID) & MyID & "FA000000" & MakeXbt(xcord) & MakeYbt(ycord) & "00005100"
PreparePacket = EncryptSend(PreparePacket)
S02.SendData PreparePacket
|
1. The "PreparePacket" is correct and matches with the packet that is send by the Conquer Client, so I assembled it correctly.
2. The Encryption functions good, I can see that from my log that I've posted in the 1st post. (packets communication between the Client and server is decrypted/encrypted correctly until I get disconnected. Also the packet that I send is encrypted correctly, I can see that because the server returns the same packet that I have send to the Game Client right after I send it.)
3. Is this the way packets should be send? Directly to the connection to the game server? Is there a way to give the packet to the Game Client so that it sends it himself?