├── README.md └── tds.py /README.md: -------------------------------------------------------------------------------- 1 | # tds_tiktok 2 | Tool auto tiktok traodoisub android free 3 | 4 | # Lệnh setup Tool 5 | - apt update 6 | - pkg update 7 | - pkg install python 8 | - pkg install git 9 | - git clone https://github.com/ntt3005/tds_tiktok.git 10 | - cd tds_tiktok 11 | - python tds.py 12 | 13 | # Công cụ kết hợp 14 | - Termux 15 | - Macrorify 16 | - Tiktok hoặc tiktok lite 17 | - Link tải termux và Macrorify https://drive.google.com/drive/folders/1MsLq81u2PWxQGVo4QdsE1z2uVEIfm5s_?usp=sharing 18 | 19 | # Lệnh chạy 20 | python tds.py 21 | 22 | # Video hướng dẫn 23 | Đang cập nhật 24 | -------------------------------------------------------------------------------- /tds.py: -------------------------------------------------------------------------------- 1 | #Coded by Traodoisub.com 2 | import os 3 | from time import sleep 4 | from datetime import datetime 5 | 6 | os.environ['TZ'] = 'Asia/Ho_Chi_Minh' 7 | 8 | try: 9 | import requests 10 | except: 11 | os.system("pip3 install requests") 12 | import requests 13 | 14 | try: 15 | from pystyle import Colors, Colorate, Write, Center, Add, Box 16 | except: 17 | os.system("pip3 install pystyle") 18 | from pystyle import Colors, Colorate, Write, Center, Add, Box 19 | 20 | headers = { 21 | 'authority': 'traodoisub.com', 22 | 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 23 | 'accept-language': 'en-US,en;q=0.9,vi;q=0.8', 24 | 'user-agent': 'traodoisub tiktok tool', 25 | } 26 | 27 | def login_tds(token): 28 | try: 29 | r = requests.get('https://traodoisub.com/api/?fields=profile&access_token='+token, headers=headers, timeout=5).json() 30 | if 'success' in r: 31 | os.system('clear') 32 | print(Colors.green + f"Đăng nhập thành công!\nUser: {Colors.yellow + r['data']['user'] + Colors.green} | Xu hiện tại: {Colors.yellow + r['data']['xu']}") 33 | return 'success' 34 | else: 35 | print(Colors.red + f"Token TDS không hợp lệ, hãy kiểm tra lại!\n") 36 | return 'error_token' 37 | except: 38 | return 'error' 39 | 40 | def load_job(type_job, token): 41 | try: 42 | r = requests.get('https://traodoisub.com/api/?fields='+type_job+'&access_token='+token, headers=headers, timeout=5).json() 43 | if 'data' in r: 44 | return r 45 | elif "countdown" in r: 46 | sleep(round(r['countdown'])) 47 | print(Colors.red + f"{r['error']}\n") 48 | return 'error_countdown' 49 | else: 50 | print(Colors.red + f"{r['error']}\n") 51 | return 'error_error' 52 | except: 53 | return 'error' 54 | 55 | def duyet_job(type_job, token, uid): 56 | try: 57 | r = requests.get(f'https://traodoisub.com/api/coin/?type={type_job}&id={uid}&access_token={token}', headers=headers, timeout=5).json() 58 | if "cache" in r: 59 | return r['cache'] 60 | elif "success" in r: 61 | dai = f'{Colors.yellow}------------------------------------------' 62 | print(dai) 63 | print(f"{Colors.cyan}Nhận thành công {r['data']['job_success']} nhiệm vụ | {Colors.green}{r['data']['msg']} | {Colors.yellow}{r['data']['xu']}") 64 | print(dai) 65 | return 'error' 66 | else: 67 | print(f"{Colors.red}{r['error']}") 68 | return 'error' 69 | except: 70 | return 'error' 71 | 72 | 73 | def check_tiktok(id_tiktok, token): 74 | try: 75 | r = requests.get('https://traodoisub.com/api/?fields=tiktok_run&id='+id_tiktok+'&access_token='+token, headers=headers, timeout=5).json() 76 | if 'success' in r: 77 | os.system('clear') 78 | print(Colors.green + f"{r['data']['msg']}|ID: {Colors.yellow + r['data']['id'] + Colors.green}") 79 | return 'success' 80 | else: 81 | print(Colors.red + f"{r['error']}\n") 82 | return 'error_token' 83 | except: 84 | return 'error' 85 | 86 | 87 | os.system('clear') 88 | banner = r''' 89 | ████████╗██████╗ ███████╗ 90 | ╚══██╔══╝██╔══██╗██╔════╝ 91 | ██║ ██║ ██║███████╗ 92 | ██║ ██║ ██║╚════██║ 93 | ██║ ██████╔╝███████║ 94 | ╚═╝ ╚═════╝ ╚══════╝ 95 | ''' 96 | gach = '=========================================' 97 | option = f'''{gach}{Colors.green} 98 | Danh sách nhiệm vu tool hỗ trợ: {Colors.red} 99 | 1. Follow 100 | 2. Tym 101 | {Colors.yellow}{gach} 102 | ''' 103 | option_acc = f'''{gach}{Colors.green} 104 | Danh sách lựa chọn: {Colors.red} 105 | 1. Tiếp tục sử dụng acc TDS đã lưu 106 | 2. Sử dụng acc TDS mới 107 | {Colors.yellow}{gach} 108 | ''' 109 | print(Colorate.Horizontal(Colors.yellow_to_red, Center.XCenter(banner))) 110 | print(Colors.red + Center.XCenter(Box.DoubleCube("Tool TDS tiktok free version 1.0"))) 111 | 112 | 113 | while True: 114 | try: 115 | f = open(f'TDS.txt','r') 116 | token_tds = f.read() 117 | f.close() 118 | cache = 'old' 119 | except FileNotFoundError: 120 | token_tds = Write.Input("Nhập token TDS:", Colors.green_to_yellow, interval=0.0025) 121 | cache = 'new' 122 | 123 | for _ in range(3): 124 | check_log = login_tds(token_tds) 125 | if check_log == 'success' or check_log == 'error_token': 126 | break 127 | else: 128 | sleep(2) 129 | 130 | if check_log == 'success': 131 | if cache == 'old': 132 | while True: 133 | print(option_acc) 134 | try: 135 | choice = int(Write.Input("Lựa chọn của bạn là (Ví dụ: sử dụng acc cũ nhập 1):", Colors.green_to_yellow, interval=0.0025)) 136 | if choice in [1,2]: 137 | break 138 | else: 139 | os.system('clear') 140 | print(Colors.red + f"Lỗi lựa chọn!! Chỉ nhập 1 hoặc 2\n") 141 | except: 142 | os.system('clear') 143 | print(Colors.red + f"Lỗi lựa chọn!! Chỉ nhập 1 hoặc 2\n") 144 | 145 | os.system('clear') 146 | if choice == 1: 147 | break 148 | else: 149 | os.remove('TDS.txt') 150 | 151 | else: 152 | f = open(f'TDS.txt', 'w') 153 | f.write(f'{token_tds}') 154 | f.close() 155 | break 156 | else: 157 | sleep(1) 158 | os.system('clear') 159 | 160 | if check_log == 'success': 161 | #Nhập user tiktok 162 | while True: 163 | id_tiktok = Write.Input("Nhập ID tiktok chạy (lấy ở mục cấu hình web):", Colors.green_to_yellow, interval=0.0025) 164 | for _ in range(3): 165 | check_log = check_tiktok(id_tiktok,token_tds) 166 | if check_log == 'success' or check_log == 'error_token': 167 | break 168 | else: 169 | sleep(2) 170 | 171 | if check_log == 'success': 172 | break 173 | elif check_log == 'error_token': 174 | os.system('clear') 175 | print(Colors.red + f"ID tiktok chưa được thêm vào cấu hình, vui lòng thêm vào cấu hình rồi nhập lại!\n") 176 | else: 177 | os.system('clear') 178 | print(Colors.red + f"Lỗi sever vui lòng nhập lại!\n") 179 | 180 | #Lựa chọn nhiệm vụ 181 | while True: 182 | print(option) 183 | try: 184 | choice = int(Write.Input("Lựa chọn nhiệm vụ muốn làm (Ví dụ: Follow nhập 1):", Colors.green_to_yellow, interval=0.0025)) 185 | if choice in [1,2]: 186 | break 187 | else: 188 | os.system('clear') 189 | print(Colors.red + f"Lỗi lựa chọn!! Chỉ nhập 1 hoặc 2\n") 190 | except: 191 | os.system('clear') 192 | print(Colors.red + f"Lỗi lựa chọn!! Chỉ nhập 1 hoặc 2\n") 193 | 194 | #Nhập delay nhiệm vụ 195 | while True: 196 | try: 197 | delay = int(Write.Input("Thời gian delay giữa các job (giây):", Colors.green_to_yellow, interval=0.0025)) 198 | if delay > 1: 199 | break 200 | else: 201 | os.system('clear') 202 | print(Colors.red + f"Delay tối thiểu là 3\n") 203 | except: 204 | os.system('clear') 205 | print(Colors.red + f"Vui lòng nhập một số > 2\n") 206 | 207 | #Nhập max nhiệm vụ 208 | while True: 209 | try: 210 | max_job = int(Write.Input("Dừng lại khi làm được số nhiệm vụ là:", Colors.green_to_yellow, interval=0.0025)) 211 | if max_job > 9: 212 | break 213 | else: 214 | os.system('clear') 215 | print(Colors.red + f"Tối thiểu là 10\n") 216 | except: 217 | os.system('clear') 218 | print(Colors.red + f"Vui lòng nhập một số > 9\n") 219 | 220 | os.system('clear') 221 | 222 | if choice == 1: 223 | type_load = 'tiktok_follow' 224 | type_duyet = 'TIKTOK_FOLLOW_CACHE' 225 | type_nhan = 'TIKTOK_FOLLOW' 226 | type_type = 'FOLLOW' 227 | api_type = 'TIKTOK_FOLLOW_API' 228 | elif choice == 2: 229 | type_load = 'tiktok_like' 230 | type_duyet = 'TIKTOK_LIKE_CACHE' 231 | type_nhan = 'TIKTOK_LIKE' 232 | api_type = 'TIKTOK_LIKE_API' 233 | type_type = 'TYM' 234 | 235 | dem_tong = 0 236 | 237 | while True: 238 | list_job = load_job(type_load, token_tds) 239 | sleep(2) 240 | if isinstance(list_job, dict) == True: 241 | for job in list_job['data']: 242 | uid = job['id'] 243 | link = job['link'] 244 | os.system(f'termux-open-url {link}') 245 | check_duyet = duyet_job(type_duyet, token_tds, uid) 246 | 247 | if check_duyet != 'error': 248 | dem_tong += 1 249 | t_now = datetime.now().strftime("%H:%M:%S") 250 | print(f'{Colors.yellow}[{dem_tong}] {Colors.red}| {Colors.cyan}{t_now} {Colors.red}| {Colors.pink}{type_type} {Colors.red}| {Colors.light_gray}{uid}') 251 | 252 | if check_duyet > 9: 253 | sleep(3) 254 | a = duyet_job(type_nhan, token_tds, api_type) 255 | 256 | 257 | if dem_tong == max_job: 258 | break 259 | else: 260 | for i in range(delay,-1,-1): 261 | print(Colors.green + 'Vui lòng đợi: '+str(i)+' giây',end=('\r')) 262 | sleep(1) 263 | 264 | if dem_tong == max_job: 265 | print(f'{Colors.green}Hoàn thành {max_job} nhiệm vụ!') 266 | break 267 | 268 | 269 | 270 | --------------------------------------------------------------------------------