import random
import string
def generate_random_email():
random_string = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(10))
random_domain = ''.join(random.choice(string.ascii_letters) for _ in range(5))
random_tld = random.choice(['com'])
random_email = random_string + '@' + 'gmail' + '.' + random_tld
return random_email
def generate_random_password():
random_password = ''.join(random.choice(string.ascii_letters + string.digits + string.punctuation) for _ in range(12))
while (not any(c.isupper() for c in random_password)) or (not any(c.islower() for c in random_password)) or (not any(c.isdigit() for c in random_password)) or (not any(c in string.punctuation for c in random_password)):
random_password = ''.join(random.choice(string.ascii_letters + string.digits + string.punctuation) for _ in range(8)
)
return random_password
# Kaç tane e-posta ve şifre oluşturmak istediğinizi belirtin
num_accounts = 10
# Dosyaya yazma işlemini gerçekleştirin
with open("accounts.txt", "a") as file:
for _ in range(num_accounts):
random_email = generate_random_email()
random_password = generate_random_password()
file.write(f"Email: {random_email}, Password: {random_password}\n")
print(f"{num_accounts} adet hesap oluşturulup accounts.txt dosyasına kaydedildi.")