import random import secrets import string # CONFIG # You can replace the 1-1000.txt with ur own file, but specify the length here: textfile_length = 1000 # Username random keyword number constraints keyword_min = 2 keyword_max = 4 # Username random number constraints random_int_min = 1 random_int_max = 99999 # Password length constraints password_length_min = 20 password_length_max = 40 def random_word(target_index): with open('1-1000.txt', 'r', encoding='utf-8') as file: for current_index, line in enumerate(file, 1): if current_index == target_index: return line.strip() def generate_random_string(): characters = string.ascii_letters + string.digits + string.punctuation length = random.randint(password_length_min, password_length_max) random_str = ''.join(secrets.choice(characters) for _ in range(length)) return random_str buffer = "" for i in range(random.randint(keyword_min, keyword_max)): buffer += random_word(random.randint(1, textfile_length)) + "_" print(f"{buffer.strip("_")}{random.randint(random_int_min, random_int_max)}") # dis is ur username print(generate_random_string()) # then dis is ur pass