Results 1 to 10 of 24

Thread: Server doubles

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #19
    Private
    Join Date
    Nov 2013
    Posts
    16
    Thanks
    2
    Thanked 17 Times in 6 Posts
    Looks like you got it working but here is my answer just for the record.

    Was there something added/changed in 1.2/1.3 (I didn't find anything)?
    The only difference in network communication (the part that is human-readable) in 1.3 is the new "/punkbuster/" parameter that was added (compeard to 1.0), not counting 'protocol' and 'shortversion' changes ofc:

    Code:
    1.0
    \xff\xff\xff\xffstatusResponse
    \g_antilag\1\g_gametype\dm\gamename\Call of Duty 2\mapname\mp_toujane\protocol\115\scr_friendlyfire\0\scr_killcam\1\shortversion\1.0\sv_allowAnonymous\0\sv_floodProtect\1\sv_hostname\1\sv_maxclients\20\sv_maxPing\0\sv_maxRate\0\sv_minPing\0\sv_privateClients\0\sv_pure\1\sv_voice\0\challenge\1199179950\pswrd\0\mod\0
    
    1.3
    \xff\xff\xff\xffstatusResponse
    \g_antilag\1\g_gametype\dm\gamename\Call of Duty 2\mapname\mp_toujane\protocol\118\scr_friendlyfire\0\scr_killcam\1\shortversion\1.3\sv_allowAnonymous\0\sv_floodProtect\1\sv_hostname\1\sv_maxclients\20\sv_maxPing\0\sv_maxRate\0\sv_minPing\0\sv_privateClients\0\sv_punkbuster\0\sv_pure\1\sv_voice\0\challenge\1199270075\pswrd\0\mod\0
    There was also some more difference in the 'connect' packet with again added parameter '\cl_wwwDownload\'.

    So to answer your question, No. There were no major changes that would make master-server not accept your fake server as 1.3 (assuming you changed the protocol to 118).
    Here is my code i just wrote in approx. 50 lines:

    PHP Code:
    #Network module for basic UDP communication
    import socket

    #Time module
    import time

    variables 
    = {
        
    'myServerAddr': ("31.14.136.83"28965),            #Localhost refers to the local addr that is on current computer
        
    'masterServerAddr1': ("185.34.104.231"20710),    #This is the master server to witch you send hearbeats
        
    'masterServerAddr2': ("185.34.104.231"20700),    #This is the master server to witch you send IpAuthorize
    }

    sock socket.socket(socket.AF_INET,        # Internet dedicated
                         
    socket.SOCK_DGRAM)        # UDP oriented
        
    sock.bind(variables['myServerAddr']);    
    sock.settimeout(1)    #Raise an exeption if one second passed and no request has been done

    def sendStatusResponse(addrchallenge ""):
        
    sock.sendto("\xff\xff\xff\xffstatusResponse\n\\g_antilag\\1\\g_gametype\\dm\\gamename\\Call of Duty 2\\mapname\\mp_toujane\\protocol\\118\\scr_friendlyfire\\0\\scr_killcam\\1\\shortversion\\1.3\\sv_allowAnonymous\\0\\sv_floodProtect\\1\\sv_hostname\\1111111111111111111\\sv_maxclients\\20\\sv_maxPing\\0\\sv_maxRate\\0\\sv_minPing\\0\\sv_privateClients\\0\\sv_punkbuster\\0\\sv_pure\\1\\sv_voice\\0\pswrd\\0\\mod\\0\\challenge\\"+challenge.replace(' '''), addr);

    def sendInfoResponse(addrchallenge ''):
        
    sock.sendto("\xff\xff\xff\xffinfoResponse\n\\challenge\\" challenge.replace(' ''') +"\\protocol\\118\\hostname\\1111111111111111111\\mapname\\mp_toujane\\sv_maxclients\\20\\gametype\\dm\\pure\\1\\kc\\1\\hw\\2\\mod\\0\\voice\\0\\pb\\12972288"addr)
        
    def updateServerState():
        
    #Looking at COD2MP_s.exe 1.3 IpAuthorize is sent first but i dont think this makes any difference what so ever
        
    sock.sendto("\xff\xff\xff\xffgetIpAuthorize 899360599 185.34.104.231 "" 0"variables['masterServerAddr2']);
        
    sock.sendto("\xff\xff\xff\xffheartbeat COD-2"variables['masterServerAddr1']); 
        
        
    sendStatusResponse(variables['masterServerAddr1']);

    #These messages are send to the master server every 60 seconds (number varies)
    updateServerState()

    timeStart time.time()

    while (
    1):
        try:
            
    dataaddr sock.recvfrom(1024)        
        
    except:
            continue
            
        if (
    time.time() - timeStart) > 60:
            
    updateServerState()
            
    timeStart time.time()
            
        if 
    data.lower().startswith("\xff\xff\xff\xffgetstatus"):
            
    sendStatusResponse(addrdata.lower().replace("\xff\xff\xff\xffgetstatus"""))
            
        if 
    data.lower().startswith("\xff\xff\xff\xffgetinfo"):
            
    sendInfoResponse(addrdata.lower().replace("\xff\xff\xff\xffgetinfo""")) 
    Simply changing the protocol from 115 (1.0) to 118 (1.3) did the trick.

  2. The Following User Says Thank You to stevomitric For This Useful Post:

    kung foo man (8th March 2017)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •