Jump to content

Recommended Posts

Posted (edited)

Technical details, thus far;

 

Game is sending out a query to cod4master.activision.com (R-R A record by the looks of it), with the Master Server using port 20810 and the Authorisation Server using 20800.

 

The Server List packet is formatted like this:

ff:ff:ff:ff:67:65:74:73:65:72:76:65:72:73:20:36:20:66:75:6c:6c:20:65:6d:70:74:79
\xff\xff\xff\xffgetservers 6 full empty
I've seen no changes to this packet, even after playing with the filter settings in the Client. It would appear that the Client grabs a list of /all/ of the servers then applies the filtering locally.

 

The packet the Master Server responds with is formatted like so;

 

 

  Reveal hidden contents

 

This packet is a final packet sent from the Master Server, to the client, which has the finishing "EOF" (End Of File) tag. If this had been one of many, not the final, packets then it would have been "EOT" (End Of Transmission). IPs are encoded by using "inet_pton"-esque functions. Port numbers are encoded like so;

27960 & 0xff -> 56
(27960 >> 8) & 0xff -> 109
The heartbeat packet (From the Game Server to the Master Server) is structured like this:

ff:ff:ff:ff:68:65:61:72:74:62:65:61:74:20:43:4f:44:2d:34:0a
\xff\xff\xff\xffheartbeat COD-4\x0a
The conditions for this packet being sent are as follows;
  • Server first loads - When it finishes loading it'll fire off a hearbeat packet to the MS to let them know there's a server there.
  • Every 3 - 6 minutes after the last heartbeat.
  • Client connects
  • Client disconnects
  • New map finishes loading.
When the Game Server quits (closes/exits/etc) it fires off a "flatline" packet to the MS.

This packet is formatted like so;

ff:ff:ff:ff:68:65:61:72:74:62:65:61:74:20:66:6c:61:74:6c:69:6e:65:0a
\xff\xff\xff\xffheartbeat flatline\x0a 
 

When you connect to a server your client fires off two packets. One to the Authorisation Server, and one to the Game Server you're connecting to;

Authorisation Server packet:
ff:ff:ff:ff:67:65:74:4b:65:79:41:75:74:68:6f:72:69:7a:65:20:30:20:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:20:50:42:20:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
\xff\xff\xff\xffgetKeyAuthorize 0 <redacted1> PB <redacted2>

Game Server packet:
ff:ff:ff:ff:67:65:74:63:68:61:6c:6c:65:6e:67:65:20:30:20:22:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:22
\xff\xff\xff\xffgetchallenge 0 "<redacted2>"

Game Server response packet:
ff:ff:ff:ff:63:68:61:6c:6c:65:6e:67:65:52:65:73:70:6f:6e:73:65:20:00:00:00:00:00:00:00:00:00:00
\xff\xff\xff\xffchallengeResponse <redacted3>
Your connection to the game server only continues when you get that response from the server.

Redacted information is as follows:

<redacted1> == CD Key (I think)

<redacted2> == Full PB GUID.

<redacted3> == It seems to be a random 10 digit number, but honestly I don't have a clue.

Edited by Heretic121
Added packet "Offset Hex Text" for getserversResponse.
  • Like 2
Posted
  On 1/19/2015 at 9:09 PM, xXAdamXx said:

How long do you think it will take?

 

Well, I've got an alpha version already running on my VPS.

Language is PHP as that's the one that I'm the most proficient in.

 

Thankfully, the Master Server is quite simplistic in it's design. It's just the packet packaging that I'm still getting the hang of.

Posted

I've updated the OP with all the information I currently have/know.

Any help from the public/clan is always welcome, however a decent understanding of wtf I'm talking about is probably a good idea :)

  • Like 1
Posted

Added information about how I believe the formatting of the IP and Port bytes of the Server List packet is done.

I'll test and update this post when I can certain :)

Posted
  On 1/19/2015 at 10:34 PM, Heretic121 said:

Added information about how I believe the formatting of the IP and Port bytes of the Server List packet is done.

I'll test and update this post when I can certain :)

Go Heretic Go!

Posted
  On 1/20/2015 at 5:26 PM, ClamSlammer said:

I'd be happy to assist with testing or whatever else I could do Heretic.

 

Do you have any skills, or experience, around what I'm trying to do? :D

 

If not, I'll just call on you when I need something testing lol :P

Posted

I understand the basics of this... but you gotta start talking more in english.. and not 

 

ff:ff:ff:ff:67:65:74:73:65:72:76:65:72:73:20:36:20:66:75:6c:6c:20:65:6d:70:74:79....

 

thanks lol

  • Like 1
Posted
  On 1/22/2015 at 11:50 PM, xXAdamXx said:

I understand the basics of this... but you gotta start talking more in english.. and not 

 

ff:ff:ff:ff:67:65:74:73:65:72:76:65:72:73:20:36:20:66:75:6c:6c:20:65:6d:70:74:79....

 

thanks lol

That's the hex of the packet o.O It's incredibly informative, as it tells you /exactly/ what's in the packet.

However, for those that don't read hex, I gave a "translation" on the line below :)

 

Now, I've hit a little snag. The encoding I thought COD4 was doing, it wasn't. Without a packet capture of a reply from the Master Server under normal circumstances I can't create the correct reply... unless I try every way of encoding it that I can think of.

 

So... I need something that shows me how a normal reply from the Master Server is encoded/formatted :)

  • Like 1
Posted
  On 1/23/2015 at 12:10 AM, Heretic121 said:

That's the hex of the packet o.O It's incredibly informative, as it tells you /exactly/ what's in the packet.

However, for those that don't read hex, I gave a "translation" on the line below :)

 

Now, I've hit a little snag. The encoding I thought COD4 was doing, it wasn't. Without a packet capture of a reply from the Master Server under normal circumstances I can't create the correct reply... unless I try every way of encoding it that I can think of.

 

So... I need something that shows me how a normal reply from the Master Server is encoded/formatted :)

 

Try every way of encoding you know of. <3

Posted
  On 1/23/2015 at 1:42 AM, xXAdamXx said:

Try every way of encoding you know of. <3

 

This is basically my idea ^ Although, I've thought of something that might throw a spanner in the works. There's a chance, and this is just speculation, that the games ignores server lists that originate from any IP that isn't the one that's hardcoded. Now, I don't think this is the case because if it was then they would have done the same for sending out heartbeats. However, if it was done like that I can understand why as UDP isn't exactly known for it's "amazing security features". 

 

Now then, what I'd like from the community in general is some sort of gauge as to how badly people want this finished. Reason being that I need to see where this project fits in with the countless other projects and ideas I have constantly rattling around in my head, as well as one's that I've already started. Also, can we have a look at informing the rest of the COD4 community about this project?

  • Administrators
Posted

Contact Maydax@PBBans in PM. He will be able to help more. Also once the master list is ready don't make code public. Keep it private. Because you will end up doing all hardwork and someone will leach it out and start different versions of master list. 

 

That would cause fragmentation mess in COD4 community

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.