Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: [COD4]How to make cracked server show in master list?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ... connecting
    Join Date
    Dec 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [COD4]How to make cracked server show in master list?

    Hello,
    I am on linux box, running few cod4 servers and I need some help making them show in master list.

    I did some changes in my iptables:

    -A INPUT -p udp -m udp -m string --sport 20800 -j DROP --algo bm --string "BANNED_CDKEY"
    -A INPUT -p udp -m udp -m string --sport 20800 -j DROP --algo bm --string "INVALID_CDKEY"
    -A OUTPUT -p udp -m udp -m string --sport 20800 -j DROP --algo bm --string "INVALID_CDKEY"
    -A OUTPUT -p udp -m udp -m string --sport 20800 -j DROP --algo bm --string "BANNED_CDKEY"
    and using original bins, it's not working.. msg is "key code is in use".
    I need little help here and may be patched bins too

  2. #2
    ... connecting
    Join Date
    Dec 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found a way to fix it. Unfortunately it is not working with ip tables at all.
    Just find getIpAuthoruze in bin file, using hex editor and rename it (first one) with something else, so it will not get IP authorization for clients who want to connect to the server. That's it.

    Thanks goes to IzNoGoD, who point me to right direction

    Happy new year to all

  3. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    I dont think I had anything to do with it.
    Might have been mitch?

  4. #4
    ... connecting
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello,

    i renamed getIpAuthorize to other letters, but now i'm getting: "Key Code in use. Please try reconnecting later."

    Can anyone help me with this? I want to run cod4 cracked linux server which should be shown in master list. Thanks!

  5. #5
    ... connecting
    Join Date
    May 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I'm also attempting this and had the same issue as jankarl ^^^

    Anyone know the solution? Cheers

  6. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Coldieee View Post
    Hi,

    I'm also attempting this and had the same issue as jankarl ^^^

    Anyone know the solution? Cheers
    I will look into the porting my cracked solution from cod4 to cod2 when i got time.

    See:
    https://github.com/kungfooman/libcod...ter/libcod.cpp (hook call of AuthorizeState: line 1944)
    https://github.com/kungfooman/libcod.../functions.hpp (requires addresses of Cmd_Argv, Cvar_VariableValue and hook_AuthorizeState_call)

    Ok, it seems that my cracked solution from cod2 doesn't work in cod4. Cvar_VariableValue should be 0x0819E7C0.

    PHP Code:
    void *__cdecl sub_816FE18(int a1char a2__int16 a3int a4int a5)
    {
      const 
    char *v5// edx@2
      
    __int32 v6// eax@4
      
    int v7// edx@4
      
    int v8// esi@4
      
    signed int v9// edx@7
      
    const char *v10// ebx@9
      
    void *result// eax@15
      
    int v12// eax@35
      
    int v13// [sp+18h] [bp-430h]@13
      
    int v14// [sp+18h] [bp-430h]@24
      
    char *v15// [sp+18h] [bp-430h]@40
      
    signed int v16// [sp+34h] [bp-414h]@7
      
    signed int v17// [sp+38h] [bp-410h]@8
      
    char v18// [sp+3Ch] [bp-40Ch]@42

      
    if ( !sub_813C0C4(a1a2a3a4a5v13e7844cv13e78450v13e78454) )
        return (
    void *)sub_8122B2E(15"SV_AuthorizeIpPacket: not from authorize server\n");
      
    v5 "%s%s\t\n" 6;
      if ( *(
    _DWORD *)(v8879a40 0x8879A84) > )
        
    v5 = *(const char **)(*(_DWORD *)(v8879a40 0x8879AA4) + 4);
      
    v6 __strtol_internal(v50100);
      
    v8 0;
      
    v7 0;
      while ( 
    v6 != *(_DWORD *)(v7 333857868) )
      {
        ++
    v8;
        
    v7 += 80;
        if ( 
    v8 == 1024 )
          return (
    void *)sub_8122B2E(15"SV_AuthorizeIpPacket: challenge not found\n");
      }
      *(
    _DWORD *)(80 v8 0x13E64454) = v90b4f84;
      
    v9 = *(_DWORD *)(v8879a40 0x8879A84);
      
    v16 136494744;
      if ( 
    v9 )
      {
        
    v16 = *(_DWORD *)(*(_DWORD *)(v8879a40 0x8879AA4) + 8);
        
    v17 136494744;
        if ( 
    v9 <= )
        {
    LABEL_9:
          
    v10 "%s%s\t\n" 6;
          if ( 
    v9 <= )
            goto 
    LABEL_10;
          goto 
    LABEL_17;
        }
      }
      else
      {
        
    v17 136494744;
        if ( 
    v9 <= )
          goto 
    LABEL_9;
      }
      
    v17 = *(_DWORD *)(*(_DWORD *)(v8879a40 0x8879AA4) + 12);
      
    v10 "%s%s\t\n" 6;
      if ( 
    v9 )
    LABEL_17:
        
    v10 = *(const char **)(*(_DWORD *)(v8879a40 0x8879AA4) + 20);
    LABEL_10:
      if ( !
    sub_81AAAE2(v16"deny") )
      {
        if ( !
    v17 || !*(_BYTE *)v17 )
          goto 
    LABEL_45;
        if ( !
    sub_81AAAE2(v17"CLIENT_UNKNOWN_TO_AUTH") || !sub_81AAAE2(v17136518348) )
        {
          
    v13 = (int)"needcdkey";
          goto 
    LABEL_14;
        }
        if ( 
    sub_81AAAE2(v17"INVALID_CDKEY") )
        {
          
    sub_81AAAE2(v17"BANNED_CDKEY");
          
    v13 = (int)"error\nEXE_ERR_BAD_CDKEY";
        }
        else
        {
    LABEL_45:
          
    v13 = (int)"error\nEXE_ERR_CDKEY_IN_USE";
        }
    LABEL_14:
        
    sub_813D086(
          
    1,
          *(
    _DWORD *)(80 v8 0x13E64438),
          *(
    _DWORD *)(80 v8 0x13E6443C),
          *(
    _DWORD *)(80 v8 0x13E64440),
          *(
    _DWORD *)(80 v8 0x13E64444),
          *(
    _DWORD *)(80 v8 0x13E64448),
          
    v13);
        return 
    memset((void *)(80 v8 333857848), 00x50u);
      }
      if ( 
    strcmp((const char *)(80 v8 333857892), v10) )
      {
        
    sub_8122B2E(
          
    15,
          
    "rejecting connection due to mismatched GUID: expected \"%s\", got \"%s\"\n",
          
    80 v8 333857892,
          
    v10);
        
    v14 = (int)"error\nEXE_ERR_BAD_CDKEY";
    LABEL_25:
        
    sub_813D086(
          
    1,
          *(
    _DWORD *)(80 v8 0x13E64438),
          *(
    _DWORD *)(80 v8 0x13E6443C),
          *(
    _DWORD *)(80 v8 0x13E64440),
          *(
    _DWORD *)(80 v8 0x13E64444),
          *(
    _DWORD *)(80 v8 0x13E64448),
          
    v14);
        return 
    memset((void *)(80 v8 333857848), 00x50u);
      }
      if ( !
    sub_81AAAE2(v16"demo") )
      {
        if ( !(
    unsigned __int8)sub_819E7C0("fs_restrict") )
        {
          
    v14 = (int)"error\nEXE_ERR_NOT_A_DEMO_SERVER";
          goto 
    LABEL_25;
        }
        goto 
    LABEL_35;
      }
      
    result = (void *)sub_81AAAE2(v16"accept");
      if ( 
    result )
      {
        if ( 
    v17 && *(_BYTE *)v17 )
        {
          
    sprintf(&v18"error\n%s"v17);
          
    v15 = &v18;
        }
        else
        {
          
    v15 "error\nEXE_ERR_BAD_CDKEY";
        }
        
    sub_813D086(
          
    1,
          *(
    _DWORD *)(80 v8 0x13E64438),
          *(
    _DWORD *)(80 v8 0x13E6443C),
          *(
    _DWORD *)(80 v8 0x13E64440),
          *(
    _DWORD *)(80 v8 0x13E64444),
          *(
    _DWORD *)(80 v8 0x13E64448),
          
    v15);
        return 
    memset((void *)(80 v8 333857848), 00x50u);
      }
      if ( !*(
    _DWORD *)(80 v8 0x13E64460) )
      {
    LABEL_35:
        
    v12 sub_81A9F8A("challengeResponse %i", *(_DWORD *)(80 v8 0x13E6444C));
        
    result = (void *)sub_813D086(
                           
    1,
                           *(
    _DWORD *)(80 v8 0x13E64438),
                           *(
    _DWORD *)(80 v8 0x13E6443C),
                           *(
    _DWORD *)(80 v8 0x13E64440),
                           *(
    _DWORD *)(80 v8 0x13E64444),
                           *(
    _DWORD *)(80 v8 0x13E64448),
                           
    v12);
      }
      return 
    result;

    You could hook all the calls in this function to sub_81AAAE2. (which compares the state with deny or accept)
    Last edited by Mitch; 8th May 2014 at 22:07.

  7. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (8th May 2014)

  8. #7
    ... connecting
    Join Date
    May 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Couldn't seem to edit my last post..

    Found this after more googling:

    https://iceops.in/ipb/index.php?/topic/1114-cod4x-faq/

  9. #8
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    I think this should do the trick:

    PHP Code:
    int hook_StateCompare(char statechar base)
    {
        if ((
    CvarVariableValue == NULL || CvarVariableValue("sv_cracked") == 1) && strcmp (state"deny") == 0// when sv_cracked 1 and deny state
        
    {
            if(
    strcmp(base"accept") == 0// when compare value is accept return true
                
    return 0;
            else
                return 
    1// when compare to value is deny return false
        
    }

        return 
    strcmp(statebase);
    }

    #if COD_VERSION == COD4_1_7
        
    cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
        
    cracking_hook_call(0x081701D6, (int)hook_StateCompare);
    #endif 
    Basically it changes the compare function to returning false (1) when it compares deny to deny. And it returns true (0) when it compares deny to accept.
    Last edited by Mitch; 11th May 2014 at 00:47.

  10. #9
    ... connecting
    Join Date
    Jun 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Mitch View Post
    I think this should do the trick:

    PHP Code:
    int hook_StateCompare(char statechar base)
    {
        if ((
    CvarVariableValue == NULL || CvarVariableValue("sv_cracked") == 1) && strcmp (state"deny") == 0// when sv_cracked 1 and deny state
        
    {
            if(
    strcmp(base"accept") == 0// when compare value is accept return true
                
    return 0;
            else
                return 
    1// when compare to value is deny return false
        
    }

        return 
    strcmp(statebase);
    }

    #if COD_VERSION == COD4_1_7
        
    cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
        
    cracking_hook_call(0x081701D6, (int)hook_StateCompare);
    #endif 
    Basically it changes the compare function to returning false (1) when it compares deny to deny. And it returns true (0) when it compares deny to accept.
    Hey Mitch, i look for a way for a long time to run a cod4 cracked server and never found anything in internet!! Sorry for my noob question, but how do u use this php codes u just gave here??

    Thanks for your help,
    ps: sorry for my bad english, i'm french
    Kill3ill

  11. #10
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by kill3ill View Post
    Hey Mitch, i look for a way for a long time to run a cod4 cracked server and never found anything in internet!! Sorry for my noob question, but how do u use this php codes u just gave here??

    Thanks for your help,
    ps: sorry for my bad english, i'm french
    Kill3ill
    The code is supposed to be adding to libcod. See https://github.com/kungfooman/libcod. (you will need to be able to edit your start up line for this to work. Also linux only)
    But i never got around to test that code.

    In https://github.com/kungfooman/libcod...er/libcod.cpp:

    Add after 'char * hook_AuthorizeState( int arg ) { **** }' (line 1446)
    PHP Code:
    int hook_StateCompare(char statechar base

        if ((
    CvarVariableValue == NULL || CvarVariableValue("sv_cracked") == 1) && strcmp (state"deny") == 0// when sv_cracked 1 and deny state 
        

            if(
    strcmp(base"accept") == 0// when compare value is accept return true 
                
    return 0
            else 
                return 
    1// when compare to value is deny return false 
        


        return 
    strcmp(statebase); 

    Add this before #ifdef IS_JAVA_ENABLED (line 2022)
    PHP Code:
    #if COD_VERSION == COD4_1_7 
        
    cracking_hook_call(0x0816FF42, (int)hook_StateCompare); 
        
    cracking_hook_call(0x081701D6, (int)hook_StateCompare); 
    #endif 
    Note: This code hasn't be tested so it might be that it could crash your game server. (cod4_lnxded)

    Edit: try this binary at http://znation.nl/libcod/
    Last edited by Mitch; 11th June 2014 at 19:51.

Posting Permissions

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