Results 1 to 7 of 7

Thread: Accept cracked players

Threaded 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

    Accept cracked players

    In the code below it intercepts the deny message that kicks cracked players and replaces it with accept.

    PHP Code:
    void hook_ServerCommandnetadr_t frommsg_t *msg )
    {
            if (
    strncmp (msg->data,"˙˙˙˙ipAuthorize"15) == 0)
        {
            if(
    strstr (msg->data"deny") != NULL)
            {
                
    char d[100];
                
    char pch strtok (msg->data" ");
            
                while(
    pch != NULL)
                {
                    if(
    strcmp (pch"deny") == 0)
                        
    strcpy (pch"accept");

                    
    strcat (dpch);
                    
    pch strtok (NULL" ");

                    if(
    pch != NULL)
                        
    strcat (d" ");
                }

                
    msg->data d;
                
    printf("Data: %s\n"msg->data);
            }
        }

        
    void (*SV_ConnectionlessPacket)( netadr_t frommsg_t msg );
        (*(
    int *)&SV_ConnectionlessPacket) = 0x0809594E;
        return 
    SV_ConnectionlessPacket(frommsg);
    }

    cracking_hook_call(0x08096126, (int)hook_ServerCommand); 
    (the code above works only for 1.3, other patches can be easily added)

  2. The Following 3 Users Say Thank You to Mitch For This Useful Post:

    guiismiti (12th December 2013),kung foo man (3rd December 2013),YuriJurek (4th December 2013)

Posting Permissions

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