Skip to content

The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.

License

Notifications You must be signed in to change notification settings

rossey/big-list-of-naughty-strings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Big List of Naughty Strings

This is my PHP wrapper around Max Woolf's Big List of Naughty Strings. Thanks Max!

Setup

The big list of naughty strings repository can be included as a git submodule that lives in resources. Composer is configured to run ./bin/install.sh on post-install which will call git submodule update.

If you don't want to use the git submodule you can manually pass a file to the NaughtyStringsFactory constructor.

Examples

composer require rossey/big-list-of-naughty-strings

$factory = new \Rossey\Blns\NaughtyStringsFactory;

foreach($factory->getNaughtyStrings() as $naughtyString) {
    echo $naughtyString;
}

Factory with manual file

$factory = new \Rossey\Blns\NaughtyStringsFactory(PATH_TO_FILE);

The factory will return an array of NaughtyString objects. The NaughtyString has a __toString method so you'll need to cast it to a string.

About

The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published