GithubHelp home page GithubHelp logo

pypwned's Introduction

PyPwned

Build Status

A Python client for the HaveIBeenPwned REST API. https://haveibeenpwned.com/

Installation

pip install pypwned

Requires

  • requests
  • pyOpenSSL
  • ndg-httpsclient
  • pyasn1

Usage

Note: The below examples assume you have loaded the envrionment variable HIBP_API_KEY with your appropriate Have I Been Pwned API key. More details here, https://haveibeenpwned.com/API/Key.

Breaches

Getting all breaches for an account

Get all breaches for an account across all domains.
import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getAllBreachesForAccount(email="[email protected]")
Get all breaches for an account across a specific domain.
import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getAllBreachesForAccount(email="[email protected]",domain="adobe.com")

Getting all breached sites in the system

Return the details of each breach in the system.
import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getAllBreaches()
Return the details of each breach associated with a specific domain.
import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getAllBreaches(domain="adobe.com")

Getting a single breached site

Return the details of a single breach, by breach name.

import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getSingleBreachedSite(name="adobe")

Getting all data classes in the system

Return the different types of data classes that are associated with a record in a breach. E.G, Email addresses and passwords

import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getAllDataClasses()

Pastes

Getting all pastes for an account

Return any pastes that contain the given email address

import pypwned, os
your_hibp_key = os.environ.get("HIBP_API_KEY")
pwny = pypwned.pwned(your_hibp_key)
pwny.getAllPastesForAccount(account="[email protected]")

pypwned's People

Contributors

icanhasfay avatar revolutiontech avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.