caseyamcl/dangerous_usernames

A list of dangerous usernames

v1.1 2022-02-11 20:23 UTC

This package is auto-updated.

Last update: 2024-04-12 01:16:25 UTC


README

Latest Version on Packagist Software License Total Downloads

This is simply a list dangerous usernames that you can include in your project. It was inspired by this article.

It comes with a composer.json file and DangerousUserNames class for easy inclusion in PHP projects. But, since it is simply a txt file, you can use it with any platform.

Install

Via Composer:

$ composer require caseyamcl/dangerous_usernames

Or, use whatever programming language you want to open the textfile and read the contents into a list/array (one item per line).

Usage

use DangerousUserNames\DangerousUserNames;

// string[]
$dangerousNames = new DangerousUserNames();
$dangerousNames->inList('admin');       // case-insensitive
$dangerousNames->inList('ADMIN', true); // case-sensitive

Contributing

Pull requests are welcome! If you have any user names to add, please do so in alphabetical order.

Credits

License

The MIT License (MIT). Please see License File for more information.