-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXkucoin.py
208 lines (181 loc) · 8.09 KB
/
Xkucoin.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
import time
import requests
import random
import urllib.parse
import os
from colorama import Fore, Style, init
init(autoreset=True)
def clear_terminal():
os.system('cls' if os.name == 'nt' else 'clear')
def art():
print("\033[1;91m" + r"""
/$$ /$$
| $$ /$$/
| $$ /$$/ /$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$
| $$$$$/ |____ $$ /$$__ $$| $$ | $$| $$ | $$ |____ $$
| $$ $$ /$$$$$$$| $$ \ $$| $$ | $$| $$ | $$ /$$$$$$$
| $$\ $$ /$$__ $$| $$ | $$| $$ | $$| $$ | $$ /$$__ $$
| $$ \ $$| $$$$$$$| $$$$$$$| $$$$$$/| $$$$$$$| $$$$$$$
|__/ \__/ \_______/ \____ $$ \______/ \____ $$ \_______/
/$$ \ $$ /$$ | $$
| $$$$$$/ | $$$$$$/
\______/ \______/
""" + "\033[0m" + "\033[1;92m" + r"""
____ _ _ _
/ ___|| |__ (_)_ __ ___ _ __ ___ (_)_ _ __ _
\___ \| '_ \| | '_ \ / _ \| '_ ` _ \| | | | |/ _` |
___) | | | | | | | | (_) | | | | | | | |_| | (_| |
|____/|_| |_|_|_| |_|\___/|_| |_| |_|_|\__, |\__,_|
|___/
""" + "\033[0m\n\033[1;96m---------------------------------------\033[0m\n\033[1;93mScript created by: Kaguya Shinomiya\033[0m\n\033[1;92mJoin Telegram: \nhttps://t.me/Pumpbtcxyz\033[0m\n\033[1;91mVisit my GitHub: \nhttps://github.com/Kaguya1st\033[0m\n\033[1;96m---------------------------------------\033[0m\n\033[1;38;2;139;69;19;48;2;173;216;230m-------------[XKucoin Bot]-------------\033[0m\n\033[1;96m---------------------------------------\033[0m")
def countdown_timer(seconds):
while seconds > 0:
mins, secs = divmod(seconds, 60)
hours, mins = divmod(mins, 60)
print(f"{Fore.CYAN + Style.BRIGHT}Wait {hours:02}:{mins:02}:{secs:02}", end='\r')
time.sleep(1)
seconds -= 1
print("Wait 00:00:00 ", end='\r')
def read_data_file(file_path):
accounts = []
with open(file_path, "r") as file:
lines = file.readlines()
for line in lines:
encoded_data = line.strip()
if encoded_data:
accounts.append(encoded_data)
return accounts
def decode_data(encoded_data):
params = dict(item.split('=') for item in encoded_data.split('&'))
decoded_user = urllib.parse.unquote(params['user'])
decoded_start_param = urllib.parse.unquote(params['start_param'])
return {
"decoded_user": decoded_user,
"decoded_start_param": decoded_start_param,
"hash": params['hash'],
"auth_date": params['auth_date'],
"chat_type": params['chat_type'],
"chat_instance": params['chat_instance']
}
def login(decoded_data):
url = "https://www.kucoin.com/_api/xkucoin/platform-telebot/game/login?lang=en_US"
headers = {
"accept": "application/json",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/json",
"sec-ch-ua": "\"Chromium\";v=\"111\", \"Not(A:Brand\";v=\"8\"",
"sec-ch-ua-mobile": "?1",
"sec-ch-ua-platform": "\"Android\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-request-with": "null",
"Referer": "https://www.kucoin.com/miniapp/tap-game?inviterUserId=5496274031&rcode=QBSTAPN3"
}
body = {
"inviterUserId": "5496274031",
"extInfo": {
"hash": decoded_data['hash'],
"auth_date": decoded_data['auth_date'],
"via": "miniApp",
"user": decoded_data['decoded_user'],
"chat_type": decoded_data['chat_type'],
"chat_instance": decoded_data['chat_instance'],
"start_param": decoded_data['decoded_start_param']
}
}
session = requests.Session()
response = session.post(url, headers=headers, json=body)
cookie = '; '.join([f"{cookie.name}={cookie.value}" for cookie in session.cookies])
return cookie
def data(cookie):
url = "https://www.kucoin.com/_api/xkucoin/platform-telebot/game/summary?lang=en_US"
headers = {
"accept": "application/json",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/json",
"sec-ch-ua": "\"Chromium\";v=\"111\", \"Not(A:Brand\";v=\"8\"",
"sec-ch-ua-mobile": "?1",
"sec-ch-ua-platform": "\"Android\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-request-with": "null",
"Referer": "https://www.kucoin.com/miniapp/tap-game?inviterUserId=5496274031&rcode=QBSTAPN3",
"cookie": cookie
}
response = requests.get(url, headers=headers)
data = response.json()
balance = data.get("data").get("availableAmount")
molecule = data.get("data").get("feedPreview").get("molecule")
print(f"{Fore.GREEN + Style.BRIGHT}Balance: {Fore.WHITE + Style.BRIGHT}{balance}")
return molecule
def tap(cookie, molecule):
url = "https://www.kucoin.com/_api/xkucoin/platform-telebot/game/gold/increase?lang=en_US"
headers = {
"accept": "application/json",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\"Chromium\";v=\"111\", \"Not(A:Brand\";v=\"8\"",
"sec-ch-ua-mobile": "?1",
"sec-ch-ua-platform": "\"Android\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-request-with": "null",
"Referer": "https://www.kucoin.com/miniapp/tap-game?inviterUserId=5496274031&rcode=QBSTAPN3",
"cookie": cookie
}
total_increment = 0
while total_increment < 3000:
increment = random.randint(55, 60) # Randomize increment value each iteration
form_data = {
'increment': str(increment),
'molecule': str(molecule)
}
response = requests.post(url, headers=headers, data=form_data)
total_increment += increment
colors = [Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.RED]
random_color = random.choice(colors)
print(f"{random_color}{Style.BRIGHT}Tapped: {Fore.WHITE + Style.BRIGHT}{increment} | {random_color}Total Tap: {Fore.WHITE + Style.BRIGHT}{total_increment}/3000 {Style.RESET_ALL}")
time.sleep(2)
def new_balance(cookie):
url = "https://www.kucoin.com/_api/xkucoin/platform-telebot/game/summary?lang=en_US"
headers = {
"accept": "application/json",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/json",
"sec-ch-ua": "\"Chromium\";v=\"111\", \"Not(A:Brand\";v=\"8\"",
"sec-ch-ua-mobile": "?1",
"sec-ch-ua-platform": "\"Android\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-request-with": "null",
"Referer": "https://www.kucoin.com/miniapp/tap-game?inviterUserId=5496274031&rcode=QBSTAPN3",
"cookie": cookie
}
response = requests.get(url, headers=headers)
data = response.json()
balance = data.get("data").get("availableAmount")
print(f"{Fore.MAGENTA + Style.BRIGHT}New Balance: {balance}")
def main():
file_path = "data.txt"
encoded_data_list = read_data_file(file_path)
while True:
clear_terminal()
art()
for index, encoded_data in enumerate(encoded_data_list, start=1):
print(f"{Fore.CYAN + Style.BRIGHT}------Account No.{index}------")
try:
decoded_data = decode_data(encoded_data)
cookie = login(decoded_data)
molecule = data(cookie)
tap(cookie, molecule)
new_balance(cookie)
except Exception as e:
print(f"{Fore.RED + Style.BRIGHT}Error: {str(e)}")
print(f"{Fore.YELLOW + Style.BRIGHT}Retrying in 5 seconds...")
countdown_timer(5)
if __name__ == "__main__":
main()