Skip to main content

A package to generate secure passwords with customizable options and check vulnerability and strength

Project description

SafePassGen

Python License

SafePassGen is a Python package for generating secure, customizable passwords with various constraints. It also includes functionality to check the strength and vulnerability of passwords, making it a comprehensive tool for managing password security.

Features

  • Generate passwords with specific requirements:
    • Include or exclude numbers, lowercase, uppercase, and symbols.
    • Option to start passwords with a letter.
    • Avoid sequential characters.
    • Avoid duplicate characters.
    • Generate multiple passwords at once.
  • Check password strength and vulnerability:
    • Evaluate password length and character variety.
    • Check against a list of common passwords and dictionary.
    • Identify sequential or repeated characters.

Installation

You can install SafePassGen via pip:

```bash pip install SafePassGen ```

Or clone the repository and install manually:

```bash git clone https://github.com/diegoamengarelli/passgenesis.git cd secure_password pip install . ```

Usage

Basic Usage

```python from securepassword import PasswordGenerator

Create a password generator instance

generator = PasswordGenerator(length=12, include_numbers=True, include_lowercase=True, include_uppercase=True, include_symbols=True, no_duplicates=True, is_sequential=True, begin_with_letter=True, quantity=1)

Generate a password

passwords = generator.generate_passwords() print(passwords) # ['A1b2C3d4E5!'] ```

Advanced Usage

```python

Generate multiple passwords with specific constraints

generator = PasswordGenerator(length=16, include_numbers=True, include_lowercase=True, include_uppercase=True, include_symbols=True, no_duplicates=False, begin_with_letter=False, quantity=5)

passwords = generator.generate_passwords() print(passwords)
```

Checking Password Strength

```python from securepassword import PasswordStrengthChecker

checker = PasswordStrengthChecker(common_passwords=["password", "123456"]) password = "A1b2C3d4E5!" result = checker.check_strength(password)

print(result) Output: { "strength": "Strong", "score": 5, "suggestions": [] } ```

Configuration Options

`PasswordGenerator`

  • length: Length of the password(s) to be generated.
  • include_numbers: Include numbers in the password.
  • include_lowercase: Include lowercase characters in the password.
  • include_uppercase: Include uppercase characters in the password.
  • include_symbols: Include symbols in the password.
  • no_duplicates: Ensure no duplicate characters within the password.
  • begin_with_letter: Ensure the password starts with a letter.
  • only_numbers: Generate passwords containing only numbers.
  • quantity: Number of passwords to generate.

`PasswordStrengthChecker`

  • common_passwords: List of common passwords to check against. (Default: 10000 most common passwords)
  • min_length: Minimum length required for a password to be considered strong. (Default: 10 chars)
  • dictionary_words: List of dictionary words to check against for potential vulnerability. (Default: English dictionary)

Testing

To run the tests, you can use:

```bash python -m unittest discover -s tests ```

Make sure all tests pass before using the package in a production environment.

Contributing

We welcome contributions to enhance the functionality and usability of SafePassGen. To contribute:

  1. Fork the repository.
  2. Create a new branch (`git checkout -b feature-branch`).
  3. Make your changes.
  4. Commit your changes (`git commit -m 'Add new feature'`).
  5. Push to the branch (`git push origin feature-branch`).
  6. Open a Pull Request.

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SafePassGen-1.0.6.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SafePassGen-1.0.6-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file SafePassGen-1.0.6.tar.gz.

File metadata

  • Download URL: SafePassGen-1.0.6.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for SafePassGen-1.0.6.tar.gz
Algorithm Hash digest
SHA256 4098411adbff70b421d4b395bd20dbb70e7723b7ff9ef4cb559363952cf889e4
MD5 c7ad23a19edbbc4f67db2e1c812e41ec
BLAKE2b-256 61d3d8bb2014d58eef9112ea87bc99edb4155cbaeee3814c3042547d8da45da5

See more details on using hashes here.

File details

Details for the file SafePassGen-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: SafePassGen-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for SafePassGen-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 64d2c0d994b945677da9b6212c2efad5b25e4378efcdea6eb3c0c343a390f1fd
MD5 49a6d25457aae4af4cadf5bd345357cb
BLAKE2b-256 956ccba9046869d6e02aea6f2406ae4bb77439da8a92885b7d5e8ba8cab1092b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page