Download the PHP package survos/bad-bot-bundle without Composer
On this page you can find all versions of the php package survos/bad-bot-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bad-bot-bundle
BadBotBundle
If you visit a link likely to be a bot probing the site for weakness, you'll be banned!
How it works
- At the beginning of every request, check if the IP is marked as banned and block it if is.
- At the end of every request that returns a 404, if the path is a likely bad bot path, add the IP to the banned list.
- The banned IP list can either be in the application cache (fast and will reset after a configurable time) or persisted in a key value list.
The key/value bundle stores the following:
- probe_paths: e.g. phpinfo, wp-admin
- banned_ip: (optional) list of banned IPs (if we want to persist them)
Idea: BadBotServer, to track banned IPs, probe paths, user-agents, etc.
$kvManager->add('banned_ips', $ip); OR php if ($cache->has('bannedips' . $ip)) { // abort the request } console composer require survos/bad-bot-bundle console bin/console doctrine:schema:update --force bin/console bot:populate https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/raw/refs/heads/master/_generator_lists/bad-ip-addresses.list yaml email_blacklist_type: class: 'LSBProject\BlacklistBundle\Type\EmailType' tags:
- { name: 'lsbproject.blacklist.type' }
yaml
lsb_project_blacklist:
default_type: LSBProject\BlacklistBundle\Type\DefaultType
Validate storage
If you do not want to use database as a storage for blacklist you
can implement your own validate
method for a separate or default types.
example of default validate
All versions of bad-bot-bundle with dependencies
symfony/config Version ^6.4 || ^7.1
symfony/dependency-injection Version ^6.4 || ^7.1
symfony/http-kernel Version ^6.4 || ^7.1
survos/key-value-bundle Version *