MAIL|PASSWORD GENERATOR, CUSTOMIZABLE CHARACTER POSITIONS AND FAST

SudoDragon

Infinity Member
Joined
September 6, 2025
Messages
539
Reaction score
1,386
Points
93

LINK
Key: BEsc4DZTaSG5yUC_69llDOpiUJVS2dmqf7eeAdf0I5Y

Code:
import random
import string
import os
import tkinter as tk
from tkinter import filedialog
# Get the current directory where the Python script is located
script_directory = os.path.dirname(os.path.abspath(__file__))
# Define the folder name
folder_name = "Generated"
# Create the folder path by joining the current directory and folder name
folder_path = os.path.join(script_directory, folder_name)
# If the folder doesn't exist, create it
if not os.path.exists(folder_path):
    os.makedirs(folder_path)
# Define the file path
file_path = os.path.join(folder_path, "Generated.txt")
# Define the list of predefined domain names
domain_names = [
    "yahoo.com","gmail.com", "hotmail.com", "outlook.com", "aol.com",
    "icloud.com", "protonmail.com", "mail.com", "zoho.com", "yandex.com",
    "gmx.com", "live.com", "fastmail.com", "tutanota.com", "inbox.com",
    "rediffmail.com", "cox.net", "earthlink.net", "mail.ru", "lycos.com",
    "rocketmail.com", "sbcglobal.net", "att.net", "comcast.net", "verizon.net",
    "me.com", "optonline.net", "roadrunner.com", "juno.com", "netzero.net",
    "shaw.ca", "sympatico.ca", "videotron.ca", "rogers.com", "telus.net",
    "bell.net", "yahoo.ca", "hotmail.ca", "gmail.ca", "yahoo.co.uk",
    "outlook.co.uk", "btinternet.com", "aol.co.uk", "sky.com", "virginmedia.com",
    "ntlworld.com", "blueyonder.co.uk", "talktalk.net", "tiscali.co.uk", "orange.fr",
    "free.fr", "wanadoo.fr", "laposte.net", "sfr.fr", "bbox.fr",
    "numericable.fr", "neuf.fr", "hotmail.fr", "live.fr", "gmail.fr",
]
# Custom function to generate characters based on the predefined types
def generate_character(char_type):
    if char_type == 'n':  # Number
        return random.choice(string.digits)
    elif char_type == 'b':  # Lowercase letter
        return random.choice(string.ascii_lowercase)
    elif char_type == 'v':  # Uppercase letter
        return random.choice(string.ascii_uppercase)
    elif char_type == 'c':  # Symbol
        return random.choice('!@')
    else:
        raise ValueError(f"Only use defined letters DO NOT USE: {char_type}")
# Function to generate a random string of characters of a given length
def generate_random_string(length):
    return ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(length))
# Function to generate a random domain name from a list or a custom domain
def generate_domain(use_default, custom_domains=None):
    if use_default:
        return random.choice(domain_names)  # Randomly choose a domain name from the predefined list
    else:
        if not custom_domains:
            return input("Enter a custom domain: ")
        return random.choice(custom_domains)
# Function to generate a string with predefined positions of characters
def generate_string_with_predefined_positions(template):
    return ''.join([generate_character(template[i % len(template)]) for i in range(len(template))])
# Define the GUI
root = tk.Tk()
root.withdraw()
# Define the ASCII art
ascii_art = """
    ___                               __     
   /   | ______________  __  ______  / /______
  / /| |/ ___/ ___/ __ \/ / / / __ \/ __/ ___/
/ ___ / /__/ /__/ /_/ / /_/ / / / / /_(__  )
/_/  |_\___/\___/\____/\__,_/_/ /_/\__/____/ 
"""
# Print the ASCII art
print(ascii_art)
# Get the number of accounts to create from the user and convert it to an integer
num_accounts = int(input("Enter the number of accounts to create: "))
# Include the line after printing the input prompt
print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')

.lower() == 'yes'
# Include the line after printing the input prompt
print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')
print('n=Number v=UpperCase b=LowerCase c=Symbol')
# Get the username template from the user
username_template = input("Enter the username template: ")
# Include the line after printing the input prompt
print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')



    print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')
# Initialize a list to store custom domains
custom_domains = []
# Ask the user if they want to use a default domain or a custom domain
use_default_domain = input("Do you want to use default adresses (yes/no): ").lower() == 'yes'
print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')
# If the user chooses not to use the default domain, ask for the number of custom domains
if not use_default_domain:
    num_custom_domains = int(input("How many custom domains do you have? [Enter a Number]"))
    print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')
    # Ask the user to input each custom domain
    for i in range(num_custom_domains):
        custom_domain = input(f"Enter custom domain [Do not include the @] {i + 1}/{(num_custom_domains)} ")
        print('-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.')
        custom_domains.append(custom_domain)
# Generate and write the updated list to the file
with open(file_path, 'w') as file:
    for _ in range(num_accounts):
        # Generate usernames based on predefined templates
        username = generate_string_with_predefined_positions(username_template)
        # Generate the domain based on user choice
        domain = generate_domain(use_default_domain, custom_domains)




            file.
        else:

            file.write(f"{username}@{domain}\n")
# Print the file path

 
  • Tags
    custom password generator fast password creation password security user authentication