-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
205 lines (186 loc) · 7.74 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
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
import json
import time
import random
import requests
from colorama import Fore, Style, init
from datetime import datetime
init(autoreset=True)
with open('users.json', 'r') as file:
users = json.load(file)
headers = {
"accept": "application/json",
"accept-encoding": "gzip",
"content-type": "application/x-www-form-urlencoded; charset=utf-8",
"host": "arichain.io",
"user-agent": "Dart/3.3 (dart:io)"
}
def print_timestamped(message, color=Fore.WHITE):
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
print(f"{Fore.LIGHTBLACK_EX}[{timestamp}]{Style.RESET_ALL} {color}{message}")
def fetch_proxy_info(proxy):
try:
response = requests.get("https://ipinfo.io", proxies={"http": proxy, "https": proxy})
if response.status_code == 200:
data = response.json()
ip = data.get("ip", "Unknown")
city = data.get("city", "Unknown")
country = data.get("country", "Unknown")
return ip, city, country
else:
return None, None, None
except Exception as e:
print_timestamped(f"Failed to fetch proxy info: {e}", Fore.RED)
return None, None, None
def first_request(email, proxy=None):
url = "https://arichain.io/api/wallet/get_list_mobile"
data = {
"blockchain": "testnet",
"email": email,
"lang": "en",
"device": "app",
"is_mobile": "Y"
}
try:
response = requests.post(url, headers=headers, data=data, proxies={"http": proxy, "https": proxy} if proxy else None)
if response.status_code == 200:
response_data = response.json()
if response_data.get("status") == "success":
print_timestamped("Login Success", Fore.GREEN)
balance = response_data["result"][0]["balance"]
print_timestamped(f"Balance: {balance}", Fore.CYAN)
return True
else:
print_timestamped("Login Failed", Fore.RED)
else:
print_timestamped(f"Request failed with status code: {response.status_code}", Fore.RED)
except Exception as e:
print_timestamped(f"Request failed: {e}", Fore.RED)
return False
def second_request(address, proxy=None):
url = "https://arichain.io/api/event/get_checkin"
data = {
"blockchain": "testnet",
"address": address,
"lang": "en",
"device": "app",
"is_mobile": "Y"
}
try:
response = requests.post(url, headers=headers, data=data, proxies={"http": proxy, "https": proxy} if proxy else None)
if response.status_code == 200:
response_data = response.json()
if response_data.get("status") == "success":
print_timestamped("Check-in data retrieved successfully", Fore.GREEN)
else:
print_timestamped("Failed to retrieve check-in data", Fore.RED)
else:
print_timestamped(f"Request failed with status code: {response.status_code}", Fore.RED)
except Exception as e:
print_timestamped(f"Request failed: {e}", Fore.RED)
def checkin_request(address, proxy=None):
url = "https://arichain.io/api/event/checkin"
data = {
"blockchain": "testnet",
"address": address,
"lang": "en",
"device": "app",
"is_mobile": "Y"
}
try:
response = requests.post(url, headers=headers, data=data, proxies={"http": proxy, "https": proxy} if proxy else None)
if response.status_code == 200:
response_data = response.json()
if "Already Checked in" in response.text:
print_timestamped("You already checked in Today", Fore.YELLOW)
else:
print_timestamped("Check-in Successful", Fore.GREEN)
else:
print_timestamped(f"idk bruh what happened: {response.status_code}", Fore.RED)
except Exception as e:
print_timestamped(f"Request failed: {e}", Fore.RED)
def third_request(address, proxy=None):
url = "https://arichain.io/api/event/quiz_q"
data = {
"blockchain": "testnet",
"address": address,
"lang": "en",
"device": "app",
"is_mobile": "Y"
}
try:
response = requests.post(url, headers=headers, data=data, proxies={"http": proxy, "https": proxy} if proxy else None)
if response.status_code == 200:
response_data = response.json()
if response_data.get("status") == "success":
quiz_idx = response_data["result"]["quiz_idx"]
q_idx = response_data["result"]["quiz_q"][0]["q_idx"]
print_timestamped(f"Quiz ID: {quiz_idx}, Question ID: {q_idx}", Fore.BLUE)
return quiz_idx, q_idx
else:
print_timestamped("Failed to retrieve quiz question", Fore.RED)
else:
print_timestamped(f"Request failed with status code: {response.status_code}", Fore.RED)
except Exception as e:
print_timestamped(f"Request failed: {e}", Fore.RED)
return None, None
def fourth_request(address, quiz_idx, answer_idx, proxy=None):
url = "https://arichain.io/api/event/quiz_a"
data = {
"blockchain": "testnet",
"address": address,
"quiz_idx": quiz_idx,
"answer_idx": answer_idx,
"lang": "en",
"device": "app",
"is_mobile": "Y"
}
try:
response = requests.post(url, headers=headers, data=data, proxies={"http": proxy, "https": proxy} if proxy else None)
if "Already taken quiz" in response.text:
print_timestamped("You already answered Quiz Today", Fore.YELLOW)
else:
print_timestamped("Quiz Answered Successfully", Fore.GREEN)
except Exception as e:
print_timestamped(f"Request failed: {e}", Fore.RED)
ascii_art = r"""
_ _ ____ _ _
/ \ _ __(_) / ___| |__ __ _(_)_ __
/ _ \ | '__| | | | | '_ \ / _` | | '_ \
/ ___ \| | | | | |___| | | | (_| | | | | |
/_/ \_\_| |_| \____|_| |_|\__,_|_|_| |_|
"""
print(ascii_art)
print(f"{Fore.GREEN}GitHub Profile: https://github.com/MrTimonM{Style.RESET_ALL}")
print(f"Accounts loaded: {len(users)}")
confirmation = input("Do you want to start the script? (yes/no): ").strip().lower()
if confirmation != "yes":
exit()
while True:
for user in users:
print_timestamped(f"Processing user: {user['name']}", Fore.YELLOW)
proxy = user.get("proxy")
if proxy:
ip, city, country = fetch_proxy_info(proxy)
if ip and city and country:
print_timestamped(f"Proxy connected - IP: {ip}, City: {city}, Country: {country}", Fore.GREEN)
else:
print_timestamped("Failed to fetch proxy info", Fore.RED)
else:
print_timestamped("No proxy provided", Fore.LIGHTBLACK_EX)
if first_request(user['email'], proxy):
time.sleep(3)
print_timestamped("Sleeping for 3 seconds...", Fore.LIGHTBLACK_EX)
second_request(user['wallet_address'], proxy)
time.sleep(2)
print_timestamped("Sleeping for 2 seconds...", Fore.LIGHTBLACK_EX)
checkin_request(user['wallet_address'], proxy)
time.sleep(5)
print_timestamped("Sleeping for 5 seconds...", Fore.LIGHTBLACK_EX)
quiz_idx, q_idx = third_request(user['wallet_address'], proxy)
if quiz_idx and q_idx:
fourth_request(user['wallet_address'], quiz_idx, q_idx, proxy)
print("\n")
sleep_duration = random.randint(25 * 3600, 26 * 3600)
print_timestamped("All accounts processed ", Fore.LIGHTBLACK_EX)
print_timestamped(Fore.GREEN + f"Sleeping for {sleep_duration // 3600} hours..." + Style.RESET_ALL)
time.sleep(sleep_duration)