Check passwords against HaveIBeenPwnd
Project description
# python bindings for HaveIBeenPwnd.com V2 [![Build Status](https://img.shields.io/travis/figo-connect/python-figo.svg?style=flat-square)](https://travis-ci.org/figo-connect/python-figo) [![PyPi Version](http://img.shields.io/pypi/v/haveibeenpwnd.svg?style=flat-square)](https://pypi.python.org/pypi/haveibeenpwnd)![Python versions](https://img.shields.io/pypi/pyversions/haveibeenpwnd.svg)
Troy Hunt released a new version of the Have I Been pwnd Database. This time with more anonymity in mind.
## Features:
does not sent passwords to HaveIBeenPwnd.com
does not sent complete password hashes to HaveIBeenPwnd.com
zero dependencies except requests (will be removed later)
python2 & python3 support
tests
## Usage:
You can use HaveIBeenPwnd als command line script or use it as module in other python code.
### As command line script
Install HaveIBeenPwnd gobally or in a virtual environment:
$ pip install haveibeenpwnd
This add shortcuts to haveibeenpwnd, so that you call haveibeenpwnd from everywhere. To check a password, simply do this:
$ haveibeenpwnd –password hunter2 The password was found 16092 times in the haveibeenpwned.com database.
Remember, haveibeenpwnd does not send the given password into the internet, it sends the first 5 chars of the SHA1 Hash.
To check if a mail has been part of a breach, do this:
$ haveibeenpwnd -m test@example.com The email <test@example.com> was found in following breaches: The <000webhost> breach (2015-03-01) exposed Email addresses, IP addresses, Names and Passwords The <8tracks> breach (2017-06-27) exposed Email addresses and Passwords …
### As module
Check emails:
>>> from haveibeenpwnd import check_email >>> check_email("test@example.com")) >>> check_email("test@example.com") {'breaches': [{'Title': '000webhost', ...}]}
and check passwords:
>>> from haveibeenpwnd import check_password >>> check_password('hunter2') 16092 >>> check_password('lksdflksdpsökfdsödg') 0
## Installation
You can install haveibeenpwnd with pip:
$ pip install haveibeenpwnd
## Testing:
You can run tests with:
$ tox
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for haveibeenpwnd-0.2.0.macosx-10.9-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85b6aa8f3a790d9c022fef82d33d009c6a1675547e88f25f8de5bbab8cda88e8 |
|
MD5 | 8bf4460edb76f43d6060e666a8de175e |
|
BLAKE2b-256 | 043009d0e808f2dcc71b379c7052902114badd48dc6fd33b76e40494d762009f |
Hashes for haveibeenpwnd-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a92d2420f8857b4d409ff170ea85367862ff210d34faf75e9046f9940d585ce |
|
MD5 | 42de7f1c69a1e65ea857436c977e391a |
|
BLAKE2b-256 | f96d5fa5ad9d3fbfca70a4892cf9ccb6aa38ebe6564f91571afef361def4bd70 |