cylab / dokos-php
Simple PHP password spaying library and CLI
1.0.0
2024-03-17 19:23 UTC
Requires
- guzzlehttp/guzzle: ^7.8
- monolog/monolog: ^2.9
- psr/log: ^1.1
- vanilla/garden-cli: ^3.1
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
- squizlabs/php_codesniffer: ^3.9
This package is auto-updated.
Last update: 2024-12-26 09:47:41 UTC
README
A simple password spraying library in PHP.
Usage
Library
Installation:
composer require cylab/dokos-php
Usage:
use Cylab\Dokos\Config;
use Cylab\Dokos\Dokos;
$config = new Config("https://brutus.play.cylab.be");
$config->setLogin("jane.doe@example.com");
$dokos = new Dokos($config);
$result = $dokos->run();
var_dump($result->found);
By default the library does not print anything. You can also provide a Psr\Log\LoggerInterface
instance as second argument, to get some feedback:
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
$logger = new Logger("dokos");
$logger->pushHandler(new StreamHandler("php://stdout"));
$dokos = new Dokos($config, $logger);
CLI
git clone https://gitlab.cylab.be/cylab/dokos-php.git
cd dokos-php
composer install
php dokos.php --url https://brutus.play.cylab.be --passwords src/1000-password-list.txt --threads 10 --login_field email --login jane.doe@example.com --password_field password --failed "Bad combination of e-mail and password!"