Skip to content

davanann/password-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Password Generator & Strength Checker

A simple Python script that generates secure passwords and evaluates their strength.

Features

  • Customizable Password Generation: Specify minimum length and character types
  • Strength Analysis: Automatically checks password security level
  • Color-coded Ratings: Visual feedback with green/yellow/red indicators
  • Simple Interface: User-friendly command-line prompts

How It Works

Password Generation

  • Combines letters (uppercase and lowercase)
  • Optionally includes numbers and special characters
  • Ensures all selected character types are included
  • Continues generating until minimum length is met

Strength Scoring System

Passwords are rated out of 5 points:

Criteria Points
Length ≥ 12 characters 2 points
Length ≥ 8 characters 1 point
Contains both upper & lowercase 1 point
Contains numbers 1 point
Contains special characters 1 point

Strength Ratings

  • STRONG (5/5): Excellent security
  • MEDIUM (3-4/5): Good, but could be improved
  • WEAK (0-2/5): Needs enhancement

Usage

  1. Run the script:

    python password_gen.py
  2. Follow the prompts:

    Enter the minimum length: 12
    Do you want to have numbers (y/n)? y
    Do you want to have special characters (y/n)? y
    
  3. View the results:

    Generated password: A9b$kL8@qR2!
    ==================================================
    
    PASSWORD STRENGTH ANALYSIS:
    ------------------------------
    Strength: STRONG (5/5)
    

Requirements

  • Python 3.6+
  • No external dependencies (uses standard library only)

Code Structure

  • generate_password(): Creates passwords based on user criteria
  • check_password_strength(): Analyzes password security
  • Main section: Handles user input and displays results

Example Output

Generated password: p7@Gm2#Kn9!
==================================================

PASSWORD STRENGTH ANALYSIS:
------------------------------
Strength: MEDIUM (4/5)

Security Notes

  • Passwords are generated using Python's random module
  • No passwords are stored or transmitted
  • Generated passwords meet minimum security criteria

About

CLI password generator with strength checker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages