AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Anti-Ping Mask (https://forums.alliedmods.net/showthread.php?t=98195)

atom0s 07-23-2009 12:15

Anti-Ping Mask
 
2 Attachment(s)
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.

bman87 07-23-2009 14:27

Re: Anti-Ping Mask
 
Why not use a ClientCommand to stop it instead of kicking the client?

ClientCommand(client, "cl_cmdrate 30");

atom0s 07-24-2009 00:07

Re: Anti-Ping Mask
 
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 07-24-2009 01:30

Re: Anti-Ping Mask
 
Quote:

Originally Posted by bman87 (Post 879886)
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

devicenull 07-24-2009 01:36

Re: Anti-Ping Mask
 
Why not just set sv_maxcmdrate?

meng 07-24-2009 01:39

Re: Anti-Ping Mask
 
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.

atom0s 07-24-2009 02:08

Re: Anti-Ping Mask
 
Quote:

Originally Posted by meng (Post 880333)
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 07-24-2009 04:29

Re: Anti-Ping Mask
 
v1.1.0.0 released. Please see first post for information and new download. (Reuploaded attachment so redownload.)

narutoramen 07-24-2009 09:44

Re: Anti-Ping Mask
 
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.

Molli 07-24-2009 10:57

Re: Anti-Ping Mask
 
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.


All times are GMT -4. The time now is 02:53.

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