PHPackages                             yidas/brute-force-attacker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. yidas/brute-force-attacker

ActiveLibrary[Security](/categories/security)

yidas/brute-force-attacker
==========================

Brute-force attack tool for generating all possible string and executing function

2.0.0(3y ago)81.6k↓50%5MITPHPPHP &gt;=5.4

Since Aug 1Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/yidas/brute-force-attacker-php)[ Packagist](https://packagist.org/packages/yidas/brute-force-attacker)[ Docs](https://github.com/yidas/brute-force-attacker-php)[ RSS](/packages/yidas-brute-force-attacker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

 [ ![](https://camo.githubusercontent.com/703a3ff7b5b3b598396dbb36bd62a2ed58a06175d7acf428d20a0c56cb8b5b6b/68747470733a2f2f7777772e7068702e6e65742f696d616765732f6c6f676f732f7068702d6c6f676f2d77686974652e737667) ](https://www.php.net/)

Brute Force Attacker *for* PHP
==============================

[](#brute-force-attacker-for-php)

Brute-force attack tool for generating all possible string and executing function

[![Latest Stable Version](https://camo.githubusercontent.com/9ea29afb7bb032daa6fc0bf5a40e65957bb3dfb807d4f3672e17d6a3d0530a63/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f676f6f676c652d6d6170732d73657276696365732f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/brute-force-attacker)[![License](https://camo.githubusercontent.com/42018a5bf0f863d10c0c423a4e4705246ddc26c07e232188a5b6b6c986a30450/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f676f6f676c652d6d6170732d73657276696365732f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/brute-force-attacker)

OUTLINE
-------

[](#outline)

- [Demonstration](#demonstration)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Options](#options)

---

DEMONSTRATION
-------------

[](#demonstration)

```
\yidas\BruteForceAttacker::run([
    'length' => 2,
    'callback' => function ($string) {
        echo "{$string} ";
    },
]);

/* Result
AA AB AC ... AX AY AZ Aa Ab Ac ... Ax Ay Az A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 BA ...
*/
```

Generates `0`-`9` string and matches target string:

```
\yidas\BruteForceAttacker::run([
    'length' => 6,
    'charMap' => range('0', '9'),
    'callback' => function ($string, $count) {
        if ($string=="264508") {
            echo "Matched `{$string}` with {$count} times\n";
            return true;
        }
    },
]);
```

---

REQUIREMENTS
------------

[](#requirements)

This library requires the following:

- PHP 5.4.0+|7.0+|8.0+

---

INSTALLATION
------------

[](#installation)

Run Composer in your project:

```
composer require yidas/brute-force-attacker

```

Then you could call it after Composer is loaded depended on your PHP framework:

```
require __DIR__ . '/vendor/autoload.php';

use yidas\BruteForceAttacker;
```

---

USAGE
-----

[](#usage)

Call the `run()` static method and bring in the options to start:

```
\yidas\BruteForceAttacker::run(array $options)
```

### Options

[](#options)

Setting all options including skip mechanism:

```
$hash = '5b7476628919d2d57965e25ba8b2588e94723b76';

\yidas\BruteForceAttacker::run([
    'length' => 8,
    'charMap' => array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9'), ["+", "/"]),
    'callback' => function ($key, & $count) use ($hash) {
        if (sha1($key) == $hash) {
            echo "Matched `{$key}` | Hash: {$hash}\n";
            exit;
        }
        // Display key every some times
        if ($count == 0 || $count > 10000000) {
            echo "{$key} | " . date("H:i:s") . "\n";
            $count = 0;
        }
    },
    'startFrom' => 'AABAAAAA', // Start from `AABAAAAA` -> `AABAAAAB` ...
    'skipLength' => 8,  // Select 8st character for skipCount
    'skipCount' => 1,   // Start from `B` (Skip 1 arrangement form charMap)
]);
```

#### length

[](#length)

String length for generating

#### charMap

[](#charmap)

Character map used to generate strings

#### callback

[](#callback)

Customized function for performing brute-force attack

```
function (string $key, integer & $count)
```

#### startFrom

[](#startfrom)

Start running from the givien charset string

#### skipLength

[](#skiplength)

String length for skipping based on `skipCount` setting

#### skipCount

[](#skipcount)

Skip count of the `charMap` based on `skipLength`

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance46

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1245 days

Total

2

Last Release

1238d ago

Major Versions

1.0.0 → 2.0.02022-12-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/b30d2b2c0b53aef65fad4af56cd3c7912d3db2b612890c706fe79448717f6aba?d=identicon)[yidas](/maintainers/yidas)

---

Top Contributors

[![yidas](https://avatars.githubusercontent.com/u/12604195?v=4)](https://github.com/yidas "yidas (19 commits)")[![ycoya](https://avatars.githubusercontent.com/u/5576242?v=4)](https://github.com/ycoya "ycoya (10 commits)")

---

Tags

brute-forcebrute-force-attackscryptanalysisphpphptoolbrute force attackcryptanalytic

### Embed Badge

![Health badge](/badges/yidas-brute-force-attacker/health.svg)

```
[![Health](https://phpackages.com/badges/yidas-brute-force-attacker/health.svg)](https://phpackages.com/packages/yidas-brute-force-attacker)
```

###  Alternatives

[stymiee/php-simple-encryption

The PHP Simple Encryption library is designed to simplify the process of encrypting and decrypting data while ensuring best practices are followed. By default is uses a secure encryption algorithm and generates a cryptologically strong initialization vector so developers do not need to becomes experts in encryption to securely store sensitive data.

448.0k](/packages/stymiee-php-simple-encryption)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

127.8k1](/packages/poly-crypto-poly-crypto)[ukrbublik/openssl_x509_crl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

182.1k](/packages/ukrbublik-openssl-x509-crl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
