Skip to main content

PassCheck

A cross-platform CLI tool for password security: breach checking via the HIBP API, secure password generation, and ML-powered strength scoring with specific suggestions.

Flow Diagram

flowchart TD
    CLI["CLI (passcheck.py)"]
    CH["checker.py<br/>HIBP breach check"]
    SC["scorer.py<br/>ML + fallback"]
    GEN["generator.py"]
    ML["ML pipeline<br/>(training/*)"]

    CLI --> CH
    CLI --> SC
    CLI --> GEN
    SC --> ML

Quick Install

pip install passcheck-cli

Then run passcheck anywhere.

For development, clone the repo and install in editable mode:

git clone https://github.com/NameRectified/passcheck.git
cd passcheck
pip install -e .

Usage

Interactive mode

passcheck

Shows a menu where you can pick Check or Generate without remembering flags.

Check a password

passcheck check
Password: ********

Breach Status: Found in 2,266,543 data breaches
Strength:       25/100 (weak)

Suggestions:
   This password appears in 2,266,543 data breach(es)  never reuse it
   Add at least one uppercase letter
   Add at least one special character
   Avoid sequential characters like '123' or 'abc'
   Use a mix of upper/lowercase, digits, and special characters

Suggested replacement: :_Y8$4Ur/v-&6FuN (copied to clipboard)

You can also pass the password directly:

passcheck check yourpassword

Omitting the argument prompts hidden-ly with getpass.

Generate a password

passcheck generate -l 16

Generated:      G_j2*8TUP8?7
Strength:       65/100 (strong)
Copied to clipboard.
  • -l, --length: Password length (default: 16)

Features

  • Breach checking: Uses the Have I Been Pwned API with k-anonymity — never sends the full hash over the network.
  • Password generation: Uses secrets module. Excludes ambiguous characters (0, O, 1, l, I, |). Guarantees at least one uppercase, one lowercase, three digits, and one special character.
  • ML strength scoring: RandomForest model trained on 3500 passwords. Scores 0–100 with specific suggestions for improvement.
  • Specific suggestions: Suggestions derived from the actual password — not generic templates.

Requirements

  • Python 3.10+
  • requests, pyperclip, scikit-learn, joblib

Project Structure

passcheck/
├── src/passcheck/
│   ├── __init__.py    Package metadata
│   ├── cli.py         CLI entry point
│   ├── checker.py     Breach checking (HIBP API)
│   ├── generator.py   Password generation
│   ├── scorer.py      ML strength analysis + suggestions
│   ├── features.py    ML feature extraction
│   ├── config.py      Configuration constants
│   └── models/        Trained model (.pkl, shipped in the wheel)
├── training/          ML pipeline (features, dataset, training)
├── tests/             pytest test suite (32 tests)
├── requirements.txt
└── pyproject.toml

Running Tests

pytest tests/

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

passcheck_cli-1.0.0.tar.gz (135.7 kB view details)

Uploaded Source

Built Distribution

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

passcheck_cli-1.0.0-py3-none-any.whl (138.3 kB view details)

Uploaded Python 3

File details

Details for the file passcheck_cli-1.0.0.tar.gz.

File metadata

  • Download URL: passcheck_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 135.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for passcheck_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 36ec758250a557b3457a03af96ea1189c7a317c88db3da16eb4a6103be9719ed
MD5 9bd3ec24ea8ba5bf3654f69a66bd9cbe
BLAKE2b-256 7bcfeea14e445e2d2508b76bc900c92688e6e85dd344546bec2649852f555fc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for passcheck_cli-1.0.0.tar.gz:

Publisher: publish.yml on NameRectified/passcheck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file passcheck_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: passcheck_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 138.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for passcheck_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b963305544ee404dfd620be095fafa47e844a451eec83370210ea6fdb6aba7ed
MD5 27d55694b96c3c6009ef9910bdedfba6
BLAKE2b-256 42ac299cfe9c425f7c5fcfc76d99f9c3cf64e649e8165715717cb6404474f85c

See more details on using hashes here.

Provenance

The following attestation bundles were made for passcheck_cli-1.0.0-py3-none-any.whl:

Publisher: publish.yml on NameRectified/passcheck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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