Home » General Discussions » Spam Fest » wwnet
Re: wwnet [message #490071 is a reply to message #490069] |
Sat, 20 December 2014 07:03 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
[EE]pickle-jucer
Messages: 21 Registered: November 2009
Karma:
|
Recruit |
|
|
First off let me clarify that i'm not trying to cheat/hack anything, I am trying to figure out the packets to make a game server, separate from the FDS. I know it wont be fully functional but I think it would be really cool if I could make an opensource game server for renegade that anyone could use, modify or contribute to.
the reason I'm looking for the netcode is that pure guesswork isn't getting me far, I've figured out the general layout of the first packet sent to the server from the client as layed out below, but as you can see there is a lot of "unknown"s and I don't even have a way to tell the packet apart from the rest.
join packet:
4 byte crc32 of the rest of packet
10 byte unknown
1 byte nameLength
[nameLength*sizeof(WCHAR)] Name
11 byte unknown
4 byte "!TT!" literal
4 byte float TT scripts version number
1 byte unknown
1 byte exekeyLen
[exekeyLen*byte] exeKey
4 byte unknown(bandwidth?)
EDIT: upon looking at a snippet from cnetwork.cpp, i've realize the "exeKeyLen" & "exeKey" part are wrong
//
// Get player name
// This is not supposed to be empty, but if for whatever reason it it, we should
// just refuse, rather than crash.
//
WideStringClass player_name(0, true);
//packet.Get_Wide_Terminated_String(player_name.Get_Buffer(256), 256);
packet.Get_Wide_Terminated_String(player_name.Get_Buffer(256), 256, true);
if (player_name.Get_Length() == 0) {
return REFUSAL_VERSION_MISMATCH;
}
// Get the clients password
WideStringClass password(0, true);
packet.Get_Wide_Terminated_String(password.Get_Buffer(256), 256, true);
// Get clients exe version
int client_exe_key = packet.Get(client_exe_key);
[Updated on: Sat, 20 December 2014 08:16] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Sep 01 04:09:07 MST 2024
Total time taken to generate the page: 0.00826 seconds
|