-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.py
90 lines (69 loc) · 3.07 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
from TikTokApi import TikTokApi
import platform
import os
import random
import inspect
import sys
import time
from pathlib import Path
api = TikTokApi()
TikTokApi.get_instance(use_selenium=True)
def get_file_dirname() -> Path:
"""Returns the callee (`__file__`) directory name"""
module_name = inspect.currentframe().f_back.f_globals["__name__"]
module = sys.modules[module_name]
assert module
return Path(module.__file__).parent.absolute()
class App:
@staticmethod
def watermark():
if platform.system() == 'Windows':
os.system('cls')
else:
os.system('clear')
print('┌─────────────┬───────────────────────────┐\n'
'│╔╦╗╔╦╗╦ ╦╔═╗ │ TikTok: d3vpy │\n'
'│ ║ ║ ║ ║║ │ Discord: d3vpy#3399 │\n'
'│ ╩ ╩ ╚═╝╚═╝ │ GitHub: d3vpy │\n'
'├─────────────┴─────────┬─────────────────┤\n'
'│TikTok Username checker│ Version 0.0.1b │\n'
'├───────────────────────┴─────────────────┤')
if platform.system() == 'Windows':
print('│ Platform: Windows │')
elif platform.system() == 'Linux':
print('│ Platform: Linux │')
elif platform.system() == 'Darwin':
print('│ Platform: Darwin │')
else:
print('│ Platform: Other │')
print('└─────────────────────────────────────────┘')
@staticmethod
def generate(length):
sample_string = 'abcdefghijklmnopqrstuvwxyz1234567890'
result = ''.join((random.choice(sample_string)) for x in range(int(length)))
return result
@staticmethod
def check_username(length):
username = App.generate(length)
try:
user = api.getUserObject(username)
return f'[-] Username @{username} is not available'
except:
return f'[+] Username @{username} is available'
# 672x796
@staticmethod
def run():
if platform.system() == 'Windows':
os.system('mode 84,40')
os.system('title TTUC - 0.0.1b - by philliphqs')
App.watermark()
length = input('Length: ')
limit = input('Checking limit (in seconds): ')
while True:
print(App.check_username(length))
try:
time.sleep(int(limit))
except:
pass
if __name__ == '__main__':
App.run()