import random
import string
import os
def generate_wordlist(length, num_codes):
# Define the character pool: uppercase letters and digits
characters = string.ascii_uppercase + "0123456789"
# Generate the codes
wordlist = []
for _ in range(num_codes):
code = ''.join(random.choices(characters, k=length))
wordlist.append(code)
return wordlist
# Configuration
num_codes = 90000000 # Number of codes to generate
length = 18 # Length of each code (18 characters)
# Generate the codes
wordlist = generate_wordlist(length, num_codes)
# Get the desktop path
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop", "wordlist.txt")
# Save the codes to a text file on the desktop
with open(desktop_path, "w") as file:
file.write("\n".join(wordlist))
print(f"Generated {num_codes} codes, each {length} characters long, and saved to
'{desktop_path}'.")