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;

 

 

0020   00 00 00 00 00 00 00 00 00 00 ff ff ff ff 67 65  ..............ge
0030   74 73 65 72 76 65 72 73 52 65 73 70 6f 6e 73 65  tserversResponse
0040   0a 00 5c 5b 79 36 40 69 91 5c 2e e4 c2 99 71 20  ..\[y6@i.\....q 
0050   5c b0 09 68 f1 70 e9 5c dd 79 9b 0a 71 02 5c 25  \..h.p.\.y..q.\%
0060   3b e8 7f 71 20 5c c0 63 07 c4 71 24 5c c0 63 07  ;..q \.c..q$\.c.
0070   c4 71 20 5c c0 63 07 c4 71 28 5c 5d ba cc 36 71  .q \.c..q(\]..6q
0080   20 5c 5e 17 35 1c 71 29 5c bc a5 22 37 4a 10 5c   \^.5.q)\.."7J.\
0090   42 e1 e8 c3 71 21 5c bc a5 22 37 71 02 5c bc a5  B...q!\.."7q.\..
00a0   22 37 71 16 5c bc a5 22 37 71 46 5c 4a 5b 77 67  "7q.\.."7qF\J[wg
00b0   71 20 5c b2 20 2a 2b 69 8e 5c b2 20 2a 2b 69 92  q \. *+i.\. *+i.
00c0   5c b2 4d 44 4e 71 52 5c 51 1e 9a bb 71 20 5c 5e  \.MDNqR\Q...q \^
00d0   17 d4 21 09 7a 5c 92 00 20 62 4e 20 5c b0 39 8f  ..!.z\.. bN \.9.
00e0   6a 70 8f 5c b0 39 8f 6a 70 9f 5c b0 39 8f 6b 71  jp.\.9.jp.\.9.kq
00f0   9f 5c b0 39 8f 6b 71 57 5c b0 39 8f 6b 71 67 5c  .\.9.kqW\.9.kqg\
0100   b0 39 8f 6b 71 7f 5c 4d 6f fa 15 7d 00 5c 40 4a  .9.kq.\Mo..}.\@J
0110   61 88 71 20 5c 90 4c a2 b6 71 23 5c 90 4c a2 b6  a.q \.L..q#\.L..
0120   71 3b 5c d8 06 eb 90 71 02 5c 5e fa cf 51 71 20  q;\....q.\^..Qq 
0130   5c b0 1f 5a 7e 69 9b 5c d9 a3 1e 39 71 20 5c 44  \..Z~i.\...9q \D
0140   e8 a8 8c 71 20 5c 5f 9a e3 36 71 20 5c b0 39 8d  ...q \_..6q \.9.
0150   e1 71 3c 5c b0 39 8d e1 71 30 5c b0 39 8d e1 71  .q<\.9..q0\.9..q
0160   44 5c 3f d7 4a 81 71 20 5c 42 37 8e 35 71 20 5c  D\?.J.q \B7.5q \
0170   55 0a cf 0c 71 27 5c 55 0a cf 0c 71 23 5c 3e 8d  U...q'\U...q#\>.
0180   2e aa 71 16 5c ad c7 4c 29 71 20 5c 51 a9 9d d4  ..q.\..L)q \Q...
0190   74 ae 5c 5f a7 46 b2 71 20 5c b2 20 2d 30 07 42  t.\_.F.q \. -0.B
01a0   5c b2 20 2a 2b 1c cd 5c b2 21 f8 6e 6e f1 5c 1f  \. *+..\.!.nn.\.
01b0   ba fa 5a 71 28 5c 1f ba fa 5a 71 20 5c 55 19 f6  ..Zq(\...Zq \U..
01c0   ac 38 a4 5c 25 72 6d c4 71 20 5c 6d 46 92 ae 73  .8.\%rm.q \mF..s
01d0   3c 5c 6c b2 37 e3 71 26 5c c1 c0 3a a5 6e e0 5c  <\l.7.q&\..:.n.\
01e0   d1 7e 4c ba 71 26 5c 5d ba ce 3c 71 20 5c 1b 32  .~L.q&\]..<q \.2
01f0   47 5c 71 02 5c 2e 69 62 55 71 00 5c 05 af f5 2a  G\q.\.ibUq.\...*
0200   6d 74 5c 05 af f5 2a 6d 70 5c b2 20 2a 39 71 30  mt\...*mp\. *9q0
0210   5c b2 20 2a 39 71 0c 5c c0 df 1b b0 71 21 5c b2  \. *9q.\....q!\.
0220   20 2a 31 0b ec 5c 05 13 b3 d3 71 20 5c 25 f7 36   *1..\....q \%.6
0230   14 71 2a 5c 2e e4 c9 8b 71 20 5c 40 20 1b d7 71  .q*\....q \@ ..q
0240   02 5c 40 5e ee 03 71 02 5c b0 39 8b d5 71 20 5c  .\@^..q.\.9..q \
0250   55 19 8b 37 65 90 5c 5e fa cf 7e 71 20 5c 57 62  U..7e.\^..~q \Wb
0260   8f d4 71 33 5c 3e d2 53 a8 80 c0 5c bc a5 f8 3e  ..q3\>.S...\...>
0270   71 21 5c 25 bb 9a c3 0e de 5c 3e d2 55 40 71 20  q!\%.....\>.U@q 
0280   5c 46 2a 4a 53 71 02 5c 55 11 bd 75 71 52 5c 55  \F*JSq.\U..uqR\U
0290   ec 65 36 72 4c 5c b2 20 2d 30 0d 10 5c d5 a5 56  .e6rL\. -0..\..V
02a0   db 71 20 5c d8 0c dc ad 71 02 5c 6d 46 95 60 71  .q \....q.\mF.`q
02b0   06 5c 6d 46 95 60 71 02 5c 6d 46 95 60 71 0a 5c  .\mF.`q.\mF.`q.\
02c0   b2 21 8a a5 4a 18 5c b2 21 8a a5 4a 10 5c b2 21  .!..J.\.!..J.\.!
02d0   8a a5 4a 14 5c b2 21 8a a5 4a 28 5c b2 21 8a a5  ..J.\.!..J(\.!..
02e0   4a 2c 5c b2 21 8a a5 4a 20 5c b2 21 8a a5 4a 24  J,\.!..J \.!..J$
02f0   5c b2 21 8a a5 4a 38 5c b2 21 8a a5 4a 3c 5c b2  \.!..J8\.!..J<\.
0300   21 8a a5 4a 34 5c b2 21 8a a5 4a 40 5c d4 e0 5c  !..J4\.!..J@\..\
0310   5d 4e 24 5c 42 37 95 d8 71 02 5c 57 62 f3 84 69  ]N$\B7..q.\Wb..i
0320   8e 5c 45 4f 46                                   .\EOF

 

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

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

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

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

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

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

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.