{"id":15308184,"url":"https://github.com/yidas/brute-force-attacker-php","last_synced_at":"2025-04-15T01:01:28.941Z","repository":{"id":57086864,"uuid":"199837391","full_name":"yidas/brute-force-attacker-php","owner":"yidas","description":"Brute-force attack tool for generating all possible string and executing function","archived":false,"fork":false,"pushed_at":"2022-12-28T09:29:47.000Z","size":22,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T12:51:15.640Z","etag":null,"topics":["brute-force","brute-force-attacks","cryptanalysis","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yidas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-31T10:50:45.000Z","updated_at":"2023-01-31T17:27:47.000Z","dependencies_parsed_at":"2023-01-31T06:15:41.441Z","dependency_job_id":null,"html_url":"https://github.com/yidas/brute-force-attacker-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fbrute-force-attacker-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fbrute-force-attacker-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fbrute-force-attacker-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fbrute-force-attacker-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yidas","download_url":"https://codeload.github.com/yidas/brute-force-attacker-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986309,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brute-force","brute-force-attacks","cryptanalysis","php"],"created_at":"2024-10-01T08:14:25.150Z","updated_at":"2025-04-15T01:01:28.922Z","avatar_url":"https://github.com/yidas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003eBrute Force Attacker \u003ci\u003efor\u003c/i\u003e PHP\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\nBrute-force attack tool for generating all possible string and executing function\n\n[![Latest Stable Version](https://poser.pugx.org/yidas/google-maps-services/v/stable?format=flat-square)](https://packagist.org/packages/yidas/brute-force-attacker)\n[![License](https://poser.pugx.org/yidas/google-maps-services/license?format=flat-square)](https://packagist.org/packages/yidas/brute-force-attacker)\n\nOUTLINE\n-------\n\n- [Demonstration](#demonstration)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Options](#options)\n\n---\n\nDEMONSTRATION\n-------------\n\n```php\n\\yidas\\BruteForceAttacker::run([\n    'length' =\u003e 2,\n    'callback' =\u003e function ($string) {\n        echo \"{$string} \";\n    },\n]);\n\n/* Result\nAA AB AC ... AX AY AZ Aa Ab Ac ... Ax Ay Az A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 BA ...\n*/\n```\n\nGenerates `0`-`9` string and matches target string:\n\n```php\n\\yidas\\BruteForceAttacker::run([\n    'length' =\u003e 6,\n    'charMap' =\u003e range('0', '9'),\n    'callback' =\u003e function ($string, $count) {\n        if ($string==\"264508\") {\n            echo \"Matched `{$string}` with {$count} times\\n\";\n            return true;\n        }\n    },\n]);\n```\n\n---\n\nREQUIREMENTS\n------------\nThis library requires the following:\n\n- PHP 5.4.0+\\|7.0+\\|8.0+\n\n---\n\nINSTALLATION\n------------\n\nRun Composer in your project:\n\n    composer require yidas/brute-force-attacker\n    \nThen you could call it after Composer is loaded depended on your PHP framework:\n\n```php\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse yidas\\BruteForceAttacker;\n```\n\n---\n\nUSAGE\n-----\n\nCall the `run()` static method and bring in the options to start:\n\n```php\n\\yidas\\BruteForceAttacker::run(array $options)\n```\n\n### Options\n\nSetting all options including skip mechanism:\n\n```php\n$hash = '5b7476628919d2d57965e25ba8b2588e94723b76';\n\n\\yidas\\BruteForceAttacker::run([\n    'length' =\u003e 8,\n    'charMap' =\u003e array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9'), [\"+\", \"/\"]),\n    'callback' =\u003e function ($key, \u0026 $count) use ($hash) {\n        if (sha1($key) == $hash) {\n            echo \"Matched `{$key}` | Hash: {$hash}\\n\";\n            exit;\n        }\n        // Display key every some times\n        if ($count == 0 || $count \u003e 10000000) {\n            echo \"{$key} | \" . date(\"H:i:s\") . \"\\n\";\n            $count = 0;\n        }\n    },\n    'startFrom' =\u003e 'AABAAAAA', // Start from `AABAAAAA` -\u003e `AABAAAAB` ...\n    'skipLength' =\u003e 8,  // Select 8st character for skipCount\n    'skipCount' =\u003e 1,   // Start from `B` (Skip 1 arrangement form charMap)\n]);\n```\n\n#### length\n\nString length for generating\n\n#### charMap\n\nCharacter map used to generate strings\n\n#### callback\n\nCustomized function for performing brute-force attack\n\n```php\nfunction (string $key, integer \u0026 $count)\n```\n\n#### startFrom\n\nStart running from the givien charset string\n\n#### skipLength\n\nString length for skipping based on `skipCount` setting\n\n#### skipCount\n\nSkip count of the `charMap` based on `skipLength`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyidas%2Fbrute-force-attacker-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyidas%2Fbrute-force-attacker-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyidas%2Fbrute-force-attacker-php/lists"}