PHP code example of chipslays / cracker
1. Go to this page and download the library: Download chipslays/cracker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chipslays / cracker example snippets
use Cracker\Crack;
передать файл или ссылку.
* Например:
* https://steamcommunity.com/public/captcha.php?gid=387475048XXXXXXXXXXXXXXXX
* images/captcha.png
*/
$cracked = (new Crack('https://raw.githubusercontent.com/chipslays/cracker/master/.github/captcha.png'))
->temp(__DIR__ . '/storage') // папка для временных файлов
->tessdata(__DIR__) // указываем путь где храняться модели
->model('steam') // используем свою модель
->iterations(1) // количество итераций
->resolve(true); // true - вернуть массив
print_r($cracked);
/** output */
Array
(
[sortedChars] => Array
(
[0] => Array
(
[M] => 1
)
[1] => Array
(
[J] => 1
)
[2] => Array
(
[X] => 1
)
[3] => Array
(
[N] => 1
)
[4] => Array
(
[P] => 1
)
[5] => Array
(
[9] => 1
)
)
[mostUsedChars] => Array
(
[0] => M
[1] => J
[2] => X
[3] => N
[4] => P
[5] => 9
)
[captcha] => MJXNP9
[time] => 0.9768
)
$cracked = (new Crack($fileOrUrl))
->temp(__DIR__ . '/storage')
->model('eng')
->iterations(10)
->resolve(true);