-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.py
175 lines (122 loc) · 5.24 KB
/
main.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# imports
from globals import *
from methods import *
from selenium import webdriver
# printing banner
print(banner)
def main():
count = 1
vpn_number = 1
# chrome options
chrome_options = webdriver.ChromeOptions()
# add extensions
chrome_options.add_extension('ad.crx')
chrome_options.add_extension('co.crx')
# add arguments
chrome_options.add_argument("--disable-popup-blocking")
chrome_options.add_argument("--disable-notifications")
chrome_options.add_argument("--log-level=2")
time.sleep(1)
num_of_accounts = choose_num_of_account()
password = choose_accounts_password()
vpn_method = choose_vpn_method()
option = input(
colour.WHITE + "[^]-- " + colour.GREEN + "Add bot accounts to your account?\n1.Yes\n2.No\nSelect: "
+ colour.WHITE)
if option == "1":
profile_link = input(colour.WHITE + "[^]-- " + colour.GREEN + "Input facebook profile link: " + colour.WHITE)
else:
pass
while count < num_of_accounts:
# loading user agents randomly from the user_agents text file
user_agent = get_line('user_agents.txt', random.randrange(1, 100))
chrome_options.add_argument(f'--user-agent={user_agent}') # set the user agent
try:
print(
colour.WHITE + "[-]----> " + colour.GREEN + "Creating new account " + colour.PURPLE + "[" + colour.BLUE
+ str(count) + colour.PURPLE + "]\n")
browser = webdriver.Chrome(options=chrome_options)
connect_to_VPN(vpn_method, vpn_number)
if vpn_method == "2":
vpn_number += 1
if vpn_number == 68:
vpn_number = 1
# facebook.com
browser.get(url)
# get new email from tempMail
new_email = getMail(browser)
time.sleep(2)
# click on the sign-up button
signup_button = browser.find_element(By.XPATH,
selectors.fb_signup_button)
signup_button.click()
WebDriverWait(browser, 10).until(
EC.visibility_of_element_located((By.XPATH, selectors.fb_first_name_field)))
# fill the information randomly
# first name
fb_firstname_field = browser.find_element(By.XPATH, selectors.fb_first_name_field)
fb_firstname_field.send_keys(get_line('firstname.txt', random.randrange(1, 30)))
# last name
fb_lastname_field = browser.find_element(By.XPATH, selectors.fb_last_name_field)
fb_lastname_field.send_keys(get_line('lastname.txt', random.randrange(1, 30)))
# email
fb_email_field = browser.find_element(By.XPATH, selectors.fb_email_field)
fb_email_field.send_keys(new_email)
fb_confirm_email = browser.find_element(By.XPATH, selectors.fb_confirm_email_field)
fb_confirm_email.send_keys(new_email)
# password
fb_password_field = browser.find_element(By.XPATH, selectors.fb_password_field)
fb_password_field.send_keys(password)
# date of birth
# day
fb_day = browser.find_element(By.XPATH, selectors.fb_day_field)
fb_day.send_keys(gen_day())
# month
fb_month = browser.find_element(By.XPATH, selectors.fb_month_filed)
fb_month.send_keys(gen_month())
# year
fb_year = browser.find_element(By.XPATH, selectors.fb_year_field)
fb_year.send_keys(gen_year())
# gender
fb_gender = gen_gender(browser)
fb_gender.click()
time.sleep(2)
fb_signup = browser.find_element(By.XPATH, selectors.fb_signup_button1)
fb_signup.click()
url_changes(browser)
if check_url(browser):
print(colour.WHITE + "\n[|]----> " + colour.RED + "Account banned/didn't receive OTP\n" + colour.WHITE)
browser.quit()
clean_browser()
disconnect_VPN()
continue
otp = receiveEmail(browser)
fb_put_otp = WebDriverWait(browser, 10).until(
EC.visibility_of_element_located((By.XPATH, selectors.fb_otp_field)))
fb_put_otp.send_keys(otp)
fb_next = WebDriverWait(browser, 10).until(
EC.visibility_of_element_located((By.XPATH, selectors.fb_confirm_otp_button)))
fb_next.click()
time.sleep(12)
browser.get(url)
time.sleep(3)
if check_url(browser):
hold_account(new_email, password)
browser.quit()
clean_browser()
disconnect_VPN()
continue
add_as_friend(browser, option, profile_link)
success_account(new_email, password)
count += 1
except NoSuchElementException:
print(colour.WHITE + "\n[|]----> " + colour.RED + "Unsupported user-agent!, Switching..." + colour.WHITE)
pass
except Exception as e:
print(e)
pass
browser.quit()
disconnect_VPN()
clean_browser()
if __name__ == '__main__':
main()