Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests, time, urllib.parse, hashlib, json, threading, os, datetime, random; from pystyle import *
- class Xgorgon:
- def __init__(self, params: str, data: str, cookies: str) -> None:
- self.params = params
- self.data = data
- self.cookies = cookies
- def hash(self, data: str) -> str:
- _hash = str(
- hashlib.md5(
- data.encode()
- ).hexdigest()
- )
- return _hash
- def get_base_string(self) -> str:
- base_str = self.hash(self.params)
- base_str = (
- base_str + self.hash(self.data)
- if self.data
- else base_str + str(
- "0"
- *
- 32
- )
- )
- base_str = (
- base_str + self.hash(self.cookies)
- if self.cookies
- else base_str + str(
- "0"
- *
- 32
- )
- )
- return base_str
- def get_value(self) -> json:
- base_str = self.get_base_string()
- return self.encrypt(base_str)
- def encrypt(self, data: str) -> json:
- unix = int(time.time())
- len = 0x14
- key =[0xDF ,0x77 ,0xB9 ,0x40 ,0xB9 ,0x9B ,0x84 ,0x83 ,0xD1 ,0xB9 ,0xCB ,0xD1 ,0xF7 ,0xC2 ,0xB9 ,0x85 ,0xC3 ,0xD0 ,0xFB ,0xC3 ,]
- param_list = []
- for i in range(0, 12, 4):
- temp = data[8 * i : 8 * (i + 1)]
- for j in range(4):
- H = int(temp[j * 2 : (j + 1) * 2], 16)
- param_list.append(H)
- param_list.extend(
- [
- 0x0, 0x6, 0xB, 0x1C
- ]
- )
- H = int(
- hex(
- unix
- )
- , 16
- )
- param_list.append(
- (
- H & 0xFF000000
- )
- >> 24
- )
- param_list.append(
- (
- H & 0x00FF0000
- )
- >> 16
- )
- param_list.append(
- (
- H & 0x0000FF00
- )
- >> 8
- )
- param_list.append(
- (
- H & 0x000000FF
- )
- >> 0
- )
- eor_result_list = []
- for A, B in zip(param_list, key):
- eor_result_list.append(A ^ B)
- for i in range(len):
- C = self.reverse(eor_result_list[i])
- D = eor_result_list[
- (
- i + 1
- )
- % len
- ]
- E = C ^ D
- F = self.rbit_algorithm(E)
- H = (
- (
- F ^ 0xFFFFFFFF
- )
- ^ len
- ) & 0xFF
- eor_result_list[i] = H
- result = ""
- for param in eor_result_list:
- result += self.hex_string(param)
- return {
- "X-Gorgon": (
- "0404b0d30000"
- + result
- ),
- "X-Khronos": str(unix)
- }
- def rbit_algorithm(self, num):
- result = ""
- tmp_string = bin(num)[2:]
- while len(tmp_string) < 8:
- tmp_string = (
- "0"
- + tmp_string
- )
- for i in range(0, 8):
- result = (
- result
- + tmp_string[
- 7 - i
- ]
- )
- return int(result, 2)
- def hex_string(self, num):
- tmp_string = hex(num)[2:]
- if len(tmp_string) < 2:
- tmp_string = "0" + tmp_string
- return tmp_string
- def reverse(self, num):
- tmp_string = self.hex_string(num)
- return int(tmp_string[1:] + tmp_string[:1], 16)
- class Viewbot:
- def __init__(self, aweme_id):
- self.aweme_id = aweme_id
- self.views = 1
- self._start = time.time()
- self.lock = threading.Lock()
- self.devices = open('devices.txt', 'r').read().splitlines()
- def title(self):
- while True:
- speed = round(
- self.views
- /
- (
- int(
- time.time()
- - self._start
- )
- + 0.000001
- )
- , 1
- )
- os.system(f"title [Fujin] ~ ^&! Tekky#1337 ^| Speed: {speed}/s" if os.name == "nt" else "")
- def start(self):
- threading.Thread(target=self.title, daemon=True).start()
- while True:
- if threading.active_count() < 1000:
- threading.Thread(target=self.send, daemon=True).start()
- # time.sleep(0.1)
- def send(self):
- device = random.choice(self.devices)
- did = device.split(':')[0]
- iid = device.split(':')[1]
- # 7124456648194672133
- # 7124457577437595397
- querystring = {
- "os_api": "25",
- "device_type": "SM-G973N",
- "ssmix": "a",
- "manifest_version_code": "2021903030",
- "dpi": "320",
- "carrier_region": "IE",
- "uoo": "0",
- "region": "US",
- "carrier_region_v2": "310",
- "app_name": "musical_ly",
- "version_name": "19.3.3",
- "timezone_offset": "7200",
- "ts": int(time.time()),
- "ab_version": "19.3.3",
- "residence": "IE",
- "cpu_support64": "false",
- "current_region": "US",
- "ac2": "wifi",
- "ac": "wifi",
- "app_type": "normal",
- "host_abi": "armeabi-v7a",
- "channel": "googleplay",
- "update_version_code": "2021903030",
- "_rticket": int(round((time.time() * 1000)) + 0),
- "device_platform": "android",
- "iid": iid, #7122515864645289734
- "build_number": "19.3.3",
- "locale": "en",
- "op_region": "IE",
- "version_code": "190303",
- "timezone_name": "Africa/Harare",
- "cdid": "1fc627e2-6956-4df8-9dd8-ed499e2d71a7",
- "openudid": "0e96eaebc0c2e44f",
- "sys_region": "US",
- "device_id": did, #6888243656290108930
- "app_language": "en",
- "resolution": "1600*900",
- "device_brand": "samsung",
- "language": "en",
- "os_version": "7.1.2",
- "aid": "1233",
- "mcc_mnc": "31002"
- }
- params = urllib.parse.urlencode(querystring)
- payload = f"item_id={self.aweme_id}&sync_origin=false&first_install_time=1653681371&pre_item_playtime=303&follower_status=0&pre_hot_sentence=&pre_item_id=7124331934997597445&play_delta=1&action_time={int(time.time())}&aweme_type=0&follow_status=0"
- headers = {
- "x-ss-stub": str(
- hashlib.md5(
- payload.encode()
- ).hexdigest()
- ).upper(),
- "accept-encoding": "gzip",
- "passport-sdk-version": "19",
- "sdk-version": "2",
- "x-ss-req-ticket": str(int(round((time.time() * 1000)) + 0)),
- "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
- "host": "api16-va.tiktokv.com",
- "connection": "Keep-Alive",
- "user-agent": "okhttp/3.12.1"
- }
- url = "https://api16-va.tiktokv.com/aweme/v1/aweme/stats/?" + params
- gorgon = Xgorgon(params=params, data=payload, cookies=None).get_value()
- headers.update(gorgon)
- req = requests.post(url, data=payload, headers=headers).json()
- if req["status_code"] == 0:
- self.views += 1
- self.print(f"Views sent: {self.views}")
- else:
- print(req)
- def print(self, arg):
- self.lock.acquire()
- timestamp = datetime.datetime.utcfromtimestamp(int(time.time())).strftime('[%H:%M:%S] ~ ')
- print(
- "\r",
- end = ""
- )
- print(
- Colorate.Horizontal(
- Colors.red_to_purple,
- Center.XCenter(
- timestamp + arg
- )
- ,1
- ),
- end = ""
- )
- self.lock.release()
- if __name__ == "__main__":
- os.system("cls||clear")
- print(
- Colorate.Vertical(
- Colors.red_to_purple,
- Center.XCenter(
- f"""
- ███████╗██╗ ██╗ ██╗██╗███╗ ██╗
- ██╔════╝██║ ██║ ██║██║████╗ ██║
- █████╗ ██║ ██║ ██║██║██╔██╗ ██║
- ██╔══╝ ██║ ██║██ ██║██║██║╚██╗██║
- ██║ ╚██████╔╝╚█████╔╝██║██║ ╚████║
- ╚═╝ ╚═════╝ ╚════╝ ╚═╝╚═╝ ╚═══╝
- by &! Tekky#1337
- """
- )
- ,1
- )
- + "\n"
- )
- Viewbot("7114218070033337605").start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement