[FilterScript] Anti Advertisement System - Simple, yet effective!
#1

Anti Advertisement System
Simple, yet effective!
Information

This filterscript uses a regular expression to detect valid IP Addresses (0-255) to block them later on and prevent them from being sent to other players. However, invalid IP Addresses (not 0, not between 0 and 255, not 255) are sent to other players - That isn't really a problem since it's invalid.

Regular Expression

This is the regular expression used in this filterscript:
Код:
(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.+){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
Method

The filterscript converts all the characters (not numbers, only characters) in the text to points (.) and then uses the regular expression to validate the text, whether a valid IP Address was found or not.

Requirements

To use this filterscript, you will need to get the following, if you don't have it yet: Screenshots

1)

Message sent:


Response from filterscript:


2)

Message sent:


Response from filterscript:


3)

Message sent:


Response from filterscript:


4)

Message sent:


Response from filterscript:


5)

Message sent:


Response from filterscript:


6)

Testing the regular expression used in this filterscript:


Notice
  • IP Addresses used in this thread are suppose to be invalid.
  • The provided plugin may cause the server to crash, consider using another source.
Download

Anti Advertisement System - Pastebin - #1 paste tool since 2002

Additional

This thread is also available in Spanish / Espaсol, click here and you will be redirected to it automatically!
Reply
#2

Wow, nice one ! keep it up +REP
Reply
#3

Looks cool
Reply
#4

How about this. 128 1 1 1.
Reply
#5

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
How about this. 128 1 1 1.


Reply
#6

Nice fs i wanna use that regex to check IP on my server.
Thanks for sharing sir.
Reply
#7

wow, cool fs, thanks for sharin, i gonna use it on my server thanks
Reply
#8

Very usefull, going to use it. +1
Reply
#9

Good Job Brother!
Reply
#10

Nice, but would have been awesome if it did't required an external plugin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)