cylab/dokos-php

Simple PHP password spaying library and CLI

1.0.0 2024-03-17 19:23 UTC

This package is auto-updated.

Last update: 2024-04-26 08:29:48 UTC


README

pipeline status coverage report

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!"