├── image.png
├── proxy.txt
├── requirements.txt
├── accounts.json
├── README.md
└── bot.py
/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vonssy/AiGaea-BOT/HEAD/image.png
--------------------------------------------------------------------------------
/proxy.txt:
--------------------------------------------------------------------------------
1 | ip:port # Default Protcol HTTP.
2 | protocol://ip:port
3 | protocol://user:pass@ip:port
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | aiohttp==3.11.10
2 | aiohttp-socks==0.9.1
3 | fake-useragent==1.5.1
4 | colorama==0.4.6
5 | pytz==2024.1
--------------------------------------------------------------------------------
/accounts.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "browserId": "Your browser_id 1",
4 | "gaeaToken": "Your aigaea_token 1"
5 | },
6 | {
7 | "browserId": "Your browser_id 2",
8 | "gaeaToken": "Your aigaea_token 2"
9 | }
10 | ]
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AI Gaea Network BOT
2 | AI Gaea Network BOT
3 |
4 | - Register Here : [AI Gaea Network](https://app.aigaea.net/register?ref=gaj5yIoPw8Osap)
5 | - Use Code: gaj5yIoPw8Osap
6 | - Download Extension
7 |
8 | ## Features
9 |
10 | - Auto Get Account Information
11 | - Auto Run With [Proxyscrape Free Proxy](https://proxyscrape.com/free-proxy-list) - `Choose 1`
12 | - Auto Run With Private Proxy - `Choose 2`
13 | - Auto Run Without Proxy - `Choose 3`
14 | - Auto Rotate Invalid Proxies - `y` or `n`
15 | - Auto Claim Daily Reward
16 | - Auto Complete Training
17 | - Auto Send Ping Every 10 Minutes
18 | - Multi Accounts With Threads
19 |
20 | ## Requiremnets
21 |
22 | - Make sure you have Python3.9 or higher installed and pip.
23 |
24 | ## Instalation
25 |
26 | 1. **Clone The Repositories:**
27 | ```bash
28 | git clone https://github.com/vonssy/AiGaea-BOT.git
29 | ```
30 | ```bash
31 | cd AiGaea-BOT
32 | ```
33 |
34 | 2. **Install Requirements:**
35 | ```bash
36 | pip install -r requirements.txt #or pip3 install -r requirements.txt
37 | ```
38 |
39 | ## Configuration
40 |
41 | ### Screenshots
42 |
43 |
44 |

45 |
46 |
47 | - **accounts.json:** You will find the file `accounts.json` inside the project directory. Make sure `accounts.json` contains data that matches the format expected by the script. Here are examples of file formats:
48 | ```json
49 | [
50 | {
51 | "browserId": "Your browser_id 1",
52 | "gaeaToken": "Your aigaea__token 1"
53 | },
54 | {
55 | "browserId": "Your browser_id 2",
56 | "gaeaToken": "Your aigaea__token 2"
57 | }
58 | ]
59 | ```
60 |
61 | - **proxy.txt:** You will find the file `proxy.txt` inside the project directory. Make sure `proxy.txt` contains data that matches the format expected by the script. Here are examples of file formats:
62 | ```bash
63 | ip:port # Default Protcol HTTP.
64 | protocol://ip:port
65 | protocol://user:pass@ip:port
66 | ```
67 |
68 | ## Run
69 |
70 | ```bash
71 | python bot.py #or python3 bot.py
72 | ```
73 |
74 | ## Buy Me a Coffee
75 |
76 | - **EVM:** 0xe3c9ef9a39e9eb0582e5b147026cae524338521a
77 | - **TON:** UQBEFv58DC4FUrGqinBB5PAQS7TzXSm5c1Fn6nkiet8kmehB
78 | - **SOL:** E1xkaJYmAFEj28NPHKhjbf7GcvfdjKdvXju8d8AeSunf
79 | - **SUI:** 0xa03726ecbbe00b31df6a61d7a59d02a7eedc39fe269532ceab97852a04cf3347
80 |
81 | Thank you for visiting this repository, don't forget to contribute in the form of follows and stars.
82 | If you have questions, find an issue, or have suggestions for improvement, feel free to contact me or open an *issue* in this GitHub repository.
83 |
84 | **vonssy**
--------------------------------------------------------------------------------
/bot.py:
--------------------------------------------------------------------------------
1 | from aiohttp import (
2 | ClientResponseError,
3 | ClientSession,
4 | ClientTimeout,
5 | BasicAuth
6 | )
7 | from aiohttp_socks import ProxyConnector
8 | from fake_useragent import FakeUserAgent
9 | from datetime import datetime
10 | from colorama import *
11 | import asyncio, base64, time, json, re, os, pytz
12 |
13 | wib = pytz.timezone('Asia/Jakarta')
14 |
15 | class AiGaea:
16 | def __init__(self) -> None:
17 | self.headers = {
18 | "Accept": "*/*",
19 | "Accept-Language": "id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7",
20 | "Origin": "https://app.aigaea.net",
21 | "Referer": "https://app.aigaea.net/",
22 | "Sec-Fetch-Dest": "empty",
23 | "Sec-Fetch-Mode": "cors",
24 | "Sec-Fetch-Site": "same-site",
25 | "User-Agent": FakeUserAgent().random
26 | }
27 | self.BASE_API = "https://api.aigaea.net/api"
28 | self.proxies = []
29 | self.proxy_index = 0
30 | self.account_proxies = {}
31 | self.gaea_tokens = {}
32 | self.browser_ids = {}
33 | self.usernames = {}
34 |
35 | def clear_terminal(self):
36 | os.system('cls' if os.name == 'nt' else 'clear')
37 |
38 | def log(self, message):
39 | print(
40 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}"
41 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}{message}",
42 | flush=True
43 | )
44 |
45 | def welcome(self):
46 | print(
47 | f"""
48 | {Fore.GREEN + Style.BRIGHT}AI Gaea {Fore.BLUE + Style.BRIGHT}Auto BOT
49 | """
50 | f"""
51 | {Fore.GREEN + Style.BRIGHT}Rey? {Fore.YELLOW + Style.BRIGHT}
52 | """
53 | )
54 |
55 | def format_seconds(self, seconds):
56 | hours, remainder = divmod(seconds, 3600)
57 | minutes, seconds = divmod(remainder, 60)
58 | return f"{int(hours):02}:{int(minutes):02}:{int(seconds):02}"
59 |
60 | def load_accounts(self):
61 | filename = "accounts.json"
62 | try:
63 | if not os.path.exists(filename):
64 | self.log(f"{Fore.RED}File {filename} Not Found.{Style.RESET_ALL}")
65 | return
66 |
67 | with open(filename, 'r') as file:
68 | data = json.load(file)
69 | if isinstance(data, list):
70 | return data
71 | return []
72 | except json.JSONDecodeError:
73 | return []
74 |
75 | async def load_proxies(self, use_proxy_choice: int):
76 | filename = "proxy.txt"
77 | try:
78 | if use_proxy_choice == 1:
79 | async with ClientSession(timeout=ClientTimeout(total=30)) as session:
80 | async with session.get("https://raw.githubusercontent.com/monosans/proxy-list/refs/heads/main/proxies/http.txt") as response:
81 | response.raise_for_status()
82 | content = await response.text()
83 | with open(filename, 'w') as f:
84 | f.write(content)
85 | self.proxies = [line.strip() for line in content.splitlines() if line.strip()]
86 | else:
87 | if not os.path.exists(filename):
88 | self.log(f"{Fore.RED + Style.BRIGHT}File {filename} Not Found.{Style.RESET_ALL}")
89 | return
90 | with open(filename, 'r') as f:
91 | self.proxies = [line.strip() for line in f.read().splitlines() if line.strip()]
92 |
93 | if not self.proxies:
94 | self.log(f"{Fore.RED + Style.BRIGHT}No Proxies Found.{Style.RESET_ALL}")
95 | return
96 |
97 | self.log(
98 | f"{Fore.GREEN + Style.BRIGHT}Proxies Total : {Style.RESET_ALL}"
99 | f"{Fore.WHITE + Style.BRIGHT}{len(self.proxies)}{Style.RESET_ALL}"
100 | )
101 |
102 | except Exception as e:
103 | self.log(f"{Fore.RED + Style.BRIGHT}Failed To Load Proxies: {e}{Style.RESET_ALL}")
104 | self.proxies = []
105 |
106 | def check_proxy_schemes(self, proxies):
107 | schemes = ["http://", "https://", "socks4://", "socks5://"]
108 | if any(proxies.startswith(scheme) for scheme in schemes):
109 | return proxies
110 | return f"http://{proxies}"
111 |
112 | def get_next_proxy_for_account(self, account):
113 | if account not in self.account_proxies:
114 | if not self.proxies:
115 | return None
116 | proxy = self.check_proxy_schemes(self.proxies[self.proxy_index])
117 | self.account_proxies[account] = proxy
118 | self.proxy_index = (self.proxy_index + 1) % len(self.proxies)
119 | return self.account_proxies[account]
120 |
121 | def rotate_proxy_for_account(self, account):
122 | if not self.proxies:
123 | return None
124 | proxy = self.check_proxy_schemes(self.proxies[self.proxy_index])
125 | self.account_proxies[account] = proxy
126 | self.proxy_index = (self.proxy_index + 1) % len(self.proxies)
127 | return proxy
128 |
129 | def build_proxy_config(self, proxy=None):
130 | if not proxy:
131 | return None, None, None
132 |
133 | if proxy.startswith("socks"):
134 | connector = ProxyConnector.from_url(proxy)
135 | return connector, None, None
136 |
137 | elif proxy.startswith("http"):
138 | match = re.match(r"http://(.*?):(.*?)@(.*)", proxy)
139 | if match:
140 | username, password, host_port = match.groups()
141 | clean_url = f"http://{host_port}"
142 | auth = BasicAuth(username, password)
143 | return None, clean_url, auth
144 | else:
145 | return None, proxy, None
146 |
147 | raise Exception("Unsupported Proxy Type.")
148 |
149 | def decode_token(self, token: str):
150 | try:
151 | header, payload, signature = token.split(".")
152 | decoded_payload = base64.urlsafe_b64decode(payload + "==").decode("utf-8")
153 | parsed_payload = json.loads(decoded_payload)
154 | username = parsed_payload["username"]
155 | user_id = parsed_payload["userid"]
156 | exp_time = parsed_payload["expire"]
157 |
158 | return username, user_id, exp_time
159 | except Exception as e:
160 | return None, None, None
161 |
162 | def generate_ping_payload(self, user_id: str):
163 | try:
164 | payload = {
165 | "uid":user_id,
166 | "browser_id":self.browser_ids[user_id],
167 | "timestamp":int(time.time()),
168 | "version":"3.0.20"
169 | }
170 |
171 | return payload
172 | except Exception as e:
173 | raise Exception(f"Generate Req Payload Failed: {str(e)}")
174 |
175 | def print_message(self, account, proxy, color, message):
176 | self.log(
177 | f"{Fore.CYAN + Style.BRIGHT}[ Account:{Style.RESET_ALL}"
178 | f"{Fore.WHITE + Style.BRIGHT} {account} {Style.RESET_ALL}"
179 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
180 | f"{Fore.CYAN + Style.BRIGHT} Proxy: {Style.RESET_ALL}"
181 | f"{Fore.WHITE + Style.BRIGHT}{proxy}{Style.RESET_ALL}"
182 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
183 | f"{Fore.CYAN + Style.BRIGHT}Status:{Style.RESET_ALL}"
184 | f"{color + Style.BRIGHT} {message} {Style.RESET_ALL}"
185 | f"{Fore.CYAN + Style.BRIGHT}]{Style.RESET_ALL}"
186 | )
187 |
188 | def print_question(self):
189 | while True:
190 | try:
191 | print(f"{Fore.WHITE + Style.BRIGHT}1. Run With Proxyscrape Free Proxy{Style.RESET_ALL}")
192 | print(f"{Fore.WHITE + Style.BRIGHT}2. Run With Private Proxy{Style.RESET_ALL}")
193 | print(f"{Fore.WHITE + Style.BRIGHT}3. Run Without Proxy{Style.RESET_ALL}")
194 | choose = int(input(f"{Fore.BLUE + Style.BRIGHT}Choose [1/2/3] -> {Style.RESET_ALL}").strip())
195 |
196 | if choose in [1, 2, 3]:
197 | proxy_type = (
198 | "With Proxyscrape Free" if choose == 1 else
199 | "With Private" if choose == 2 else
200 | "Without"
201 | )
202 | print(f"{Fore.GREEN + Style.BRIGHT}Run {proxy_type} Proxy Selected.{Style.RESET_ALL}")
203 | break
204 | else:
205 | print(f"{Fore.RED + Style.BRIGHT}Please enter either 1, 2 or 3.{Style.RESET_ALL}")
206 | except ValueError:
207 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number (1, 2 or 3).{Style.RESET_ALL}")
208 |
209 | rotate = False
210 | if choose in [1, 2]:
211 | while True:
212 | rotate = input(f"{Fore.BLUE + Style.BRIGHT}Rotate Invalid Proxy? [y/n] -> {Style.RESET_ALL}").strip()
213 | if rotate in ["y", "n"]:
214 | rotate = rotate == "y"
215 | break
216 | else:
217 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter 'y' or 'n'.{Style.RESET_ALL}")
218 |
219 | return choose, rotate
220 |
221 | async def check_connection(self, user_id: str, proxy_url=None):
222 | url = f"{self.BASE_API}/network/ip"
223 | headers = {
224 | **self.headers,
225 | "Authorization": f"Bearer {self.gaea_tokens[user_id]}",
226 | "Content-Type": "application/json"
227 | }
228 | connector, proxy, proxy_auth = self.build_proxy_config(proxy_url)
229 | try:
230 | async with ClientSession(connector=connector, timeout=ClientTimeout(total=60)) as session:
231 | async with session.get(url=url, headers=headers, proxy=proxy, proxy_auth=proxy_auth) as response:
232 | response.raise_for_status()
233 | return await response.json()
234 | except (Exception, ClientResponseError) as e:
235 | self.print_message(self.usernames[user_id], proxy, Fore.RED, f"Connection Not 200 OK: {Fore.YELLOW+Style.BRIGHT}{str(e)}")
236 |
237 | return None
238 |
239 | async def user_earning(self, user_id: str, proxy_url=None, retries=5):
240 | url = f"{self.BASE_API}/earn/info"
241 | headers = {
242 | **self.headers,
243 | "Authorization": f"Bearer {self.gaea_tokens[user_id]}",
244 | "Content-Type": "application/json"
245 | }
246 | for attempt in range(retries):
247 | connector, proxy, proxy_auth = self.build_proxy_config(proxy_url)
248 | try:
249 | async with ClientSession(connector=connector, timeout=ClientTimeout(total=60)) as session:
250 | async with session.get(url=url, headers=headers, proxy=proxy, proxy_auth=proxy_auth) as response:
251 | response.raise_for_status()
252 | return await response.json()
253 | except (Exception, ClientResponseError) as e:
254 | if attempt < retries - 1:
255 | await asyncio.sleep(5)
256 | continue
257 | self.print_message(self.usernames[user_id], proxy, Fore.RED, f"GET Earning Data Failed: {Fore.YELLOW+Style.BRIGHT}{str(e)}")
258 |
259 | return None
260 |
261 | async def daily_list(self, user_id: str, proxy_url=None, retries=5):
262 | url = f"{self.BASE_API}/reward/daily-list"
263 | headers = {
264 | **self.headers,
265 | "Authorization": f"Bearer {self.gaea_tokens[user_id]}",
266 | "Content-Type": "application/json"
267 | }
268 | for attempt in range(retries):
269 | connector, proxy, proxy_auth = self.build_proxy_config(proxy_url)
270 | try:
271 | async with ClientSession(connector=connector, timeout=ClientTimeout(total=60)) as session:
272 | async with session.get(url=url, headers=headers, proxy=proxy, proxy_auth=proxy_auth) as response:
273 | response.raise_for_status()
274 | return await response.json()
275 | except (Exception, ClientResponseError) as e:
276 | if attempt < retries - 1:
277 | await asyncio.sleep(5)
278 | continue
279 | self.print_message(self.usernames[user_id], proxy, Fore.RED, f"GET Daily Reward Data Failed: {Fore.YELLOW+Style.BRIGHT}{str(e)}")
280 |
281 | return None
282 |
283 | async def complete_daily(self, user_id: str, daily_id: int, proxy_url=None, retries=5):
284 | url = f"{self.BASE_API}/reward/daily-complete"
285 | data = json.dumps({"id":daily_id})
286 | headers = {
287 | **self.headers,
288 | "Authorization": f"Bearer {self.gaea_tokens[user_id]}",
289 | "Content-Length": str(len(data)),
290 | "Content-Type": "application/json"
291 | }
292 | for attempt in range(retries):
293 | connector, proxy, proxy_auth = self.build_proxy_config(proxy_url)
294 | try:
295 | async with ClientSession(connector=connector, timeout=ClientTimeout(total=60)) as session:
296 | async with session.post(url=url, headers=headers, data=data, proxy=proxy, proxy_auth=proxy_auth) as response:
297 | response.raise_for_status()
298 | return await response.json()
299 | except (Exception, ClientResponseError) as e:
300 | if attempt < retries - 1:
301 | await asyncio.sleep(5)
302 | continue
303 | self.print_message(self.usernames[user_id], proxy, Fore.RED, f"Daily Reward Not Claimed: {Fore.YELLOW+Style.BRIGHT}{str(e)}")
304 |
305 | return None
306 |
307 | async def complete_training(self, user_id: str, proxy_url=None, retries=5):
308 | url = f"{self.BASE_API}/ai/complete"
309 | data = json.dumps({"detail":"2_0_0"})
310 | headers = {
311 | **self.headers,
312 | "Authorization": f"Bearer {self.gaea_tokens[user_id]}",
313 | "Content-Length": str(len(data)),
314 | "Content-Type": "application/json"
315 | }
316 | for attempt in range(retries):
317 | connector, proxy, proxy_auth = self.build_proxy_config(proxy_url)
318 | try:
319 | async with ClientSession(connector=connector, timeout=ClientTimeout(total=60)) as session:
320 | async with session.post(url=url, headers=headers, data=data, proxy=proxy, proxy_auth=proxy_auth) as response:
321 | response.raise_for_status()
322 | return await response.json()
323 | except (Exception, ClientResponseError) as e:
324 | if attempt < retries - 1:
325 | await asyncio.sleep(5)
326 | continue
327 | self.print_message(self.usernames[user_id], proxy, Fore.RED, f"Training Not Completed: {Fore.YELLOW+Style.BRIGHT}{str(e)}")
328 |
329 | return None
330 |
331 | async def send_ping(self, user_id: str, proxy_url=None, retries=5):
332 | url = f"{self.BASE_API}/network/ping"
333 | data = json.dumps(self.generate_ping_payload(user_id))
334 | headers = {
335 | "Accept": "*/*",
336 | "Accept-Language": "id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7",
337 | "Authorization": f"Bearer {self.gaea_tokens[user_id]}",
338 | "Content-Length": str(len(data)),
339 | "Content-Type": "application/json",
340 | "Origin": "chrome-extension://cpjicfogbgognnifjgmenmaldnmeeeib",
341 | "Sec-Fetch-Dest": "empty",
342 | "Sec-Fetch-Mode": "cors",
343 | "Sec-Fetch-Site": "none",
344 | "Sec-Fetch-Storage-Access": "active",
345 | "User-Agent": FakeUserAgent().random
346 | }
347 | for attempt in range(retries):
348 | connector, proxy, proxy_auth = self.build_proxy_config(proxy_url)
349 | try:
350 | async with ClientSession(connector=connector, timeout=ClientTimeout(total=60)) as session:
351 | async with session.post(url=url, headers=headers, data=data, proxy=proxy, proxy_auth=proxy_auth) as response:
352 | response.raise_for_status()
353 | return await response.json()
354 | except (Exception, ClientResponseError) as e:
355 | if attempt < retries - 1:
356 | await asyncio.sleep(5)
357 | continue
358 | self.print_message(self.usernames[user_id], proxy, Fore.RED, f"PING Failed: {Fore.YELLOW+Style.BRIGHT}{str(e)}")
359 |
360 | return None
361 |
362 | async def process_check_connection(self, user_id: str, use_proxy: bool, rotate_proxy: bool):
363 | while True:
364 | proxy = self.get_next_proxy_for_account(user_id) if use_proxy else None
365 |
366 | is_valid = await self.check_connection(user_id, proxy)
367 | if is_valid and is_valid.get("code") == 200:
368 | country = is_valid["data"]["country"]
369 | host = is_valid["data"]["host"]
370 |
371 | self.print_message(self.usernames[user_id], proxy, Fore.GREEN, "Connection 200 OK"
372 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
373 | f"{Fore.CYAN + Style.BRIGHT}Country:{Style.RESET_ALL}"
374 | f"{Fore.WHITE + Style.BRIGHT} {country} {Style.RESET_ALL}"
375 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
376 | f"{Fore.CYAN + Style.BRIGHT} Connected Host: {Style.RESET_ALL}"
377 | f"{Fore.WHITE + Style.BRIGHT}{host}{Style.RESET_ALL}"
378 | )
379 | return True
380 |
381 | if rotate_proxy:
382 | proxy = self.rotate_proxy_for_account(user_id)
383 |
384 | async def process_user_earning(self, user_id: str, use_proxy: bool):
385 | while True:
386 | proxy = self.get_next_proxy_for_account(user_id) if use_proxy else None
387 |
388 | earning = await self.user_earning(user_id, proxy)
389 | if earning and earning.get("code") == 200:
390 | today = earning["data"]["today_gaea"]
391 | total = earning["data"]["era_gaea"]
392 | soul = earning["data"]["total_soul"]
393 | core = earning["data"]["total_core"]
394 | uptime = earning["data"]["today_uptime"]
395 |
396 | self.print_message(self.usernames[user_id], proxy, Fore.BLUE, "Earning "
397 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
398 | f"{Fore.CYAN + Style.BRIGHT} Today Gaea: {Style.RESET_ALL}"
399 | f"{Fore.WHITE + Style.BRIGHT}{today} PTS{Style.RESET_ALL}"
400 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
401 | f"{Fore.CYAN + Style.BRIGHT}Total Gaea:{Style.RESET_ALL}"
402 | f"{Fore.WHITE + Style.BRIGHT} {total} PTS {Style.RESET_ALL}"
403 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
404 | f"{Fore.CYAN + Style.BRIGHT} Soul: {Style.RESET_ALL}"
405 | f"{Fore.WHITE + Style.BRIGHT}{soul} PTS{Style.RESET_ALL}"
406 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
407 | f"{Fore.CYAN + Style.BRIGHT}Core:{Style.RESET_ALL}"
408 | f"{Fore.WHITE + Style.BRIGHT} {core} PTS {Style.RESET_ALL}"
409 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
410 | f"{Fore.CYAN + Style.BRIGHT} Today Uptime: {Style.RESET_ALL}"
411 | f"{Fore.WHITE + Style.BRIGHT}{uptime} Minutes{Style.RESET_ALL}"
412 | )
413 |
414 | await asyncio.sleep(30 * 60)
415 |
416 | async def process_claim_daily_Reward(self, user_id: str, use_proxy: bool):
417 | while True:
418 | proxy = self.get_next_proxy_for_account(user_id) if use_proxy else None
419 |
420 | daily = await self.daily_list(user_id, proxy)
421 | if daily and daily.get("code") == 200:
422 | status = daily["data"]["today"]
423 | lists = daily["data"]["list"]
424 |
425 | if status == 0:
426 | for list in lists:
427 | daily_id = list["daily"]
428 | reward = list["reward"]
429 |
430 | if reward == "":
431 | claim = await self.complete_daily(user_id, daily_id, proxy)
432 | if claim and claim.get("code") == 200:
433 | soul = claim["data"]["soul"]
434 | core = claim["data"]["core"]
435 | blindbox = claim["data"]["blindbox"]
436 |
437 | self.print_message(self.usernames[user_id], proxy, Fore.GREEN, "Daily Reward Claimed Successfully "
438 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
439 | f"{Fore.CYAN + Style.BRIGHT} Reward: {Style.RESET_ALL}"
440 | f"{Fore.WHITE + Style.BRIGHT}{soul} Soul PTS{Style.RESET_ALL}"
441 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
442 | f"{Fore.WHITE + Style.BRIGHT}{core} Core PTS{Style.RESET_ALL}"
443 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
444 | f"{Fore.WHITE + Style.BRIGHT}{blindbox} Blindbox{Style.RESET_ALL}"
445 | )
446 |
447 | break
448 |
449 | else:
450 | self.print_message(self.usernames[user_id], proxy, Fore.YELLOW, "Daily Reward Already Claimed")
451 |
452 | await asyncio.sleep(12 * 60 * 60)
453 |
454 | async def process_complete_training(self, user_id: str, use_proxy: bool):
455 | while True:
456 | proxy = self.get_next_proxy_for_account(user_id) if use_proxy else None
457 |
458 | train = await self.complete_training(user_id, proxy)
459 | if train and train.get("code") == 200:
460 | burned_points = train["data"]["burned_points"]
461 | soul = train["data"]["soul"]
462 | blindbox = train["data"]["blindbox"]
463 |
464 | self.print_message(self.usernames[user_id], proxy, Fore.GREEN, "Training Completed Successfully "
465 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
466 | f"{Fore.WHITE + Style.BRIGHT} Burned {burned_points} Gaea PTS {Style.RESET_ALL}"
467 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
468 | f"{Fore.CYAN + Style.BRIGHT} Reward: {Style.RESET_ALL}"
469 | f"{Fore.WHITE + Style.BRIGHT}{soul} Soul PTS{Style.RESET_ALL}"
470 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
471 | f"{Fore.WHITE + Style.BRIGHT}{blindbox} Blindbox{Style.RESET_ALL}"
472 | )
473 | elif train and train.get("code") == 400:
474 | self.print_message(self.usernames[user_id], proxy, Fore.YELLOW, "Today Training Already Completed")
475 |
476 | await asyncio.sleep(12 * 60 * 60)
477 |
478 | async def process_send_ping(self, user_id: str, use_proxy: bool):
479 | while True:
480 | proxy = self.get_next_proxy_for_account(user_id) if use_proxy else None
481 |
482 | print(
483 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}"
484 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}"
485 | f"{Fore.BLUE + Style.BRIGHT}Try to Sent Ping...{Style.RESET_ALL}",
486 | end="\r",
487 | flush=True
488 | )
489 |
490 | ping = await self.send_ping(user_id, proxy)
491 | if ping and ping.get("code") == 200:
492 | score = ping["data"]["score"]
493 |
494 | self.print_message(self.usernames[user_id], proxy, Fore.GREEN,"PING Success "
495 | f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
496 | f"{Fore.CYAN + Style.BRIGHT} Network Score: {Style.RESET_ALL}"
497 | f"{Fore.WHITE + Style.BRIGHT}{score}{Style.RESET_ALL}"
498 | )
499 |
500 | print(
501 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}"
502 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}"
503 | f"{Fore.BLUE + Style.BRIGHT}Wait For 10 Minutes For Next Ping...{Style.RESET_ALL}",
504 | end="\r",
505 | flush=True
506 | )
507 | await asyncio.sleep(10 * 60)
508 |
509 | async def process_accounts(self, user_id: str, use_proxy: bool, rotate_proxy: bool):
510 | is_valid = await self.process_check_connection(user_id, use_proxy, rotate_proxy)
511 | if is_valid:
512 | tasks = [
513 | asyncio.create_task(self.process_user_earning(user_id, use_proxy)),
514 | asyncio.create_task(self.process_claim_daily_Reward(user_id, use_proxy)),
515 | asyncio.create_task(self.process_complete_training(user_id, use_proxy)),
516 | asyncio.create_task(self.process_send_ping(user_id, use_proxy))
517 | ]
518 | await asyncio.gather(*tasks)
519 |
520 | async def main(self):
521 | try:
522 | accounts = self.load_accounts()
523 | if not accounts:
524 | self.log(f"{Fore.RED+Style.BRIGHT}No Accounts Loaded.{Style.RESET_ALL}")
525 | return
526 |
527 | use_proxy_choice, rotate_proxy = self.print_question()
528 |
529 | use_proxy = False
530 | if use_proxy_choice in [1, 2]:
531 | use_proxy = True
532 |
533 | self.clear_terminal()
534 | self.welcome()
535 | self.log(
536 | f"{Fore.GREEN + Style.BRIGHT}Account's Total: {Style.RESET_ALL}"
537 | f"{Fore.WHITE + Style.BRIGHT}{len(accounts)}{Style.RESET_ALL}"
538 | )
539 |
540 | if use_proxy:
541 | await self.load_proxies(use_proxy_choice)
542 |
543 | self.log(f"{Fore.CYAN + Style.BRIGHT}={Style.RESET_ALL}"*75)
544 |
545 | tasks = []
546 | for idx, account in enumerate(accounts, start=1):
547 | if account:
548 | gaea_token = account["gaeaToken"]
549 | browser_id = account["browserId"]
550 |
551 | if not gaea_token or not browser_id:
552 | self.log(
553 | f"{Fore.CYAN + Style.BRIGHT}[ Account: {Style.RESET_ALL}"
554 | f"{Fore.WHITE + Style.BRIGHT}{idx}{Style.RESET_ALL}"
555 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
556 | f"{Fore.CYAN + Style.BRIGHT}Status:{Style.RESET_ALL}"
557 | f"{Fore.RED + Style.BRIGHT} Invalid Account Data {Style.RESET_ALL}"
558 | f"{Fore.CYAN + Style.BRIGHT}]{Style.RESET_ALL}"
559 | )
560 | continue
561 |
562 | username, user_id, exp_time = self.decode_token(gaea_token)
563 |
564 | if not username or not user_id or not exp_time:
565 | self.log(
566 | f"{Fore.CYAN + Style.BRIGHT}[ Account: {Style.RESET_ALL}"
567 | f"{Fore.WHITE + Style.BRIGHT}{idx}{Style.RESET_ALL}"
568 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
569 | f"{Fore.CYAN + Style.BRIGHT}Status:{Style.RESET_ALL}"
570 | f"{Fore.RED + Style.BRIGHT} Invalid Gaea Token {Style.RESET_ALL}"
571 | f"{Fore.CYAN + Style.BRIGHT}]{Style.RESET_ALL}"
572 | )
573 | continue
574 |
575 | if int(time.time()) > exp_time:
576 | self.log(
577 | f"{Fore.CYAN + Style.BRIGHT}[ Account: {Style.RESET_ALL}"
578 | f"{Fore.WHITE + Style.BRIGHT}{username}{Style.RESET_ALL}"
579 | f"{Fore.MAGENTA + Style.BRIGHT} - {Style.RESET_ALL}"
580 | f"{Fore.CYAN + Style.BRIGHT}Status:{Style.RESET_ALL}"
581 | f"{Fore.RED + Style.BRIGHT} Gaea Token Already Expired {Style.RESET_ALL}"
582 | f"{Fore.CYAN + Style.BRIGHT}]{Style.RESET_ALL}"
583 | )
584 | continue
585 |
586 | self.gaea_tokens[user_id] = gaea_token
587 | self.browser_ids[user_id] = browser_id
588 | self.usernames[user_id] = username
589 |
590 | tasks.append(asyncio.create_task(self.process_accounts(user_id, use_proxy, rotate_proxy)))
591 |
592 | await asyncio.gather(*tasks)
593 |
594 | except Exception as e:
595 | self.log(f"{Fore.RED+Style.BRIGHT}Error: {e}{Style.RESET_ALL}")
596 | raise e
597 |
598 | if __name__ == "__main__":
599 | try:
600 | bot = AiGaea()
601 | asyncio.run(bot.main())
602 | except KeyboardInterrupt:
603 | print(
604 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}"
605 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}"
606 | f"{Fore.RED + Style.BRIGHT}[ EXIT ] AI Gaea - BOT{Style.RESET_ALL} "
607 | )
--------------------------------------------------------------------------------