Raised This Month: $32 Target: $400
 8% 

[CS:GO] Anti Pure File False Positive Kicker


Post New Thread Reply   
 
Thread Tools Display Modes
Author
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Plugin ID:
6637
Plugin Version:
1
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Prevents clients from falsely being kicked from
    Old 07-07-2019 , 18:54   [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #1

    Lately there has been a mass amount of reports of clients being kicked from servers due to having inconsistent files compared to the server. The kick message reason will look similar to this:

    "Pure server: file [GAME]\pak01_065.vpk does not match the server's file (76)"

    Normally this means that the clients game files have been modified. When the sv_pure convar is set on a server the connected clients will send 1000's of messages to the server of each file it currently has cached in memory. This message includes a files path and it's checksum (a series of digits that will uniquely identify large amounts of binary data in a compressed format). The server than reads its own local file of the given path and compares the checksum given to the value it determined the file should be. If there's a miss-match the server simply kicks the client. This can happen in many different ways from clients deliberately modifying the files to gain an advantage to a corruption occurring. You simply have to validate your clients game integrity cache.

    However after an influx of reports recently of this happening much more frequently I decided to look into a possible cause. Somewhere within the last 2 months valve added a new check which causes false positive kicks. They simply added a check which limits the amount of messages a client can send to the server within 1 second. This limit is 75 and most likely added as an anti DOS safe guard mechanic. Through my testing with this limit removed, I was unable to reproduce any server lag exploits.



    Here's where the false positives come in. If a client starts to have network issues such as packet loss or FPS lag, these network messages get added to a queue until the game frame is allowed to send the updated messages. This queue then gets sent out to the server in bulk when the connection returns. This means if a client just freezes for 3 seconds due to having a slow hard drive and loading a file from disk or a slow CPU, they will then spam the server with more than 75 packets of file checks and immediately be kicked from the server with the message above. This is kick is not due to them having modified game files but due to them simply lagging or being on a bad wifi signal.

    This plugin removes the limit to prevent these false kicks while keeping the normal sv_pure file inconsistencys checks which will still kick those clients.


    (CAUTION):
    This Plugin is written differently than most sourcemod plugins. It modifys ASM instructions directly and is prone to breaking much easier in future updates. If your server crashes as soon as a player connects after a csgo update, please start debugging by removing this plugin.

    Supported OS's are Windows and Linux.


    Installation:
    Place PureFilePatch.txt inside your "addons\sourcemod\gamedata\" directory (and the .smx inside your "addons\sourcemod\plugins\" directory...).
    Attached Files
    File Type: sp Get Plugin or Get Source (PureFileFalsePositiveAntiKicker.sp - 973 views - 2.0 KB)
    File Type: txt PureFilePatch.txt (571 Bytes, 394 views)
    __________________
    I highly recommend joining the SourceMod Discord Server for real time support.

    Last edited by backwards; 07-07-2019 at 18:57.
    backwards is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 07-07-2019 , 20:32   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #2

    sv_pure 0 would not solve this problem?
    paulo_crash is offline
    backwards
    AlliedModders Donor
    Join Date: Feb 2014
    Location: USA
    Old 07-07-2019 , 21:12   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #3

    Quote:
    Originally Posted by paulo_crash View Post
    sv_pure 0 would not solve this problem?
    It would but you also would disable normal pure checks so that clients could run modified files such as material wallhacks
    __________________
    I highly recommend joining the SourceMod Discord Server for real time support.
    backwards is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 07-07-2019 , 21:19   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #4

    Quote:
    Originally Posted by 1337norway View Post
    It would but you also would disable normal pure checks so that clients could run modified files such as material wallhacks
    In the case of casual server, for example, Surf / JailBreak that players put character skins and even skins for weapons, would I have a problem with this plugin? That is, leaving the plugin and sv_pure 1 I'm still kicked if to use plugins like Store, Skins Players and etc?
    paulo_crash is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 07-07-2019 , 21:25   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #5

    Quote:
    Originally Posted by paulo_crash View Post
    In the case of casual server, for example, Surf / JailBreak that players put character skins and even skins for weapons, would I have a problem with this plugin? That is, leaving the plugin and sv_pure 1 I'm still kicked if to use plugins like Store, Skins Players and etc?
    You only really want to run sv_pure on servers where the types of described modifications could provide an unfair advantage.

    Take a look for more info and how to properly whitelist custom content: https://developer.valvesoftware.com/wiki/Pure_Servers
    __________________
    sneaK is offline
    backwards
    AlliedModders Donor
    Join Date: Feb 2014
    Location: USA
    Old 07-07-2019 , 21:27   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #6

    well normally pure mode shouldn't kick for custom content on servers unless the client downloaded a different version of a file that uses the same path name. If this happens then that client has to delete the custom files he downloaded as they differ from the current servers custom content. This is how sv_pure is supposed to work. If you are getting kicked currently from custom content on the server then this will not fix the issue. If you aren't getting kicked for custom content then no this wouldn't cause any new conflicts.
    __________________
    I highly recommend joining the SourceMod Discord Server for real time support.
    backwards is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 07-07-2019 , 21:30   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #7

    Quote:
    Originally Posted by 1337norway View Post
    well normally pure mode shouldn't kick for custom content on servers unless the client downloaded a different version of a file that uses the same path name. If this happens then that client has to delete the custom files he downloaded as they differ from the current servers custom content. This is how sv_pure is supposed to work. If you are getting kicked currently from custom content on the server then this will not fix the issue. If you aren't getting kicked for custom content then no this wouldn't cause any new conflicts.
    I got it, thanks.
    paulo_crash is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 07-08-2019 , 00:51   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #8

    Quote:
    Originally Posted by 1337norway View Post
    well normally pure mode shouldn't kick for custom content on servers unless the client downloaded a different version of a file that uses the same path name.
    This actually happens a lot. Servers distribute all sorts of different variations of various trails/sprites/sounds, so mismatches are super common.
    __________________

    Last edited by sneaK; 07-08-2019 at 00:51.
    sneaK is offline
    r3v
    Senior Member
    Join Date: Feb 2016
    Location: Lithuania, Vilnius
    Old 05-05-2020 , 03:42   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #9

    Hey, can you check this plugin again? I think new CS:GO update broke this plugin. Some players being kicked again.

    Last edited by r3v; 05-05-2020 at 03:44.
    r3v is offline
    vortex.
    AlliedModders Donor
    Join Date: Jan 2017
    Location: OnGameFrame()
    Old 05-05-2020 , 04:21   Re: [CS:GO] Anti Pure File False Positive Kicker
    Reply With Quote #10

    Quote:
    Originally Posted by r3v View Post
    Hey, can you check this plugin again? I think new CS:GO update broke this plugin. Some players being kicked again.
    I think its not about plugins, sourcemod or anything.
    I just downloaded CSGO to a new pc today for test. And created a server without even sourcemod.
    I got kicked somehow.


    I think, Valve should fix it.
    __________________
    vortex. is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 16:38.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode