Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: [Q3 FIX] Q3 fake clients fix

  1. #21
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    I added your build + the last script with getState. Still got 10 bots in the server.

    http://service.killtube.org/?ip=46.4...yles/frontpage

    I dont have root access so I cant add the iptables. He is also using different IP's now
    Then i will need to add a rate limiter for connect too.

    Edit: it is harder to make than i thought. I expect that the current code will also block other players from joining as well.
    Last edited by Mitch; 8th June 2015 at 15:39.

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

    Ni3ls (8th June 2015)

  3. #22
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    A lot of servers in COD2 1.0 are filled now... Some russian kid is doing this. Max 5 bots are added now, so its already a big improvement

  4. #23
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    A lot of servers in COD2 1.0 are filled now... Some russian kid is doing this. Max 5 bots are added now, so its already a big improvement
    I guess that there is no need for connect rate limiter.

    This might limit the fake clients a little better. It will allow ~5 challenge packets per second.
    PHP Code:
    int hook_SV_GetChallenge(netadr_t from)
    {
        
    // Prevent using getchallenge as an amplifier
        
    if ( SVC_RateLimitAddressfrom51000 ) ) { 
    The limiter stores the burst of the packets. The challenge limiter is also affected by other packets like getinfo, getstatus, rcon.
    For example, 2x getinfo, 2x getstatus, 1x rcon and 1x getchallenge in one second. With the above code the challenge will be dropped, because it is packet #6.

  5. #24
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    And how to use / add this? :P

  6. #25
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    And how to use / add this? :P
    Maybe for now it might be easier to tweak the fake bot kick script.

    Now the server will wait 5 seconds for the first fake client. But after kicking this bot, the server will kick the clients from that IP after 1.5 seconds.
    PHP Code:
    kickFakeClients()
    {
        
    self endon("begin");
        
    self endon("disconnect");

        if(
    self getGuid() != 0)
            return; 
    // cd key can only be used once

        
    wait 0.05;

        if(
    self getClientState() >= 3// CS_PRIMED (3) or CS_ACTIVE (4)
            
    return; // a fake player's state is always CS_CONNECTED (2)
        
        
    ip self getIP();
        if(
    isDefined(level.lastfakeplayerip) && level.lastfakeplayerip == ip
            
    wait 1.5;
        else 
    // more time when IP isn't the same as previous ip 
            
    wait 5;
        
        if(
    self getClientState() == 2)
        {
            
    lastconnect self getLastConnectTime();
            
    lastmsg self getLastMSG();
            if(
    lastconnect == lastmsg)
            {
                
    level.lastfakeplayerip ip// store ip from fake client
                
    self kickFakeClient(iplastconnectlastmsg);
            }
        }
    }

    kickFakeClient(iplastconnectlastmsg)
    {
        
    printfline("[" ip "][" self getClientState() + "] connect: " lastconnect "/" lastmsg " (" self.name ")");
        
    iprintln(self.name "^7 connection timeout.");
        
    kick(self getEntityNumber());

    How to use:
    PHP Code:
    Callback_PlayerConnect()
    {
        
    thread dummy();

        
    self thread kickFakeClients();
        
    self PlayerConnected(); 
    You can add it to CodeCallback_PlayerConnect() when you are use multiple gametypes.
    Last edited by Mitch; 26th August 2016 at 17:28. Reason: added how to use.

  7. #26
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    But the bots connect every 0.05 seconds. Thats the smallest delay

  8. #27
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    But the bots connect every 0.05 seconds. Thats the smallest delay
    If the rate limiter limits the connecting bots to 5 each second then you could try changing the wait to 0.15.
    PHP Code:
    if(isDefined(level.lastfakeplayerip) && level.lastfakeplayerip == ip
        
    wait 0.15

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

    Ni3ls (13th August 2015)

  10. #28
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Again a filler.
    Mitch's script works perfectly!
    IP of filler: http://www.ip-tracker.org/locator/ip...=80.25.150.100

    New IP of the filler:
    109.26.225.58
    Last edited by kung foo man; 16th August 2015 at 17:25. Reason: Merged Info

Posting Permissions

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