forked from Wizz1337/TikTokMassBotting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.py
38 lines (34 loc) · 941 Bytes
/
utils.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
import os, sys
def clearConsole():
if os.name == 'posix':
os.system('clear')
elif os.name in ('ce', 'nt', 'dos'):
os.system('cls')
else:
pass
def setConsoleTitle(Content):
global DebugMode
if os.name == 'posix':
sys.stdout.write(f"\33]0;{Content}\a")
sys.stdout.flush()
return False
elif os.name == 'nt':
os.system(f"title {Content}")
return False
else:
pass
def readFile(filename,method):
with open(filename,method,encoding='utf8') as f:
content = [line.strip('\n') for line in f]
return content
def readProxiesFile():
restartTry = True
path = os.path.join("Data", "Proxies.txt")
while restartTry:
try:
proxies = readFile(path, 'r')
restartTry = False
return proxies
except:
print("Failed to open Proxies.txt")
restartTry = True