rmanara / brutalforce
保护网站安全,防止暴力破解攻击
2.0.1
2021-03-06 18:58 UTC
Requires
- php: >=5.6.1
Requires (Dev)
- phpunit/phpunit: 8.*
This package is auto-updated.
Last update: 2024-09-07 02:32:44 UTC
README
brutalforce
- 仓库: https://github.com/rodrigomanara/brutalforce
- 版本: 2.0.0
composer require rmanara/brutalforce
暴力破解方法被许多黑客使用,但
brutalforce通过检查客户端IP,并计算在1秒内的请求数量,可以帮你避免这个问题。它将设置一个会话,并在1分钟后重置。
设置非常简单,可以在任何框架中使用。
非常简单的设置
<?php // require_once './vendor/autoload.php'; // use BrutalForce\Initiate // $init = new Initiate(); //display on the footer after the jQuery url been loaded //if rate "MEDIUM" as it is normall //if rate "MEDIUM HIGHT" as it is normall //if rate "LOW" it's is too quickly $rate = $init->Rate(); //this point you can stop the request ####### here is another way to use $predict = $init->predict(); //if is below 0.5 the request is too quickly and it can be a robot // over 0.5 then it's fine.