Skip to content

gabrieltonyy/JAILBREAK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Jailbrake Password Generator

This project generates unique random strings of varying lengths and saves them in a PostgreSQL database. Each generated string is unique, and the database is set up with constraints to prevent duplicates. The project demonstrates database connection handling, random string generation, and uniqueness checks.

Table of Contents

Project Overview

The Jailbrake Password Generator creates random strings with a mix of uppercase and lowercase letters, digits, and special characters, storing them in a PostgreSQL database. This tool can be helpful for generating secure passwords or unique identifiers.

Features

  • Generates random strings of specified lengths (from 8 to 16 characters).
  • Saves each string to a PostgreSQL database with unique constraints.
  • Supports generating and storing multiple unique strings in batches.
  • Ensures no duplicate strings are saved to the database.

Requirements

  • Python 3.6+
  • PostgreSQL
  • Python libraries:
    • psycopg2 (for PostgreSQL database connection)
    • random and string (for random string generation)
    • itertools (for handling combinations if needed)

Installation

  1. Clone the repository:

    git clone https://github.com/gabrieltonyy/JAILBREAK.git
    cd JailbrakePasswordGenerator
  2. Install required Python packages:

    pip install psycopg2
  3. Set up PostgreSQL:

    • Ensure PostgreSQL is running on your machine.
    • Create a new PostgreSQL user if necessary, and give it privileges.

Usage

  1. Configure Database Credentials: Open the script and update the PostgreSQL connection credentials:

    db_name = "Jailbrake"
    user = "your_username"
    password = "your_password"
    host = "localhost"
    port = "5432"
  2. Run the Script:

    python jailbreak.py
  3. Generated Data:

    • The script will create a new PostgreSQL database (Jailbrake), a password table, and populate it with unique random strings.
    • You can configure the range of lengths and number of strings to generate by editing the lengths list and num_strings_per_length variable in the main function.

Configuration

  • Adjust the lengths list and num_strings_per_length in the main function to control which string lengths are generated and how many of each.

Database Schema

The password table schema is as follows:

  • id: SERIAL PRIMARY KEY - Unique identifier for each record.
  • name: VARCHAR(16) UNIQUE NOT NULL - The generated unique string (up to 16 characters).

Code Structure

  • create_database_and_table(): Sets up the PostgreSQL database and password table with a uniqueness constraint on the name column.
  • generate_random_string(): Generates a random string of the specified length.
  • insert_unique_random_string(): Inserts each unique random string into the database, checking for duplicates.
  • main(): Manages the database setup and calls functions to generate and insert unique random strings.

Troubleshooting

  1. Connection Errors:

    • Ensure PostgreSQL is running and that your credentials in the script match your PostgreSQL setup.
  2. Duplicate Strings:

    • The code automatically checks for duplicates, but if duplicates are somehow inserted, verify the UNIQUE constraint on the name column.
  3. Batch Size Adjustment:

    • If you encounter memory issues, adjust the batch size variable in the insert_unique_random_string() function.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


Feel free to customize the README further based on specific requirements or preferences.

About

password list generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages