aran112000 / nope-php
一种轻量级工具,用于实时解析日志文件并阻止符合您定义的模式的请求
dev-master
2020-05-17 16:20 UTC
Requires (Dev)
- phpstan/phpstan: ^0.12.25
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-09-18 01:46:33 UTC
README
用于阻止讨厌的爬虫的日志处理框架!
设计为完全可定制的框架,以实时处理您的日志文件并阻止使用 iptables
和 iplist
识别为恶意的行为。
安装
如果您使用 composer,只需运行
composer require aran112000/nope-php
当前预期的 Nginx 访问日志格式
'[$time_local] $request_method $scheme://$host$request_uri "$request" "$status" "$http_x_forwarded_for" "$remote_addr" "$remote_user" "$bytes_sent" "$http_referer" "$http_user_agent" "$sent_http_content_type"'
要求
- PHP >= 5.6.*
- PHP Redis 扩展已安装 (如果您想跟踪时间上的点击)
- 供我们实时处理的日志文件
是否遇到了讨厌的 /wp-admin 请求?
检查您的 vhost 是否支持实时 WordPress,如果不支持,则响应阻止 IP 段一段时间,时间由您指定。