Raised This Month: $12 Target: $400
 3% 

Anti-Ping Mask


Post New Thread Reply   
 
Thread Tools Display Modes
Author
atom0s
Senior Member
Join Date: Jul 2009
Plugin ID:
1030
Plugin Version:
1.6.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    199 
    Plugin Description:
    Removes players from a server via kick or ban whom are masking their pings.
    Old 07-23-2009 , 12:15   Anti-Ping Mask
    Reply With Quote #1

    This plugin requires the RegEx SourceMod extension to be loaded!

    Anti-Ping Mask


    What is it?
    Anti-ping mask is a plugin that helps prevent players from masking their latency shown to other players on the score board by allowing you to kick them, or ban them from your server. Ping masking is done by using an exploit known with the cl_cmdrate CVAR. Adding a character to the rate value causes the rate to be seen improperly to the server and causes the calculation of the players latency to be corrupted.

    How does it work?
    Simply put, the plugin queries every players cl_cmdrate upon connecting as well as throughout game play to check for an invalid rate. The plugin makes use the regular expression library to easily find any invalid non-numeric character inside the rate. If an invalid rate is found, the user is either kicked or banned (determined by settings) from the server and a message is displayed to all players informing them of what happened.

    CVARs

    antipingmask_version - Displays the current version of the plugin.
    Default: N/A [Adjusted internally per-version.]
    Values: N/A

    apm_handler - Determines how Anti-Ping Mask should handle ping masked clients.
    Default: 0 (Kick)
    Values: 0 kick, 1 ban

    apm_banlength - The length in minutes that a player is banned for ping masking.
    Default: 30 (minutes)
    Values: 0 for permanent, anything above per-minute. (Ex. 60 would be 60 minutes.)

    apm_timeinterval - The interval time, in seconds, that the timer should tick at to check for ping masking clients.
    Default: 15 (seconds)
    Values: Anything above 0, the number is in seconds. (I suggest not going below 10.)


    A screenshot of what is seen when a player is kicked for ping masking:
    [IMG]http://img528.**************/img528/9985/pingmask.jpg[/IMG]


    Installation

    To install, simply copy the plugin file (antipingmask.smx) to your plugins folder, and copy the translation file (antipingmask.phrases.txt) to your translation folder. Both folders can be found inside of your sourcemod folder.


    Change Log

    Pending Version..
    • Added Hungarian translation. "hu" (Thanks to KhyrOO.)
    • Added Romainian translation. "ro" (Thanks to SunBeam.)

    v1.6.0
    • Fixed version CVAR as requested by plugin approver.
    • Added Russian translation. "ru" (Thanks to exvel.)

    v1.5.0
    • Added Polish translation. "pl" (Thanks to Zuko.)
    • Added Danish translation. "dk" (Thanks to Da BuzZ : "OLLI, QUIT WOW NOW")
    • Added German translation. "de" (Thanks to Abus3.)
    • Added Japanese translation. "jp" (Thanks to Sakuri.) (In Romanji to ensure character visibility.)
    • Added Norwegian translation. "no" (Thanks to olli : "Quit whining Da_BuzZ")
    • Added handler for OnPluginEnd to close timer manually. (Crash reports.)
    • Added handler for OnMapEnd to close timer per-map. (Crash reports.) (Possible lag report fix.)
    • Added pragma for semicolon enforcement.
    • Changed KillTimer to CloseHandle inside of TimerIntervalChanged.
    • Fixed spelling of TimerIntervalChanged. (Whoops lol..)
    • Fixed case-sensitive issue with plugin info structure.

    v1.4.0
    • Removed handler for forcing rate changes on a client. (Doesn't work.)
    • Removed extra debug message that was left behind in a previous version.
    • Removed extra messages from the phrase file.

    v1.3.0
    • Removed additional cmdrate checking against server min/max values. (Due to false-positive kicking.)
    v1.2.0
    • Added SourceBan support.
    • Removed extra zero from version number.
    v1.1.0.0
    • Added new CVARs for additional options.
    • Fixed regex expression used to determine invalid command rates.
    • Removed colon in message displayed when a user is kicked.
    • Added checks against the servers min/max cmd rate. (Thanks for the suggestion meng)
    • Added ability to ban players on invalid rate.
    • Added ability to force rate setting on invalid clients. (Thanks for the suggestion bman87)(Please see notes about this.)
    • Fixed confusion with IsValidCmdRate command.
    Attached Files
    File Type: sp Get Plugin or Get Source (antipingmask.sp - 9255 views - 8.6 KB)
    File Type: txt antipingmask.phrases.txt (2.6 KB, 5288 views)

    Last edited by atom0s; 08-26-2009 at 11:51. Reason: Upgraded to 1.5.0
    atom0s is offline
    bman87
    Senior Member
    Join Date: Dec 2008
    Location: Michigan
    Old 07-23-2009 , 14:27   Re: Anti-Ping Mask
    Reply With Quote #2

    Why not use a ClientCommand to stop it instead of kicking the client?

    ClientCommand(client, "cl_cmdrate 30");
    bman87 is offline
    atom0s
    Senior Member
    Join Date: Jul 2009
    Old 07-24-2009 , 00:07   Re: Anti-Ping Mask
    Reply With Quote #3

    This being the first plugin I've ever written for SourceMod, I wanted to keep it simple, so I just have it setup to kick currently. In future updates, I can add different things for it to do based on cvar settings and such though.
    atom0s is offline
    atom0s
    Senior Member
    Join Date: Jul 2009
    Old 07-24-2009 , 01:30   Re: Anti-Ping Mask
    Reply With Quote #4

    Quote:
    Originally Posted by bman87 View Post
    Why not use a ClientCommand to stop it instead of kicking the client?

    ClientCommand(client, "cl_cmdrate 30");
    Just added this and it is blocked due to one of the semi-recent updates that Valve pushed out that prevents the server from executing commands on clients.

    Code:
    FVAR_SERVER_CAN_EXECUTE prevent server from running command: cl_cmdrate
    atom0s is offline
    devicenull
    Veteran Member
    Join Date: Mar 2004
    Location: CT
    Old 07-24-2009 , 01:36   Re: Anti-Ping Mask
    Reply With Quote #5

    Why not just set sv_maxcmdrate?
    __________________
    Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
    devicenull is offline
    meng
    Veteran Member
    Join Date: Oct 2005
    Location: us
    Old 07-24-2009 , 01:39   Re: Anti-Ping Mask
    Reply With Quote #6

    Awesome! get those 5 pingers. Im all for just kicking them. if they are using bad rates, its probably for a bad reason!
    but you know even if they use cl_cmdrate 10 it will mask their ping. you need to check for unacceptably low rates as well.

    Last edited by meng; 07-24-2009 at 01:42.
    meng is offline
    Send a message via Yahoo to meng
    atom0s
    Senior Member
    Join Date: Jul 2009
    Old 07-24-2009 , 02:08   Re: Anti-Ping Mask
    Reply With Quote #7

    Quote:
    Originally Posted by meng View Post
    Awesome! get those 5 pingers. Im all for just kicking them. if they are using bad rates, its probably for a bad reason!
    but you know even if they use cl_cmdrate 10 it will mask their ping. you need to check for unacceptably low rates as well.
    I'll be sure to add that in the next version as well to compare against the defaults on the server (min/max) and what the player has.
    atom0s is offline
    atom0s
    Senior Member
    Join Date: Jul 2009
    Old 07-24-2009 , 04:29   Re: Anti-Ping Mask
    Reply With Quote #8

    v1.1.0.0 released. Please see first post for information and new download. (Reuploaded attachment so redownload.)
    atom0s is offline
    narutoramen
    Junior Member
    Join Date: Jan 2009
    Location: UK
    Old 07-24-2009 , 09:44   Re: Anti-Ping Mask
    Reply With Quote #9

    I've been looking for one of these plugnis for a while... my server has the following settings on a 66-tick server:

    sv_maxupdaterate 67
    sv_minupdaterate 66
    sv_maxcmdrate 67
    sv_mincmdrate 66

    yet lots of people seem to be able to still mask their ping i.e. it doesn't fluctuate, it's not just a ping of 5, it also sticks at 12,15 etc.
    __________________
    narutoramen is offline
    Molli
    SourceMod Donor
    Join Date: Aug 2007
    Location: Finland
    Old 07-24-2009 , 10:57   Re: Anti-Ping Mask
    Reply With Quote #10

    well... i have scoreboard latency 5-15 on my own server and i use just rates 25000 100 100.

    If you have good connection (10-100mbit/s) and server is near you thats pretty normal i think.
    Molli is offline
    Reply


    Thread Tools
    Display Modes

    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 05:13.


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