Skip to main content

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
>>>

Metadata

Release files for pwndck 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pwndck 0.6.2
File Size Uploaded
pwndck-0.6.2.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pwndck 0.6.2
File Interpreter ABI Platform
pwndck-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / pwndck-0.6.2.tar.gz

Download URL pwndck-0.6.2.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3647021cc219d44688b56894e1004f8c5af9f75e14490637aeefeea028c6bc72
BLAKE2b-256 checksum
How to use checksums
97dc93cd05f11229ec6ce1a3d4e7744d66c3a856644129301b72eb4ff908014b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / pwndck-0.6.2-py3-none-any.whl

Download URL pwndck-0.6.2-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd63305897b822776897732f2a3c8b4939bc0b6f9fd214c70e8630d9aa3b6220
BLAKE2b-256 checksum
How to use checksums
14c5d77aa039ff521bca828f3a21b5f84f55195e4a6d7c4e47b6567468837003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6

2 release files

0.5

2 release files

0.2

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page