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

Anti-Ping Mask


Post New Thread Reply   
 
Thread Tools Display Modes
HassePech
New Member
Join Date: Feb 2013
Location: Germany
Old 03-21-2013 , 16:13   Re: Anti-Ping Mask
Reply With Quote #101

Just replace line 208 in the antipingmask.sp script with this one and compile:

Code:
new nMatches = SimpleRegexMatch( CmdRate, "[^a-z A-Z \\_ \\d ]+" );
Works for me with "+" and "-" values.

Tested on DoD:Source.
__________________
- HassePech -

Last edited by HassePech; 03-21-2013 at 16:19. Reason: grammar
HassePech is offline
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Old 03-21-2013 , 17:02   Re: Anti-Ping Mask
Reply With Quote #102

I'm still using my fix from about 2.5 years ago to solve that problem. It forces the cl_cmdrate to only consist of digits and periods and to be greater than or equal to 30.

HassePech's regex, "[^a-z A-Z \\_ \\d ]+", if I'm reading the double-escaping right, allows only the following characters:
a lowercase letter
a space
an uppercase letter
a space (redundant)
an underscore (unnecessarily escaped as it's not a regex special character)
a space (redundant again)
a digit
a space (redundant yet again)

It also doesn't check the value of the number, and a low cl_cmdrate allows ping-masking.

The original regex, "[^\\d\\s\\.]+", allows only the following characters:
a digit
a space, tab, or line break
a period (unnecessarily escaped as a period is treated as a literal when used in a character class)

Whitespace is bad, as it still allows ping-masking.

My regex, for comparison, "[^0-9.]", allows only the following characters:
a digit
a period

The + (non-empty repetition) at the end was also unnecessary.

The value is then checked to make sure it's at least 30.

Last edited by Mister_Magotchi; 03-21-2013 at 17:03.
Mister_Magotchi is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 03-23-2013 , 01:23   Re: Anti-Ping Mask
Reply With Quote #103

Thanks, work's !
eric0279 is offline
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 03-30-2013 , 18:46   Re: Anti-Ping Mask
Reply With Quote #104

Hi,

Thanks for this plugin, it's working fine. I'm using Mister_Magotchi little edit.

I would still need an answer to that question:
Why do you use CloseHandle (t_TimerHandle) instead of KillTimer (t_TimerHandle) ?

It works without error but I'd like to know the difference.

Regards,

St00ne
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 03-30-2013 at 18:48.
St00ne is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 03-30-2013 , 18:58   Re: Anti-Ping Mask
Reply With Quote #105

Quote:
Originally Posted by St00ne View Post
Hi,

Thanks for this plugin, it's working fine. I'm using Mister_Magotchi little edit.

I would still need an answer to that question:
Why do you use CloseHandle (t_TimerHandle) instead of KillTimer (t_TimerHandle) ?

It works without error but I'd like to know the difference.

Regards,

St00ne
The only benefit to KillTimer() is the 2nd boolean parameter which lets you close any handles passed on to the timer through the info parameter if TIMER_DATA_HNDL_CLOSE was not specified. In this case, he doesn't even pass any variables through the info parameter when making the timer, so he doesn't really need to use KillTimer().
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 04-03-2013 , 14:55   Re: Anti-Ping Mask
Reply With Quote #106

but I can confirm that once in the game, if the player changes the variable cl_cmdrate +/-30, it is not kicked on L4D2

Last edited by eric0279; 04-03-2013 at 14:55.
eric0279 is offline
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 04-03-2013 , 17:07   Re: Anti-Ping Mask
Reply With Quote #107

Quote:
Originally Posted by minimoney1 View Post
The only benefit to KillTimer() is the 2nd boolean parameter which lets you close any handles passed on to the timer through the info parameter if TIMER_DATA_HNDL_CLOSE was not specified. In this case, he doesn't even pass any variables through the info parameter when making the timer, so he doesn't really need to use KillTimer().
Hi,

Thx a lot for your answer. It's not perfectly clear for me but it still helped me, I also found this to get info: http://wiki.alliedmods.net/Timers_%2...d_Scripting%29

++
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 04-03-2013 at 17:07.
St00ne is offline
Kalle4000
Junior Member
Join Date: Jan 2012
Location: Denmark
Old 04-29-2013 , 02:00   Re: Anti-Ping Mask
Reply With Quote #108

Does the apm_timeinterval work? Because when testing this on my server, I changed the value to 35, or 19, or 55, but I get kicked almost 4 seconds after joining each time? (not because it's a problem, the plugin is quiet good/useful, but just pointing out)
Kalle4000 is offline
Andre Gomes
New Member
Join Date: May 2013
Location: Natal, RN - Brasil
Old 05-11-2013 , 14:46   Re: Anti-Ping Mask
Reply With Quote #109

I just translated it to portuguese and added to antipingmask.phares.txt
Attached Files
File Type: txt antipingmask.phrases.txt (2.6 KB, 151 views)
Andre Gomes is offline
Send a message via ICQ to Andre Gomes Send a message via MSN to Andre Gomes Send a message via Skype™ to Andre Gomes
IceCucumber
Member
Join Date: Dec 2011
Old 09-28-2013 , 02:51   Re: Anti-Ping Mask
Reply With Quote #110

Would love to see logging added to this (which cl_cmdrate value triggered the anti-ping mask).
IceCucumber 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 03:47.


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