Overview

p4ss-g3n is a command-line password generator built in Python, focused on security-first design. Built as a learning Python project with the though of eventually evolving into a full password manager.

How it works

p4ss_g3n generates cryptographically secure passwords using Python’s secrets module, which is designed for security-sensitive applications unlike the standard random module. The character pool is built dynamically from string.ascii_lowercase, string.ascii_uppercase, string.digits, and string.punctuation based on the user’s preferences. Each character in the password is selected independently using secrets.choice(), ensuring uniform randomness across the entire pool.

Input is validated at every step — password length is enforced between 4 and 64 characters, and all yes/no prompts require a valid y or n response before proceeding.

Usage

1python p4ss_g3n.py

Then you will be prompted to configure your password:

How many characters do you want the password to be?[4-64]: 20
Do you want it to contain uppercases? [y/n]: y
Do you want it to contain numbers? [y/n]: y
Do you want it to contain symbols? [y/n]: n

Your Password: Vyo5uK0nilu4tPxeIGeB

Planned Features

  • Encrypt and save passwords to file — generated passwords will be encrypted using Fernet symmetric encryption (cryptography library) and saved to a local file for later retrieval.
  • Decrypt and read saved passwords — a corresponding decrypt function to retrieve and display stored passwords using the encryption key.

Status: On break.