Welcome
Recent Additions
Monthly statistics
Post map load dump - SP DEMO |
| This month: 0 Last month: 0 Total downloads: 185 Filesize: 43.18 mb |
iwi2dds Converter |
| This month: 0 Last month: 0 Total downloads: 1435 Filesize: 120 kb |
dds2iwi-cod4 Converter |
| This month: 0 Last month: 2 Total downloads: 1844 Filesize: 60 kb |
Seperated GSC Code |
| This month: 0 Last month: 0 Total downloads: 330 Filesize: 332.13 kb |
Stock gsc files |
| This month: 0 Last month: 0 Total downloads: 297 Filesize: 115.39 kb |
Most Wanted ever
dds2iwi-cod4 Converter |
| Total downloads: 1844 Filesize: 60 kb |
iwi2dds Converter |
| Total downloads: 1435 Filesize: 120 kb |
Call of Duty 4 Retail MP script files v1.0 |
| Total downloads: 1226 Filesize: 220.3 kb |
ACE-Mod v1.2 |
| Total downloads: 1068 Filesize: 160.05 kb |
eXtreme X4 v1.0 |
| Total downloads: 846 Filesize: 5.26 mb |
Forums
| Mod CoD4 :: Forums :: Modding COD4 :: General |
| [poll] Master Server Protocol Research | << Previous thread | Next thread >> | ||
| Go to page >> | |
|
Moderators: Mod CoD4 Admin, Sounds, Seven, Smitty1258, ShadowGunner
|
| Author | Post | ||
| CoDEmanX |
| ||
![]() Registered Member #68 Posts: 299 | there are several reasons for an own master server: - custom server list (pre-filtered by master server) - can run locally installed, ping < 20ms - all the time reachable - update in realtime possible (to avoid unreachable game servers in list and keycode in use caused by slowly updated master servers) - master server which shows LAN ips even if they don't start with 192.168. (127.x.x.x, 224-239.x.x.x, etc.) to make an own master server application it needs some protocol research (packet sniffing). please support me appending details, eg. about pb hash (?) in key auth. Remote Port: 28960 (always or same as local port?) Protocol: UDP Version: 4 Packet Header Length: 20 (hex), 32 (dec) Precedence: Routine Delay/Throughput/Relibility: normal ECT/CE Bit: no Flag DF/MF/Offset: May/Last Fragment/0 TTL: 128 Options: no options server list request: FF FF FF FF 67 65 74 69 6E 66 6F 20 78 78 78 ....getinfo xxx filter (only one specific here): FF FF FF FF 67 65 74 73 65 72 76 65 72 73 20 33 20 66 75 6C 6C 20 65 6D 70 74 79 ....getservers 3 full empty server response (only a small part here, what is this for and whats the content?): FF FF FF FF 67 65 74 73 65 72 76 65 72 73 52 65 73 70 6F 6E 73 65 0A 00 5C D5 72 16 71 71 21 5C D8 F6 31 B7 71 20 5C 42 4F BC E1 71 25 5C CB 74 1C 1C 71 20 5C 40 22 C3 77 71 2A 5C 43 47 19 EB 71 20 5C 45 0C 5E 1E 71 20 5C 55 83 CA 0E 71 16 5C 3E 68 AC 63 71 20 5C 55 EC 65 5F 71 20 5C 4D BB 4D 0D 71 20 5C 55 15 F5 15 71 21 5C 55 83 AA ....getserversResponse..\.r.qq!\..1.q \BO..q%\.t..q \@".wq*\CG..q \E.^.q \U...q.\>h.cq \U.e_q \M.M.q \U...q!\U.. (...) info response of one server from list: FF FF FF FF 69 6E 66 6F 52 65 73 70 6F 6E 73 65 0A 5C 63 68 61 6C 6C 65 6E 67 65 5C 78 78 78 5C 70 72 6F 74 6F 63 6F 6C 5C 33 5C 68 6F 73 74 6E 61 6D 65 5C 5E 31 42 5E 37 61 62 79 6C 6F 6E 20 5E 31 65 53 5E 37 70 6F 72 74 73 20 5E 31 7C 7C 7C 5E 37 7C 7C 7C 5E 31 7C 7C 7C 20 5E 37 43 6F 44 34 20 54 44 4D 20 50 75 62 6C 69 63 73 65 72 76 65 72 5C 6D 61 70 6E 61 6D 65 5C 6D 70 5F 63 72 61 73 68 5C 63 6C 69 65 6E 74 73 5C 31 34 5C 73 76 5F 6D 61 78 63 6C 69 65 6E 74 73 5C 31 34 5C 67 61 6D 65 74 79 70 65 5C 77 61 72 5C 70 75 72 65 5C 31 5C 6D 61 78 50 69 6E 67 5C 32 30 30 5C 6B 63 5C 31 5C 68 77 5C 32 5C 6D 6F 64 5C 30 5C 76 6F 69 63 65 5C 30 5C 70 62 5C 31 ....infoResponse.\challenge\xxx\protocol\3\hostname\^1B^7abylon ^1eS^7ports ^1|||^7|||^1||| ^7CoD4 TDM Publicserver\mapname\mp_crash\clients\14\sv_maxclients\14\gametype\war\pure\1\maxPing\200\kc\1\hw\2\mod\0\voice\0\pb\1. key code auth: ....getKeyAuthorize 0 !REMOVEDKEYHERE! PB changed0002597a178c647b5fc48069f get challenge (master server?): ....getchallenge 0 "changed0002597a178c647b5fc48069f" keycode in use: FF FF FF FF 65 72 72 6F 72 0A 45 58 45 5F 45 52 52 5F 43 44 4B 45 59 5F 49 4E 5F 55 53 45 ....error.EXE_ERR_CDKEY_IN_USE get status: FF FF FF FF 67 65 74 73 74 61 74 75 73 ....getstatus status response (cutted): ....statusResponse.\_Admin\.:MK:.CoD4\_Location\Germany\_Website\http://www.domain.tld\g_compassShowEnemies\0\g_gametype\war\gamename\Call of Duty 4\mapname\mp_overgrown\protocol\3\shortversion\1.4\sv_allowAnonymous\0\sv_disableClientConsole\0\sv_floodprotect\1\sv_hostname\^1Michaels ^3Heaven\sv_maxclients\26\sv_maxPing\0\sv_maxRate\25000\sv_minPing\0\sv_privateClients\6\sv_punkbuster\1\sv_pure\1\sv_voice\0\ui_maxclients\32\pswrd\0\mod\0.70 45 "^4.:MK:.^3CoD4".0 103 "Lara Croft".52 53 "Mario-G".74 113 "=[AGP]=Light62" (...) ![]() -=][ If it bores we can mod it ][=- | ||
| Back to top | | ||
| SilverCloud |
| ||
![]() Registered Member #731 Posts: 10 | I guess most of the info is the same as the previously used Q3 protocol. An open-source version can be found at: http://svn.icculus.org/twilight/trunk/dpmaster/src/ I've tried to create one before in C++. Basic functions are working. wrote ... server response (only a small part here, what is this for and whats the content?): FF FF FF FF 67 65 74 73 65 72 76 65 72 73 52 65 73 70 6F 6E 73 65 0A 00 5C D5 72 16 71 71 21 5C D8 F6 31 B7 71 20 5C 42 4F BC E1 71 25 5C CB 74 1C 1C 71 20 5C 40 22 C3 77 71 2A 5C 43 47 19 EB 71 20 5C 45 0C 5E 1E 71 20 5C 55 83 CA 0E 71 16 5C 3E 68 AC 63 71 20 5C 55 EC 65 5F 71 20 5C 4D BB 4D 0D 71 20 5C 55 15 F5 15 71 21 5C 55 83 AA ....getserversResponse..\.r.qq!\..1.q \BO..q%\.t..q \@".wq*\CG..q \E.^.q \U...q.\>h.cq \U.e_q \M.M.q \U...q!\U.. (...) Basically it's: 'getserversResponse' followed by the ip address in 4 bytes and then 2 bytes for the port. Servers are seperated by an '\' at the end. | ||
| Back to top | | ||
| CoDEmanX |
| ||
![]() Registered Member #68 Posts: 299 | "Basic functions are working" --> you already managed it? CoD4 showes delivered servers within in-game browser? ![]() -=][ If it bores we can mod it ][=- | ||
| Back to top | | ||
| SilverCloud |
| ||
![]() Registered Member #731 Posts: 10 | Yeah it does, the client queries all servers with "ÿÿÿÿgetServerInfo" (I believe) for all server information (slots, gametype, etc..). The server only handles which servers are registered. Well, to be honest, I think it handles the amount of players too: wrote ... ÿÿÿÿgetservers (protocol) full empty As I said, basic, my first C++ project ever (for CoD2, but it's the same; Q3 Protocol): http://rapidshare.com/files/78410803/src.rar.html | ||
| Back to top | | ||
| CoDEmanX |
| ||
![]() Registered Member #68 Posts: 299 | first: i'm not familiar with C++, so i don't really understand your source code :( after some more packet sniffing (assumed, in turn): 1.) get servers ÿÿÿÿgetservers (protocol) full empty --> is always the same, doesn't matter what is set (in-game filter options). cod4 receives all servers from master server and does all the filtering at clientside. 2.) server response server ips and ports (hex pattern: IP IP IP IP PO RT) 3.) get info cod4 mp client sends getinfo packets to all ips returned by master server 4.) info response gameservers' answers (hostname, mapname, max clients, gametype, pure, game, pswrd, ff, hw, mod, voice, pb) 5.) get status cod4 mp client sends getstatus packet to a single gameserver (when requested, server browser "Server Info" clicked) 6.) status response gameserver's answer (name, detailed config, players) 7.) challenge ping pings game or master server??? 8.) keycode auth stuff by master server only??? if keycode is authed, what does the server answer to grant client??? i think gameserver re-asks for keycode auth until master server authed it: FF FF FF FF 6E 65 65 64 63 64 6B 65 79 ....needcdkey getKeyAuthorize and getchallenge are send several times when master server does not answer. ??? = i don't know yet, too much cought udp-packets (couldn't find the right packet of > 10k) Silver, would you add a simple user interface to your master server application and build it for win32 please? i really want to see how it works. or let me know if i can add a gui using visual studio 2008 express edition (C++ native / .net) and how =) [ Edited Sat Dec 22 2007, 07:06PM ] ![]() -=][ If it bores we can mod it ][=- | ||
| Back to top | | ||
| SilverCloud |
| ||
![]() Registered Member #731 Posts: 10 | Notice the heartbeat. (7) Might be wrong, challenge is to make sure there's no bot trying to connect. In short, the challenge code has to be the same each session. Don't forget any MasterServer to GameServer messages. I didn't take a look at the authcode method, but I may guess... It's being send from the client to the GameServer, redirected to the MasterServer, granting the client access to the server (and preventing the cdkey to be used more than twice) | ||
| Back to top | | ||
| CoDEmanX |
| ||
![]() Registered Member #68 Posts: 299 | wrote ... getinfo: - description: This message is sent by a master to a server, usually in response to an "hearbeat" by this very server. It's used by the master to trigger the sending of an "infoResponse" from the server. The challenge string is necessary to authenticate the server's corresponding "infoResponse". but if i go to cod4 in-game browser (client), why do i send getinfo? looks like the master and the game server do this (q3). but cod4 mp client asks game / master server? wrote ... Silver, would you add a simple user interface to your master server application and build it for win32 please? i really want to see how it works. or let me know if i can add a gui using visual studio 2008 express edition (C++ native / .net) and how =) did you read that? i added it some minutes after i posted the reply [ Edited Sat Dec 22 2007, 07:56PM ] ![]() -=][ If it bores we can mod it ][=- | ||
| Back to top | | ||
| SilverCloud |
| ||
![]() Registered Member #731 Posts: 10 | Both the client and the master query the gameserver for 'getinfo'. The gameserver will respond with server information that is required to display the server-browser as it is. Didn't quite take a look at CoD4 yet, but it's probably the same. wrote ... did you read that? i added it some minutes after i posted the reply Compiled it just as it is, I made it for Win32 only because I don't have a *nix box available. http://rapidshare.com/files/78557830/MasterServer.rar.html Don't forget to redirect or change the cod2master.activision.com address. -- Edit: Screenshot, works for CoD4 too I noticed: ![]() The only purpose to have an additional master is to filter official servers from the cracked ones. I noticed it's pretty useless to make one myself. [ Edited Sun Dec 23 2007, 10:53AM ] | ||
| Back to top | | ||
| CoDEmanX |
| ||
![]() Registered Member #68 Posts: 299 | ok, cod4 asked the local master server, so far so good. how did you build the code? ms visual studio 6, mingw or any other compiler (i prefer visual IDEs)? i want to try sending some randomly genereted ips from master server to in-game browser client. if i know how to build console exe, i can try on my own and you don't have to do it for me. or my suggestion if you have some time: you code more needed functions and i do a GUI (until now only win32 experience). maybe Qt4? ![]() -=][ If it bores we can mod it ][=- | ||
| Back to top | | ||
| SilverCloud |
| ||
![]() Registered Member #731 Posts: 10 | I'm using Dev-C++ for now, I'm not into coding C++ at all. Before that I coded professional PHP websites, and I decided to do some other languages after that. Anyway, I can provide you some help, but we'll have to do some research first. Something like: why would we need a Master anyway, and what are the basic workflows... Apart from that, I've never worked with GUIs before, it's complete new to me. | ||
| Back to top | | ||
| Go to page >> | |
Powered by e107 Forum System

![[ Colonel ]](../../e107_themes/cod4/forum/ranks/o5ltc.gif)

![[ Private ]](../../e107_themes/cod4/forum/ranks/e2pvt.gif)



