Password Checker v2 checks whether a password appears in the Have I Been Pwned password database.
It uses the k-anonymity range API:
- Your full password is never sent over the internet.
- The script only sends the first 5 characters of the SHA-1 hash.
- The match happens locally on your computer.
Version 2.1 is designed for normal terminal users, not just programmers:
- Hidden password entry when you run it without arguments
- Clearer messages
- Better error handling
- Batch checking from a text file
- No external Python packages required
- Native desktop GUI for users who do not want a terminal
If you do not have the project on your computer yet, download it like this:
cd "$HOME/Applications"
git clone https://github.com/ViliTajnic/passwordchecker.git passwdchk
cd passwdchkThis creates the local folder $HOME/Applications/passwdchk and connects it to the GitHub repository.
If you prefer to see the username explicitly, $HOME/Applications/passwdchk is the same idea as /Users/<your-username>/Applications/passwdchk on macOS.
If you already have the folder and just want the newest version:
cd "$HOME/Applications/passwdchk"
git pull origin masterIf you want to check whether you have local changes first:
git statusIf git status shows modified files, commit or stash them before running git pull to avoid merge conflicts.
- Python 3
- Internet connection
This version uses only the Python standard library, so you do not need to install requests.
Run the script:
python3 checkmypass.pyYou will be prompted to enter a password privately. It will not be shown on screen while you type.
Show help:
python3 checkmypass.py --helpCheck one password interactively:
python3 checkmypass.pyCheck one or more passwords directly from the command line:
python3 checkmypass.py password1 password2This works, but it is less safe because command history may store the password.
Check passwords from a file:
python3 checkmypass.py --file passwords.txtThe file should contain one password per line.
Password Checker v2.0
Checking 1 password(s)...
Password 1: found in known breach data 52,256,179 times. Do not use this password.
Check completed successfully.
If a password is not found, the script will say so, but that does not guarantee the password is strong. A long, unique password is still the right choice.
The project also includes a native desktop interface built with Tkinter.
Run it from source:
python3 passwordchecker_gui.pyDesktop features:
- Hidden password field
- One-click single password check
- File picker for batch checking
- Plain-language results
- No password echo in the interface
This repo builds both the command-line tool and the desktop app for macOS and Windows.
Local macOS build:
./scripts/build_macos.shThe executable will be created at dist/passwordchecker.
The desktop app will be created at dist/Password Checker.app.
Local Windows build:
.\scripts\build_windows.ps1The executable will be created at dist\passwordchecker.exe.
The desktop app will be created at dist\passwordchecker-gui.exe.
Windows binaries should be built on Windows, and macOS binaries should be built on macOS. For that reason, the repo also includes a GitHub Actions workflow that builds both platforms automatically on native runners.
GitHub Actions output:
passwordchecker-cli-macospasswordchecker-gui-macospasswordchecker-cli-windowspasswordchecker-gui-windows
- If the API cannot be reached, the script prints a plain-language error message.
- Empty lines in a password file are ignored.
- Direct command-line passwords are supported for convenience, but interactive mode is the safest option.