| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | 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:
|  Files (18) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (1 directory) | ||||
|  tests (1 file, 1 directory) | ||||
|    .travis.yml | Data | Auxiliary data | ||
|    composer.json | Data | Auxiliary data | ||
|    composer.lock | Data | Auxiliary data | ||
|    phpunit.xml | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|  Files (18) | / | src | / | BrutalForce | 
| File | Role | Description | ||
|---|---|---|---|---|
|  Component (2 files) | ||||
|  FileManager (1 file) | ||||
|  Firewall (3 files) | ||||
|  Handler (4 files) | ||||
|  Files (18) | / | src | / | BrutalForce | / | Component | 
| File | Role | Description | 
|---|---|---|
|  CheckTime.php | Class | Class source | 
|  RequestWrapper.php | Class | Class source | 
|  Files (18) | / | src | / | BrutalForce | / | Firewall | 
| File | Role | Description | 
|---|---|---|
|  Firewall.php | Class | Class source | 
|  Holder.php | Class | Class source | 
|  interfaceFirewall.php | Class | Class source | 
|  Files (18) | / | src | / | BrutalForce | / | Handler | 
| File | Role | Description | 
|---|---|---|
|  ByAbstract.php | Class | Class source | 
|  byFile.php | Class | Class source | 
|  ByInterface.php | Class | Class source | 
|  HandlerInterface.php | Class | Class source | 
|  Files (18) | / | tests | / | BrutalForce | 
| File | Role | Description | 
|---|---|---|
|  ByFileTest.php | Class | Class source | 
|  FirewallTest.php | 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. | 
|  Install with Composer | 
| 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.
 If you know an application of this package, send a message to the author to add a link here.