| Recommend this page to a friend! | 
| Info | Documentation | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 213 | All time:  8,336 This week: 53 | ||||
| Version | License | PHP version | Categories | |||
| brutalforce 1.0.1 | The PHP License | 5 | PHP 5, Security | 
| Description | Author  | ||||||||
This package can protect pages access against brute force attacks.  | 
  | 
Version: 1.0.7.1
composer require rmanara/brutalforce
Brute-Force method is used from many hackers but the <b>brutalforce</b> will help you void this problem by check the client IP and will count how many request in less than a 2 seconds how many request was done. Automaticly a file will be create and saved that ip and will save for futures request.
It is very simple setup and can be used in any frameworks.
<?php
$firewall = new BrutalForce\Firewall\Firewall(__DIR__, "sitekey", "secret");
<?php
 $firewall->initializer(BrutalForce\Firewall\Firewall::TYPE_FILE);
<?php
if ($firewall->isLocked()) {
    // here you check the recaptcha is already able to display
    if ($firewall->verify()->recaptcha['valid'] == false) {
        echo "<form method='post' action=''>";
        // diplay message 
        echo $firewall->verify()->recaptcha['form_message'];
        // show input
        echo $firewall->verify()->recaptcha['form'];
        
        echo "<button>send</button></form>";
    } else {
        echo $firewall->verify()->recaptcha['form_message']; PHP_EOL;
    }
} else {
    echo "free to go" . PHP_EOL;
}
by doing this the cound down will start from zero and the recaptcha will be called again from the last 3 counts
$firewall->resetLock(true);
Bugs:
enhancement:
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Doc. | Documentation | |||
| / | src | / | BrutalForce | 
| File | Role | Description | ||
|---|---|---|---|---|
| / | src | / | BrutalForce | / | Component | 
| File | Role | Description | 
|---|---|---|
|    | 
Class | Class source | 
|    | 
Class | Class source | 
| / | src | / | BrutalForce | / | Firewall | 
| File | Role | Description | 
|---|---|---|
|    | 
Class | Class source | 
|    | 
Class | Class source | 
|    | 
Class | Class source | 
| / | src | / | BrutalForce | / | Handler | 
| File | Role | Description | 
|---|---|---|
|    | 
Class | Class source | 
|    | 
Class | Class source | 
|    | 
Class | Class source | 
|    | 
Class | Class source | 
| / | tests | / | BrutalForce | 
| File | Role | Description | 
|---|---|---|
|    | 
Class | Class source | 
|    | 
Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
  | 
  | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.