Client for HIBP passwords api using K-Anonymity method
Project description
pywnedPasswords
This script uses the pwnedpasswords.com v2 api to check your password in a secure way (using the K-anonymity method)
The full Hash is never transmitted over the wire, only the first 5 characters. The comparison happens offline.
Special thanks to Troy Hunt (@troyhunt) for making this project possible.
Installation
pip install pywnedpasswords
Usage
Interactive
pywnedpasswords
Insert your password when asked.
the output will either be:
Password to check:
Found your password 47205 times.
or in case your password is secure
Password to check:
Your password did not appear in PwnedPasswords yet.
Passing the password as a command line argument
Discouraged - as it might leaves the password in your shell history
pywnedpasswords Passw0rd
Found your password 46980 times.
Piping the password
Discouraged - as it might leaves the password in your shell history
echo -n 'Passw0rd!' | pywnedpasswords
Found your password 46980 times.
Reading passwords from a file
pywnedpasswords -f list-of-passwords.txt
Result is in the form: <line number>: <number of time the password was found>. 0 meaning the password is not known from Have I Been Pwned yet.
0: 7026
1: 45337
2: 376
3: 51
4: 27
5: 11
6: 136
7: 1
8: 6
9: 1
10: 0
11: 0
12: 0
Exit code
The pywnedpasswords exits with code 2 if the password is know of Have I Been Pwned already, and exit code 0 otherwise.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pywnedpasswords-0.67.tar.gz.
File metadata
- Download URL: pywnedpasswords-0.67.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ce714edd64285f58f3e0cba92cd1fbeb29baa8856d49ba7bd6a6de68838aa59
|
|
| MD5 |
6a85e3ea00ba8c5f54b779ab25570241
|
|
| BLAKE2b-256 |
3861cc47915afc5cac99521bbf3cda6f77f240d413ea86b910824cc80d25f374
|
Provenance
The following attestation bundles were made for pywnedpasswords-0.67.tar.gz:
Publisher:
main.yml on xmatthias/pywnedpasswords
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pywnedpasswords-0.67.tar.gz -
Subject digest:
3ce714edd64285f58f3e0cba92cd1fbeb29baa8856d49ba7bd6a6de68838aa59 - Sigstore transparency entry: 1097361312
- Sigstore integration time:
-
Permalink:
xmatthias/pywnedpasswords@1cec5dc1b6808555260fa04565655f72c5cb3119 -
Branch / Tag:
refs/tags/0.67 - Owner: https://github.com/xmatthias
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@1cec5dc1b6808555260fa04565655f72c5cb3119 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pywnedpasswords-0.67-py3-none-any.whl.
File metadata
- Download URL: pywnedpasswords-0.67-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8481bc3e57a3c1249ff9b40c3e2c34f6d8d89809b6f9a6ebea4f8647f9d61d17
|
|
| MD5 |
bbdd0817ff009dea3cb812be9d0b5004
|
|
| BLAKE2b-256 |
bb6654f14f4a39c60e46a85e19ffe767cfe1dcf6dea230fb472c4519f6ac22d9
|
Provenance
The following attestation bundles were made for pywnedpasswords-0.67-py3-none-any.whl:
Publisher:
main.yml on xmatthias/pywnedpasswords
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pywnedpasswords-0.67-py3-none-any.whl -
Subject digest:
8481bc3e57a3c1249ff9b40c3e2c34f6d8d89809b6f9a6ebea4f8647f9d61d17 - Sigstore transparency entry: 1097361326
- Sigstore integration time:
-
Permalink:
xmatthias/pywnedpasswords@1cec5dc1b6808555260fa04565655f72c5cb3119 -
Branch / Tag:
refs/tags/0.67 - Owner: https://github.com/xmatthias
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@1cec5dc1b6808555260fa04565655f72c5cb3119 -
Trigger Event:
release
-
Statement type: