Skip to content

Password-Strength-ML is real-time PyQt6 app predicting password strength (0-100) using a RandomForest model. Extracts features like length, entropy, character classes, diversity, and common patterns. Shows live score, detailed feature breakdown, and allows model save/load. Safe for testing dummy passwords only.

License

Notifications You must be signed in to change notification settings

Luka12-dev/Password-Strength-ML.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PasswordStrengthML - Real-time Predictor

PasswordStrengthML is a Python desktop application built with PyQt6 and scikit-learn that predicts the strength of passwords in real-time. The app analyzes passwords based on length, character diversity, entropy, and common patterns, providing a score from 0 to 100.


Screenshots PasswordStrentghML ScreenShot

Features

  • Real-time password strength prediction
  • Displays detailed extracted features
  • Highlights common weak passwords
  • Option to show/hide typed password
  • Save and load trained models
  • Modern gradient-based UI using QSS
  • Threaded predictions to avoid UI blocking

Installation

  1. Clone the repository:
git clone https://github.com/Luka12-dev/PasswordStrengthML.git
cd PasswordStrengthML
Install dependencies:

bash

pip install PyQt6 scikit-learn pandas numpy joblib
Place an icon file named AI5.ico in the project directory (optional).

Usage
Run the application:

bash

python PasswordStrengthML.py
Type a password in the input field.

The app updates a strength score (0-100) in real-time.

View detailed feature breakdown including length, entropy, character counts, and pattern checks.

Optionally, check "Show password" to reveal the typed text.

Save or load trained models using the buttons provided.

Note: Do not test real passwords to ensure privacy and security.

How It Works
Feature Extraction:

Password length

Shannon entropy

Character classes: lowercase, uppercase, digits, special characters

Common pattern detection (e.g., 1234, abcd, common passwords)

Character diversity

Model:

Uses a RandomForestRegressor trained on synthetic password data

Score ranges from 0 (weak) to 100 (strong)

Threaded predictions ensure smooth UI updates

UI:

Built with PyQt6

Gradient background, modern styling via QSS

Progress bar and label show strength score

Text box shows extracted features

Development Notes
Model Training: Synthetic data is generated with common passwords and scored using entropy, diversity, and pattern checks.

Threading: Predictions run in a separate QThread to prevent GUI freezing.

Debounce: Input is debounced to reduce redundant predictions on fast typing.

Contributing
Contributions are welcome! You can:

Improve password scoring algorithms

Add more advanced password pattern detection

Enhance UI styling and interactivity

Add support for exporting results or batch analysis

License
MIT License


Disclaimer
This application is for educational and testing purposes only. Avoid entering real passwords. The generated scores are estimations and do not guarantee password security.

About

Password-Strength-ML is real-time PyQt6 app predicting password strength (0-100) using a RandomForest model. Extracts features like length, entropy, character classes, diversity, and common patterns. Shows live score, detailed feature breakdown, and allows model save/load. Safe for testing dummy passwords only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages