Results 1 to 7 of 7

Thread: Accept cracked players

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    I am currently trying this:
    PHP Code:
    void hook_ServerCommandnetadr_t frommsg_t *msg )
    {
        if (
    strncmp (msg->data,"\xff\xff\xff\xffipAuthorize"15) == 0)
        {
            
    char pch strstr (msg->data"deny");

            if(
    pch != NULL)
            {
                
    strncpy (pch,"demo",4); // replace 'deny' with 'demo' (now you need to set fs_restrict in cod to allow the deny players)
                
    printf("%s\n"msg->data);
            }
        }

        
    void (*SV_ConnectionlessPacket)( netadr_t frommsg_t msg );
        (*(
    int *)&SV_ConnectionlessPacket) = hook_ConnectionlessPacket;
        return 
    SV_ConnectionlessPacket(frommsg);

    https://github.com/M-itch/libcod/com...975ae48d8d4db8

    From quake source code:
    PHP Code:
        if ( !Q_stricmps"demo" ) ) {
            if ( 
    Cvar_VariableValue"fs_restrict" ) ) {
                
    // a demo client connecting to a demo server
                
    NET_OutOfBandPrintNS_SERVERsvs.challenges[i].adr
                    
    "challengeResponse %i"svs.challenges[i].challenge );
                return;
            }
            
    // they are a demo client trying to connect to a real server
            
    NET_OutOfBandPrintNS_SERVERsvs.challenges[i].adr"print\nServer is not a demo server\n" );
            
    // clear the challenge record so it won't timeout and let them through
            
    Com_Memset( &svs.challenges[i], 0sizeofsvs.challenges[i] ) );
            return;
        }
        if ( !
    Q_stricmps"accept" ) ) {
            
    NET_OutOfBandPrintNS_SERVERsvs.challenges[i].adr
                
    "challengeResponse %i"svs.challenges[i].challenge );
            return;
        } 
    With fs_restrict 0


    Now it replaces 'fs_restrict' with 'sv_cracked'.

    https://github.com/M-itch/libcod/com...c7fb772f22acab

    PHP Code:
    char cracked = (char *)"sv_cracked";
    memcpy((void *)(fsrestrict_ServerCommand+3), &cracked4); 
    Check in the hook if sv_cracked is 1 and then replace deny with demo. (works in latest commit)

    https://github.com/M-itch/libcod/com...b63807eaca66bf
    (included support for 1.0 and 1.2)

    New binaries are available at: http://znation.nl/libcod/
    Last edited by Mitch; 9th January 2014 at 16:27. Reason: tested, replaced 'fs_restrict' with 'sv_cracked'

Posting Permissions

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