Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Password Strength Analyzer

A cybersecurity-based Password Strength Analyzer developed using Python. This project analyzes password strength using multiple security parameters such as password length, uppercase letters, lowercase letters, numbers, and special characters. It also implements SHA-256 hashing, password reuse prevention, common password detection, crack-time estimation, and strong password generation.

I made this project/tool available in two versions:

  1. MySQL Database Version
  2. File-Based Version (stores password hashes in a text file)

This project was built to understand real-world authentication systems, password security policies, secure password storage, and cybersecurity best practices.


Project Objectives

The main objective of this project is to:

  • Detect weak passwords
  • Encourage strong password creation
  • Prevent password reuse
  • Improve authentication security
  • Demonstrate secure coding practices
  • Understand cybersecurity concepts practically

Key Features

Password Strength Analysis

Checks password based on:

  • Length
  • Uppercase letters
  • Lowercase letters
  • Numbers
  • Special characters

SHA-256 Hashing

Passwords are converted into SHA-256 hashes before storage for better security.

Password Reuse Prevention

The system prevents users from reusing previously used passwords.

Common Password Detection

Detects weak/common passwords such as:

  • 123456
  • password
  • admin
  • qwerty
  • admin@123
  • 111111
  • 1234567890

using common_passwords.txt.

Crack-Time Estimation

Provides estimated password cracking time:

  • Few seconds
  • Few days
  • Hundreds of years

Strong Password Suggestion

If the password is weak or medium, the system generates a strong random password suggestion.


Technologies Used

Technology Purpose
Python Main Programming Language
MySQL Database Storage
Regex Password Validation
SHA-256 Password Hashing
mysql-connector-python MySQL Connectivity

Project Structure

PasswordStrengthAnalyzer/
│
├── Outcomes/
├── PSA_with_db.py
├── PSA_without_db.py
├── common_passwords.txt
├── password_hashes.txt
└── README.md

Working Process

Step 1 — User Inputs Password

The user enters a password.

Step 2 — Password Analysis

The program checks:

  • Password length
  • Uppercase letters
  • Lowercase letters
  • Numbers
  • Special characters

Step 3 — Password Score Generation

Rule Score

  • Length ≥ 8 +1
  • Uppercase Letter +1
  • Lowercase Letter +1
  • Number +1
  • Special Character +1

Step 4 — Common Password Detection

Checks whether the password exists in: common_passwords.txt

Step 5 — Password Hashing

The password is hashed using SHA-256 algorithm.

Step 6 — Password Storage

  1. MySQL Version Stores password hashes inside MySQL database.

  2. File-Based Version Stores password hashes inside: password_hashes.txt

Step 7 — Password Reuse Check

The system checks whether the password hash already exists.

Step 8 — Final Result

Displays:

  • Weak Password
  • Medium Password
  • Strong Password

along with estimated crack time.


Cybersecurity Concepts Implemented

Concept Description
Authentication Security Password-based authentication
SHA-256 Hashing Secure password hashing
Password Policies Strong password enforcement
Secure Storage Store hashes instead of passwords
Regex Validation Input validation
Password Reuse Prevention Prevent old password reuse
Secure Coding Defensive coding practices

Why SHA-256?

SHA-256 is used because:

  • Passwords are not stored in plain text
  • Improves security
  • Prevents direct password exposure
  • Commonly used hashing algorithm

Security Note

I never upload:

  • Real passwords
  • API keys
  • Personal credentials
  • Sensitive information

Author

Manjeet Kumar
Cyber Security Student

About

Cybersecurity-based Password Strength Analyzer using Python with SHA-256 hashing, password reuse prevention, common password detection, and strong password analysis.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages