Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Strength

Machine learning classifier that grades passwords as weak, medium or strong. A random forest is trained on a deterministic synthetic dataset of 5000 passwords whose labels come from an explicit feature rule (length, character class counts and ratios, Shannon entropy, repeated-character runs and common pattern penalties).

Features

  • 15 engineered features per password, all computed offline
  • Seeded, reproducible training set; no external data or network
  • Predictions come with a bounded 0-100 score derived from classifier confidence
  • score CLI prints strength and score in one call

Quickstart

pip install -r requirements.txt
python -m password_strength score "password123"
python -m password_strength score "Xk9#mQ2!pVz@4Rt7w"
python -m pytest -q

Example output:

strength: weak
score: 15/100

Project structure

password-strength/
  password_strength/
    features.py   feature extraction (length, classes, entropy, runs, penalties)
    dataset.py    deterministic synthetic generator + labelling rule
    model.py      random forest training and scoring
    __main__.py   argparse CLI
  tests/test_smoke.py   offline smoke tests

License

MIT

About

Machine learning classifier grading passwords as weak, medium or strong.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages