2017 © Pedro Peláez
 

library haveibeenpwned

A PHP Package built for the haveibeenpwned.com API.

image

ridvanbaluyos/haveibeenpwned

A PHP Package built for the haveibeenpwned.com API.

  • Tuesday, September 26, 2017
  • by ridvanbaluyos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 29 % Grown

The README.md

haveibeenpwned

A PHP Library built for ';--have i been pwned?, (*1)

Actively Maintained Latest Stable Version Total Downloads Scrutinizer Code Quality Build Status Codacy Badge License, (*2)

Table of contents

Requirements

  1. This uses only API v2.
  2. PHP 7 or higher.

Installation

Open your composer.json file and add the following to the require key:, (*3)

"ridvanbaluyos/haveibeenpwned": "v0.1"

After adding the key, run composer update from the command line to install the package, (*4)

composer install

or, (*5)

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
<?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!, (*6)

<?php
use Ridvanbaluyos\Pwned\PwnedPasswords as PwnedPasswords;

$pwnedPasswords = new PwnedPasswords();
$result = $pwnedPasswords->setPassword('password123')->get();

References

The Versions

26/09 2017

dev-master

9999999-dev

A PHP Package built for the haveibeenpwned.com API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ridvan Baluyos

php haveibeenpwned infosec

04/09 2017

v0.1

0.1.0.0

A PHP Package built for the haveibeenpwned.com API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ridvan Baluyos

php haveibeenpwned infosec