Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🔐 SecureCore Password Generator

Python Version License Code Style GitHub Stars

A cryptographically secure password generator with multi-format export capabilities. Built for security professionals and developers who demand military-grade password generation.


🚀 Features

  • 🔒 Cryptographically Secure — Uses Python's secrets module (CSPRNG), not random()
  • 🎯 Customizable Character Sets — Choose lowercase, uppercase, digits, and symbols
  • 💾 Multi-Format Export — Save to TXT, JSON, CSV, or Excel (.xlsx)
  • Zero Dependencies (except export libraries) — Lightweight core
  • 📊 Timestamp Tracking — Automatic date/time logging for each password
  • 🎨 Interactive CLI — User-friendly terminal interface

📋 Prerequisites


📦 Installation & Setup

Step 1: Clone & Navigate

git clone https://github.com/mihaiapostol14/SecureCorePasswordGenerator.git 
cd SecureCorePasswordGenerator

Step 2: Create Virtual Environment

On macOS/Linux:

python3 -m venv venv
source venv/bin/activate

On Windows:

python -m venv venv
venv\Scripts\activate

Step 3: Install Dependencies

pip install --upgrade pip
pip install -r requirements.txt

Step 4: Run the Generator

python generator.py

🎮 Usage Guide

Interactive Mode

$ python generator.py

Password length: 16
Select characters for password:

Include lowercase (a-z)? (y/n): y
Include uppercase (A-Z)? (y/n): y
Include digits (0-9)? (y/n): y
Include symbols (!@#$)? (y/n): y

Generated password:
X9$mK@pL2qR#vB7w

Save password? (y/n): y

1 - TXT
2 - JSON
3 - CSV
4 - EXCEL
Select file type: 2

✅ Password saved to yours_password.json

📁 Project Structure

SecureCorePasswordGenerator/
├── generator.py              # Main password generation engine
├── requirements.txt          # Python dependencies
├── README.md                 # This file
│
└── helper/
    ├── __init__.py          # Package initializer
    └── saver.py             # File writer (TXT, JSON, CSV, Excel)

🏗️ Architecture

Tech Stack

  • Language: Python 3.8+
  • Core Security: secrets module (cryptographic randomness)
  • File Formats:
    • TXT (plain text)
    • JSON (structured data with json)
    • CSV (spreadsheet format)
    • Excel (.xlsx with openpyxl)
  • Styling: colorama (cross-platform terminal colors)

Design Pattern

  • OOP Architecture: Inheritance-based with FileWriter base class
  • Separation of Concerns: Password generation (business logic) vs. file operations (I/O)
  • Type Safety: Full type hints throughout (PEP 484)

📊 Output Examples

TXT Format

X9$mK@pL2qR#vB7w

JSON Format

{
    "2024-08-26 14:30:45": "X9$mK@pL2qR#vB7w"
}

CSV Format

DATE AND TIME,PASSWORD
2024-08-26 14:30:45,X9$mK@pL2qR#vB7w

Excel Format

DATE AND TIME PASSWORD
2024-08-26 14:30:45 X9$mK@pL2qR#vB7w

🔐 Security Considerations

What We Do Right:

  • Uses secrets.choice() instead of random() (cryptographically secure)
  • Proper entropy from Python's OS random number generator
  • No hardcoded passwords or insecure defaults

⚠️ Recommendations:

  • Always use a password manager to store sensitive passwords
  • Avoid sharing generated passwords in plain text
  • Consider adding password strength validation (entropy calculation)

🐛 Known Issues & Improvements

Issue Status Notes
No error handling for invalid password length 🔴 TODO Add try-except for user input
No validation for zero-length passwords 🔴 TODO Enforce minimum length
Silent failure on invalid file format choice 🟡 PARTIAL Should show error message
No password strength meter 💡 FEATURE Entropy calculation suggested

📚 Dependencies

colorama==0.4.5      # Cross-platform terminal colors
openpyxl==3.1.2      # Excel file creation/manipulation
et-xmlfile==1.1.0    # XML support for Excel (dependency)

🤝 Contributing

Found a bug or want to improve SecureCore? Follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit changes: git commit -m "Add your feature"
  4. Push to branch: git push origin feature/your-feature
  5. Submit a Pull Request

📄 License

This project is licensed under the MIT License — see LICENSE file for details.


👨‍💻 Author

Mihai Apostol@mihaiapostol14


🙋 Support

Have questions? Open an Issue or check the Discussions.


📈 Project Stats

GitHub followers GitHub User's stars


⭐ If this project helped you, please consider giving it a star!

🔝 Back to top

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages