Skip to main content

Check for leaked passwords in HaveIBeenPwned.

Project description

pwndck

Check the the HaveIBeenPwned password database to see if a particular password has been compromised.

It uses the haveibeenpwned API for the check:

  • Use does not require an API key. Anyone can run it.
  • It is more secure than the web page tool. your password is not exposed beyond your local machine.
  • This is a lightweight install. There are no large downloads.

It returns the number of times the password occurs in the database.

Install

Install from PyPI

For Debian forky or newer, use

sudo apt install pwndck

For other Debian derivatives, download the deb file and install with:

sudo dpkg -i pwndck_*_all.deb
sudo apt -f install

Usage

$ pwndck -h
usage: pwndck [-q] [ [<password>...] | -i <INPUT> | -e | --version | -h ]

Report # of password hits in HaveIBeenPwned

positional arguments:
  passwords            The password(s) to check

options:
  -q, --quiet          Suppress output
  -i, --input INPUT    File containing passwords, one per line
                       ('-' for stdin)
  -e, --estimatedb     Estimate the current size of the HaveIBeenPwned
                       password database
  --version            show program's version number and exit
  -h, --help           show this help message and exit

Evaluate one or more passwords against the HaveIBeenPwned
password database, and return the number of accounts for which
they have been reported as compromised.
 
The number of entries found in the database is returned. if
multiple passwords are being checked, the password name is also
returned.
 
If the password is not specified on the command line, the user
will be prompted.
 
The command returns with an error code if the password is found
in the database.
 
See https://haveibeenpwned.com/API/v3#PwnedPasswords

Module

$ python3
Python 3.13.11 (main, Dec  8 2025, 11:43:54) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pwndck
>>> help(pwndck.processpw)
Help on function process_pw in module pwndck.processpw:

process_pw(pw: str) -> int
    Returns the number of entries for a password in the Have I Been Pwned
    database.

    Parameters:
        pw (str): The password to check.

    Returns:
        int: The number of entries in the database.

    Raises:
        PwndException: For web query errors.

>>> pwndck.process_pw("password")
52256179
>>>

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

pwndck-0.6.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pwndck-0.6.2-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file pwndck-0.6.2.tar.gz.

File metadata

  • Download URL: pwndck-0.6.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for pwndck-0.6.2.tar.gz
Algorithm Hash digest
SHA256 3647021cc219d44688b56894e1004f8c5af9f75e14490637aeefeea028c6bc72
MD5 408f3711edb9cbdddd849c233ffc3afd
BLAKE2b-256 97dc93cd05f11229ec6ce1a3d4e7744d66c3a856644129301b72eb4ff908014b

See more details on using hashes here.

File details

Details for the file pwndck-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: pwndck-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for pwndck-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd63305897b822776897732f2a3c8b4939bc0b6f9fd214c70e8630d9aa3b6220
MD5 58b58cdb2c57d6e7130284df8fbabb73
BLAKE2b-256 14c5d77aa039ff521bca828f3a21b5f84f55195e4a6d7c4e47b6567468837003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page