-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathby 618_Koda - TikTok AIO Tool
374 lines (324 loc) · 17.8 KB
/
by 618_Koda - TikTok AIO Tool
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
init()
system("mode 800")
system("title TikTok Botter - By 618_Koda#0420")
def color(str, color):
if color.lower() == "green":
result = f"{Fore.WHITE}[{Fore.LIGHTGREEN_EX}{str}{Fore.WHITE}]{Fore.LIGHTGREEN_EX}"
elif color.lower() == "red":
result = f"{Fore.WHITE}[{Fore.LIGHTRED_EX}{str}{Fore.WHITE}]{Fore.LIGHTRED_EX}"
return result
def align(str):
lines = str.splitlines( )
greatest = []
for i in lines:
greatest.append(len(i))
for i in lines:
length = round(int(greatest[-1])/2)
print(f"{' '*round(get_terminal_size().columns/2-length)}{i}")
...
... class printing():
...
... def __init__(self, a, b, c, d):
... self.a = a
... self.b = b
... self.c = c
... self.d = d
...
... def text():
... text = f"""{Fore.LIGHTMAGENTA_EX}
... \t\t\t\t\t▄▄▄▄▄▄▪ ▄ •▄ ▄▄▄▄▄ ▄ •▄ ▄▄▄▄· ▄▄▄▄▄▄▄▄▄▄▄▄▄ .▄▄▄
... \t\t\t\t\t ██ ██ █▌▄▌▪•██ ▪ █▌▄▌▪ ▐█ ▀█▪▪ •██ •██ ▀▄.▀·▀▄ █·
... \t\t\t\t\t ▐█.▪▐█·▐▀▀▄· ▐█.▪ ▄█▀▄ ▐▀▀▄· ▐█▀▀█▄ ▄█▀▄ ▐█.▪ ▐█.▪▐▀▀▪▄▐▀▀▄
... \t\t\t\t\t ▐█▌·▐█▌▐█.█▌ ▐█▌·▐█▌.▐▌▐█.█▌ ██▄▪▐█▐█▌.▐▌ ▐█▌· ▐█▌·▐█▄▄▌▐█•█▌
... \t\t\t\t\t ▀▀▀ ▀▀▀·▀ ▀ ▀▀▀ ▀█▄▀▪·▀ ▀ ·▀▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀▀ ▀▀▀ .▀ ▀
... """
... text = text.replace('▪', f'{Fore.GREEN}▪{Fore.LIGHTMAGENTA_EX}')
... text = text.replace('•', f'{Fore.GREEN}•{Fore.LIGHTMAGENTA_EX}')
... text = text.replace('·', f'{Fore.GREEN}·{Fore.LIGHTMAGENTA_EX}')
... text = text.replace('.', f'{Fore.GREEN}.{Fore.LIGHTMAGENTA_EX}')
... align(text)
...
... def info():
... align(f"""{Fore.WHITE}
... ╔═══════════════════════════════════════════════════════════════════════════════════╗
... ║ ║
... ║ {color(">", "green")} About: {Fore.LIGHTMAGENTA_EX}This Tool Uses Zefoy To Bot TikTok Stats.{Fore.WHITE} ║
... ║ {color(">", "green")} Updates: {Fore.LIGHTMAGENTA_EX}Error Fix & Adjustment --4/15/2022{Fore.WHITE} ║
... ║ {color(">", "green")} Made By: {Fore.LIGHTMAGENTA_EX}618_Koda#0420{Fore.WHITE} ║
... ║ {color(">", "green")} Github: {Fore.LIGHTMAGENTA_EX}https://github.com/618_Koda{Fore.WHITE} ║
... ║ {color(">", "green")} Download Chrome Driver: {Fore.LIGHTMAGENTA_EX}https://chromedriver.chromium.org/downloads{Fore.WHITE} ║
... ║ ║
╚═══════════════════════════════════════════════════════════════════════════════════╝
""")
def options():
align(f"""{Fore.WHITE}
╔═══════════════════════════════╗
║ ║
║ {color("1", "green")} {Fore.LIGHTMAGENTA_EX}Start{Fore.WHITE} ║
║ {color("2", "green")} {Fore.LIGHTMAGENTA_EX}Info{Fore.WHITE} ║
║ {color("3", "green")} {Fore.LIGHTMAGENTA_EX}Options{Fore.WHITE} ║
║ {color("4", "green")} {Fore.LIGHTMAGENTA_EX}Clear{Fore.WHITE} ║
║ {color("5", "green")} {Fore.LIGHTMAGENTA_EX}Exit{Fore.WHITE} ║
║ ║
╚═══════════════════════════════╝
""")
def botOptions():
align(f"""{Fore.WHITE}
╔═══════════════════════════════╗
║ ║
║ {color("1", "green")} {Fore.LIGHTMAGENTA_EX}Follows{Fore.WHITE} ║
║ {color("2", "green")} {Fore.LIGHTMAGENTA_EX}Hearts{Fore.WHITE} ║
║ {color("3", "green")} {Fore.LIGHTMAGENTA_EX}Views{Fore.WHITE} ║
║ {color("4", "green")} {Fore.LIGHTMAGENTA_EX}Shares{Fore.WHITE} ║
║ {color("5", "green")} {Fore.LIGHTMAGENTA_EX}All{Fore.WHITE} ║
║ ║
╚═══════════════════════════════╝
""")
def cooldowns(self):
align(f"""{Fore.WHITE}
╔═══════════════════════════════╗
║ {color(">", "green")} {Fore.LIGHTMAGENTA_EX}Cool Downs {color("<", "green")}║
║ {color(">", "green")} {Fore.LIGHTMAGENTA_EX}Follows: {Fore.LIGHTCYAN_EX}{self.a}s{Fore.WHITE} ║
║ {color(">", "green")} {Fore.LIGHTMAGENTA_EX}Hearts: {Fore.LIGHTCYAN_EX}{self.b}s{Fore.WHITE} ║
║ {color(">", "green")} {Fore.LIGHTMAGENTA_EX}Views: {Fore.LIGHTCYAN_EX}{self.c}s{Fore.WHITE} ║
║ {color(">", "green")} {Fore.LIGHTMAGENTA_EX}Shares: {Fore.LIGHTCYAN_EX}{self.d}s{Fore.WHITE} ║
║ ║
╚═══════════════════════════════╝
""")
def refresh():
system("cls")
printing.text()
align(f"\n\n\t\t\t{color('>', 'green')} Made By: {Fore.LIGHTMAGENTA_EX}618_Koda#0420 {color('<', 'green')}")
align(f"\t\t\t\t{color('>', 'green')} {Fore.LIGHTGREEN_EX}Github: {Fore.LIGHTMAGENTA_EX}https://github.com/KodaTheGoat {color('<', 'green')}")
printing.options()
def start(video, botChoice):
option = webdriver.ChromeOptions()
option.add_experimental_option('excludeSwitches', ['enable-logging'])
try:
service = Service(executable_path="C:\\Users\\YOUR\\PATH\\HERE\\chromedriver.exe")
driver = webdriver.Chrome(service=service, options=option)
except Exception as DriverError:
print(f"{color('>', 'red')} {Fore.LIGHTRED_EX}Error: {DriverError}")
input(f"{color('>', 'red')} {Fore.LIGHTRED_EX}Press Enter to Exit")
exit()
driver.get("https://zefoy.com")
if driver.title == "zefoy.com | 502: Bad gateway":
print(f"{color('>', 'red')} Zefoy Is Down... Attempting To Fix.\n")
while driver.title == "zefoy.com | 502: Bad gateway":
time.sleep(20)
driver.refresh()
if driver.title != "zefoy.com | 502: Bad gateway":
print(f"\n{color('>', 'red')} Fixed! Zefoy is Back Up. Starting Now.\n")
break
else:
print(f"\n{color('>', 'green')} Zefoy Is Up!\n")
captchaCheck = input(f"{color('>>>', 'green')} Type \"y\" Once You Finished The Captcha: {Fore.LIGHTMAGENTA_EX}")
captchaFinish = False
if captchaCheck == "y":
while captchaFinish != True:
try:
driver.find_element(By.XPATH, "/html/body/div[4]/div[1]/div[3]/div/div[1]/div/h5")
captchaFinish = True
except:
print(f"\n{color('>', 'red')} You Didn't Finish The Captcha.")
input(f"{color('>>>', 'green')} Type \"y\" Once You Finished The Captcha: {Fore.LIGHTMAGENTA_EX}")
#Defining Find Cooldown
def findCooldown(xpath):
cooldown = driver.find_element(By.XPATH, xpath).text
#String Slicing For Minutes
minute1 = cooldown.find("wait") + 4
minute2 = minute1
while True:
minute2 += 1
if cooldown[minute2] == "m":
break
#String Slicing For Seconds
second1 = cooldown.find(")") + 1
second2 = second1
while True:
second2 += 1
if cooldown[second2] == "s":
break
#Returning Minutes & Second Added
return (int(cooldown[minute1:minute2])*60) + int(cooldown[second1:second2])
print(f"\n{color('>', 'green')} Captcha is Finished, Starting...\n")
#Defining Xpaths
home = "/html/body/nav/ul/li/a"
views_enter = "/html/body/div[4]/div[1]/div[3]/div/div[4]/div/button"
views_input = "/html/body/div[4]/div[5]/div/form/div/input"
views_search = "/html/body/div[4]/div[5]/div/form/div/div/button"
views_submit = "/html/body/div[4]/div[5]/div/div/div[1]/div/form/button"
views_cooldowns = "/html/body/div[4]/div[5]/div/div/h4"
shares_enter = "/html/body/div[4]/div[1]/div[3]/div/div[5]/div/button"
shares_input = "/html/body/div[4]/div[6]/div/form/div/input"
shares_search = "/html/body/div[4]/div[6]/div/form/div/div/button"
shares_submit = "/html/body/div[4]/div[6]/div/div/div[1]/div/form/button"
shares_cooldowns = "/html/body/div[4]/div[6]/div/div/h4"
hearts_enter = "/html/body/div[4]/div[1]/div[3]/div/div[2]/div/button"
hearts_input = "/html/body/div[4]/div[3]/div/form/div/input"
hearts_search = "/html/body/div[4]/div[3]/div/form/div/div/button"
hearts_submit = "/html/body/div[4]/div[3]/div/div/div[1]/div/form/button"
hearts_cooldowns = "/html/body/div[4]/div[3]/div/div/h4"
follows_enter = "/html/body/div[4]/div[1]/div[3]/div/div[1]/div/button"
follows_input = "/html/body/div[4]/div[2]/div/form/div/input"
follows_search = "/html/body/div[4]/div[2]/div/form/div/div/button"
follows_submit = "/html/body/div[4]/div[2]/div/div/div[1]/div/form/button"
follows_cooldowns = "/html/body/div[4]/div[2]/div/div/h4"
#List of Xpaths for the Bot All
enterList = [
[follows_enter, follows_input, follows_search, follows_submit, follows_cooldowns, "Follows"],
[views_enter, views_input, views_search, views_submit, views_cooldowns, "Views"],
[hearts_enter, hearts_input, hearts_search, hearts_submit, hearts_cooldowns, "Hearts"],
[shares_enter, shares_input, shares_search, shares_submit, shares_cooldowns, "Shares"],
]
#Defining Cool-downs
follows_cooldown = 0
hearts_cooldown = 0
views_cooldown = 0
shares_cooldown = 0
#Defining Boolean
continue1 = False
continue2 = False
time.sleep(5)
#Defining Botting Function, Uses XPaths as parameters
def bot(which, enter, input, search, submit, con1, con2, cooldownText, cooldownTime):
amount = 0
while captchaFinish:
driver.refresh()
#Checks If Zefoy Down
if driver.title == "zefoy.com | 502: Bad gateway":
print(f"{color('>', 'red')} Zefoy Is Down... Attempting To Fix.\n")
while driver.title == "zefoy.com | 502: Bad gateway":
time.sleep(20)
driver.refresh()
if driver.title != "zefoy.com | 502: Bad gateway":
print(f"\n{color('>', 'red')} Fixed! Zefoy is Back Up. Starting Now.\n")
break
print(f"{color('>', 'green')} Sending {which}...")
try:
driver.find_element(By.XPATH, enter).click()
time.sleep(1)
driver.find_element(By.XPATH, input).send_keys(video)
con1 = True
except:
con1 = False
print(f"\n{color('>', 'red')} {which} Page is Down on Zefoy.")
print(f"{color('>', 'red')} Stopped.")
time.sleep(1000000)
if con1 == True:
time.sleep(2)
driver.find_element(By.XPATH, search).click()
time.sleep(3)
try:
driver.find_element(By.XPATH, submit).click()
con2 = True
print(f"{color('>', 'green')} Sent {which}, Getting Cool Down\n")
except:
con2 = False
print(f"{color('>', 'red')} {which} Cool Down Isn't Finished, Getting Cool Down.\n")
time.sleep(5)
cooldownTime += findCooldown(cooldownText)
if con2 == True:
time.sleep(5)
cooldownTime += findCooldown(cooldownText)
else:
pass
else:
pass
amount += 1
driver.find_element(By.XPATH, home).click()
print(f"{color('>', 'green')} Completed {Fore.LIGHTCYAN_EX}{amount} {Fore.LIGHTGREEN_EX}Time.")
print(f"{color('>', 'green')} Cooldown: {Fore.LIGHTCYAN_EX}{cooldownTime}s\n")
for i in range(10):
time.sleep(cooldownTime/10)
driver.refresh()
print(f"{color('>', 'green')} Cool-Down: {Fore.LIGHTCYAN_EX}{i+1}/10")
print(f"\n{color('>', 'green')} Finished Cool Down, Restarting...\n")
time.sleep(5)
def botAll(boolean):
amount = 0
while True:
#Checks If Zefoy Down
if driver.title == "zefoy.com | 502: Bad gateway":
print(f"{color('>', 'red')} Zefoy Is Down... Attempting To Fix.\n")
while driver.title == "zefoy.com | 502: Bad gateway":
time.sleep(20)
driver.refresh()
if driver.title != "zefoy.com | 502: Bad gateway":
print(f"\n{color('>', 'red')} Fixed! Zefoy is Back Up. Starting Now.\n")
break
driver.refresh()
cooldownList = []
if boolean:
for i in enterList:
time.sleep(3)
print(f"{color('>', 'green')} Sending {i[5]}...")
try:
driver.find_element(By.XPATH, i[0]).click()
time.sleep(1)
driver.find_element(By.XPATH, i[1]).send_keys(video)
continue1 = True
except:
print(f"{color('>', 'red')} {i[5]} Page is Down on Zefoy.\n")
cooldownList.append(0)
continue1 = False
driver.find_element(By.XPATH, home)
if continue1 == True:
time.sleep(2)
driver.find_element(By.XPATH, i[2]).click()
time.sleep(3)
try:
driver.find_element(By.XPATH, i[3]).click()
continue2 = True
print(f"{color('>', 'green')} Sent {i[5]}, Getting Cool Down.\n")
except:
print(f"{color('>', 'red')} {i[5]} Cool Down Isn't Finished, Getting Cool Down.\n")
time.sleep(5)
cooldownList.append(findCooldown(i[4]))
driver.find_element(By.XPATH, home).click()
continue2 = False
if continue2 == True:
time.sleep(5)
cooldownList.append(findCooldown(i[4]))
driver.refresh()
else:
pass
else:
pass
amount +=1
cooldownList.sort()
print(f"{color('>', 'green')} Completed {amount} Time.")
print(f"{color('>', 'green')} Cooldown: {Fore.LIGHTCYAN_EX}{cooldownList[-1]}s\n")
for i in range(10):
time.sleep(cooldownList[-1]/10)
driver.refresh()
print(f"{color('>', 'green')} Cool-Down: {Fore.LIGHTCYAN_EX}{i+1}/10")
time.sleep(5)
print(f"\n{color('>', 'green')} Finished Cool Down, Restarting...\n")
driver.refresh()
if botChoice == 1:
bot("Follows", follows_enter, follows_input, follows_search, follows_submit, continue1, continue2, follows_cooldowns, follows_cooldown)
elif botChoice == 2:
bot("Hearts", hearts_enter, hearts_input, hearts_search, hearts_submit, continue1, continue2, hearts_cooldowns, hearts_cooldown)
elif botChoice == 3:
bot("Views", views_enter, views_input, views_search, views_submit, continue1, continue2, views_cooldowns, views_cooldown)
elif botChoice == 4:
bot("Shares", shares_enter, shares_input, shares_search, shares_submit, continue1, continue2, shares_cooldowns, shares_cooldown)
elif botChoice == 5:
botAll(True)
printing.refresh()
while True:
choice = input(f"{color('>>>', 'green')} Choice: {Fore.LIGHTMAGENTA_EX}")
if choice == "1":
video = input(f"{color('>>>', 'green')} TikTok Video URL: {Fore.LIGHTMAGENTA_EX}")
printing.botOptions()
option = input(f"\n{color('>>>', 'green')} Which to Bot: {Fore.LIGHTMAGENTA_EX}")
start(video, int(option))
break
elif choice == "2":
printing.info()
elif choice == "3":
printing.options()
elif choice == "4":
printing.refresh()
elif choice =="5":