ridvanbaluyos/haveibeenpwned
Composer 安装命令:
composer require ridvanbaluyos/haveibeenpwned
包简介
A PHP Package built for the haveibeenpwned.com API.
README 文档
README
A PHP Library built for ';--have i been pwned?
Table of contents
Requirements
- This uses only API v2.
- PHP 7 or higher.
Installation
Open your composer.json file and add the following to the require key:
"ridvanbaluyos/haveibeenpwned": "v0.1"
After adding the key, run composer update from the command line to install the package
composer install
or
composer update
Usage
<?php error_reporting(E_ALL); // namespace and autoloaders use \Ridvanbaluyos\Pwned\BreachedAccount as BreachedAccount; require_once __DIR__ . '/vendor/autoload.php'; $breachedAccount = new BreachedAccount(); $result = $breachedAccount->setAccount('test@example.com')->get();
Breached Account
<?php use \Ridvanbaluyos\Pwned\BreachedAccount as BreachedAccount; $breachedAccount = new BreachedAccount(); $result = $breachedAccount->setAccount('test@example.com') ->setIncludeUnverified() ->setDomain('tumblr.com') ->get();
Breached Sites
<?php use \Ridvanbaluyos\Pwned\Breaches as Breaches; $breachedSites = new Breaches(); $result = $breachedSites->setDomain('adobe.com')->get();
Data Classes
<?php use \Ridvanbaluyos\Pwned\DataClasses as DataClasses; $dataClasses = new DataClasses(); $result = $dataClasses->get();
Pastes Account
<?php use \Ridvanbaluyos\Pwned\PasteAccount as PasteAccount; $pasteAccount = new PasteAccount(); $result = $pasteAccount->setAccount('test@example.com')->get();
Pwned Passwords
Note: Please be careful when using this. Do not send any password you actively use to a third-party service - even this one!
<?php use Ridvanbaluyos\Pwned\PwnedPasswords as PwnedPasswords; $pwnedPasswords = new PwnedPasswords(); $result = $pwnedPasswords->setPassword('password123')->get();
References
统计信息
- 总下载量: 564
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-01