Anti Advertising without regex
#1

Hello everyone, today I want to start a community effort to build an anti advertising function to detect adverts in strings without the use of regex.

I hope people will contribute.

I've started off using RyDer's stringContainsIP function as a base and modified it but I would like help from you guys.

You can contribute here: https://github.com/Kar2k/samp-anti-advertising

Current features:

Actual IP detection (use of numbers ranging from 0-255) with port.
Whitespace skipping.
Detection works with other symbols such as (127_0_0_1:7777).

What are all the things to consider when creating this?

Future plans:

- Allow IP detection without port (only works if a port is used currently). DONE.
- Instead of considering every character in the string.. only look for the numbers and check if they are valid IP numbers (0-255) and use that to consider detection. DONE.
- Ignoring letters between numbers and dots / colons .. E.G:
127aa.0.0zz.1.ff7777 DONE.
- Fixed separation option between ip numbers detection .. E.G: 127 $$$$ 0 $$$$ 0 $$$$ 1. As most advertisers that come in your server usual has a fixed set of characters in between the numbers in this case its " $$$$ ". Adding an option to detect that will greatly decrease false positives. DONE.
- Website detection possibly (maybe not.. too much false positives).
Reply


Messages In This Thread
Anti Advertising without regex - by Kar - 31.03.2016, 05:42
Re: Anti Advertising without regex - by xTURBOx - 31.03.2016, 08:29
Re: Anti Advertising without regex - by Kar - 31.03.2016, 14:05
Re: Anti Advertising without regex - by xTURBOx - 31.03.2016, 16:59
Re: Anti Advertising without regex - by SickAttack - 31.03.2016, 17:23
Re: Anti Advertising without regex - by Kar - 31.03.2016, 19:32
Re: Anti Advertising without regex - by Macluawn - 02.04.2016, 19:48
Re: Anti Advertising without regex - by Kar - 02.04.2016, 22:04
Re: Anti Advertising without regex - by kristo - 04.04.2016, 15:49
Re: Anti Advertising without regex - by Macluawn - 04.04.2016, 19:46
Re: Anti Advertising without regex - by Kar - 08.04.2016, 05:56
Re: Anti Advertising without regex - by Kar - 08.04.2016, 05:59
Re: Anti Advertising without regex - by Kar - 12.11.2017, 19:10
Re: Anti Advertising without regex - by OneDay - 12.11.2017, 19:18
Re: Anti Advertising without regex - by Kar - 12.11.2017, 21:23
Re: Anti Advertising without regex - by aoky - 12.11.2017, 21:25

Forum Jump:


Users browsing this thread: 3 Guest(s)