2017 © Pedro Peláez
 

library banbuilder

image

0cool-f/banbuilder

  • Friday, March 30, 2018
  • by 0cool-f
  • Repository
  • 0 Watchers
  • 0 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 72 Forks
  • 0 Open issues
  • 14 Versions
  • 7 % Grown

The README.md

BanBuilder Composer Package

Gitter Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

BanBuilder is a PHP package for profanity filtering. The PHP script uses regex to intelligently look for "leetspeak"-style numeric or symbol replacements., (*2)

Installing

To install BanBuilder, simply include it in your projects's composer.json., (*3)

"0cool-f/banbuilder": "master",

There are no additional dependencies required for this package to work., (*4)

Usage

Please see the official package website for full usage details., (*5)

Summary

In a nutshell, this code takes an array of bad words and compares it to an array of common filter-evasion tactics. It then does a string replacement to insert regex parameters into your badwords array, and then evaluates your input string to that expanded banned word list., (*6)

So in your bad words array, you might have:, (*7)

 [0] => 'ass'

The preg_replace functions replace all of the possible shenaningan letters with regex patterns (in lieu of adding the variants onto the end of the array), so the 'ass' in your array gets turned into this, right before the preg_replace checks for matches:, (*8)

 [0] => /(a|a\.|a\-|4|@|Á|á|À|Â|à|Â|â|Ä|ä|Ã|ã|Å|å|α)(s|s\.|s\-|5|\$|§)(s|s\.|s\-|5|\$|§)/i

This means that a word can have none, one or any variety of leet replacements and it will still trip the trigger. Part of the leet filter includes stripping out letter-dash and letter-dots., (*9)

This means that the following all evaluate to the "bitch":, (*10)

  • B1tch
  • bi7tch
  • b.i.t.c.h.
  • b-i-t-c-h
  • b.1.t.c.h.
  • ßitch
  • and so on....

Flattr this git repo, (*11)

Tests

To run the unit tests on this package, simply run vendor/bin/phpunit from the package directory., (*12)


License

Copyright (C) 2013 Alison Gianotto - snipe@snipe.net

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

The Versions

30/03 2018

v1.1

1.1.0.0

  Sources   Download

30/03 2018

v1.2

1.2.0.0

  Sources   Download

30/03 2018

v1.0

1.0.0.0

  Sources   Download

01/08 2016

dev-master

9999999-dev http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

26/08 2015

2.2.3

2.2.3.0 http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

06/08 2015

2.2.2

2.2.2.0 http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

04/08 2015

2.2.1

2.2.1.0 http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

12/06 2015

2.2.0

2.2.0.0 http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

03/02 2015

2.1.4

2.1.4.0 http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

28/01 2015

2.1.3

2.1.3.0 http://banbuilder.com

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

28/01 2015

2.1.2

2.1.2.0 https://github.com/snipe/banbuilder

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

28/01 2015

2.1.1

2.1.1.0 https://github.com/snipe/banbuilder

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

15/01 2015

2.1.0

2.1.0.0 https://github.com/snipe/banbuilder

Library to easily handle profanity filtering in PHP projects.

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear

15/01 2015

2.0.0

2.0.0.0 https://github.com/snipe/banbuilder

Library to easily handle profanity filtering in PHP projects. *** THIS IS NOT STABLE YET. DO NOT USE IT YET. ***

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar snipe

language filter strings profanity swear