├── README.md ├── account_details.txt ├── gmdotai.py └── query.txt /README.md: -------------------------------------------------------------------------------- 1 | 2 | # GM.AI 3 | GM.AI BOT 4 | 5 | Register Here : [GM.AI](https://t.me/gmdotaibot/Airdrop?startapp=ua9e28) 6 | 7 | 8 | ## Features 9 | 10 | - Auto Clear Task 11 | - Auto Create and Save Wallet 12 | - Multi Account 13 | - Auto Checkin 14 | 15 | 16 | 17 | ## Installation 18 | 19 | Install with python 20 | 21 | 1. Download python 22 | 2. Install Module (requests colorama) 23 | 3. Buka bot nya > inspect > jika muncul qrcode gapapa abaikan saja 24 | 4. Diapplication > session storage __telegram__initParams > copy tgwebappdata 25 | 5. Edit query.txt 26 | 6. python main.py 27 | 28 | -------------------------------------------------------------------------------- /account_details.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sirkel-testnet/gmdotai/aa8580472fec2e5e0f5cf6b970b5e76b133a8045/account_details.txt -------------------------------------------------------------------------------- /gmdotai.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from colorama import Fore, Style, init 3 | import json 4 | 5 | # Initialize colorama 6 | init() 7 | 8 | # Function to get quest list 9 | def get_quest_list(headers, category): 10 | url = f'https://mini-app-api.gm.ai/users/quests?take=40&page=1&sort_field=order&sort_type=ASC&category={category}' 11 | response = requests.get(url, headers=headers) 12 | return response.json() 13 | 14 | # Function to get balance 15 | def get_balance(headers): 16 | url = 'https://mini-app-api.gm.ai/users/profile' 17 | response = requests.get(url, headers=headers) 18 | return response.json() 19 | 20 | # Function to complete a quest 21 | def complete_quest(quest_id, quest_title, headers, telegram_name): 22 | url = 'https://mini-app-api.gm.ai/users/user-quest' 23 | data = { 24 | 'quest_id': quest_id 25 | } 26 | response = requests.put(url, headers=headers, json=data) 27 | completion_response = response.json() 28 | if completion_response.get('error') == 'Bad Request' and completion_response.get('message') == 'Quest already completed' and completion_response.get('statusCode') == 400: 29 | print(Fore.GREEN + Style.BRIGHT + f"{telegram_name} | Quest already completed {quest_title}" + Style.RESET_ALL) 30 | elif completion_response.get('messages') == 'Success': 31 | print(Fore.GREEN + Style.BRIGHT + f"{telegram_name} | Successfully completed quest {quest_title}" + Style.RESET_ALL) 32 | elif completion_response.get('message') == 'User not connect twitter': 33 | print(Fore.RED + f"{telegram_name} | Quest not connected to Twitter" + Style.RESET_ALL) 34 | else: 35 | print(Fore.RED + f"{telegram_name} | {quest_title} : {completion_response.get('message')}" + Style.RESET_ALL) 36 | return completion_response 37 | 38 | # Function to process quests 39 | def process_quests(headers, category, telegram_name): 40 | quest_list_response = get_quest_list(headers, category) 41 | if 'data' in quest_list_response and 'data' in quest_list_response['data']: 42 | quest_list = quest_list_response['data']['data'] 43 | if isinstance(quest_list, list): 44 | for quest in quest_list: 45 | if isinstance(quest, dict) and 'id' in quest: 46 | quest_id = quest['id'] 47 | quest_title = quest['title'] 48 | # print(quest) 49 | complete_quest(quest_id, quest_title, headers, telegram_name) 50 | else: 51 | print(Fore.RED + f"Unexpected quest format: {quest}" + Style.RESET_ALL) 52 | else: 53 | print(Fore.RED + "Unexpected quest list format: ", quest_list, Style.RESET_ALL) 54 | else: 55 | print(Fore.RED + "Unexpected quest list response format: ", quest_list_response, Style.RESET_ALL) 56 | 57 | # Function to get token using requests 58 | def get_token(auth_data): 59 | url = 'https://mini-app-api.gm.ai/users/login' 60 | params = { 61 | 'auth_data': auth_data 62 | } 63 | headers = { 64 | 'accept': '*/*', 65 | 'accept-language': 'en,id-ID;q=0.9,id;q=0.8,en-US;q=0.7', 66 | 'cache-control': 'no-cache', 67 | 'content-type': 'application/json', 68 | 'origin': 'https://mini-app.gm.ai', 69 | 'pragma': 'no-cache', 70 | 'priority': 'u=1, i', 71 | 'referer': 'https://mini-app.gm.ai/', 72 | 'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126", "Android WebView";v="126"', 73 | 'sec-ch-ua-mobile': '?1', 74 | 'sec-ch-ua-platform': '"Android"', 75 | 'sec-fetch-dest': 'empty', 76 | 'sec-fetch-mode': 'cors', 77 | 'sec-fetch-site': 'same-site', 78 | 'user-agent': 'Mozilla/5.0 (Linux; Android 13; M2012K11AG Build/TKQ1.220829.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.186 Mobile Safari/537.36', 79 | 'x-requested-with': 'org.telegram.messenger.web' 80 | } 81 | response = requests.get(url, headers=headers, params=params) 82 | response_json = response.json() 83 | return response_json['data']['accessToken'], response_json['data']['user']['telegram_name'] # Adjust this line based on the actual response structure 84 | 85 | # Function to process an account 86 | def check_and_create_wallet(headers, telegram_name): 87 | url = 'https://mini-app-api.gm.ai/users/quests?take=40&page=1&sort_field=order&sort_type=ASC&category=onboarding' 88 | response = requests.get(url, headers=headers) 89 | quest_list_response = response.json() 90 | 91 | if 'data' in quest_list_response and 'data' in quest_list_response['data']: 92 | quest_list = quest_list_response['data']['data'] 93 | for quest in quest_list: 94 | if quest['id'] == '7371196e-3ff6-4c25-bcce-b566cf7ee118': 95 | if quest['user_quest_status'] == 'success': 96 | print(Fore.GREEN + f"{telegram_name} | Wallet already connected" + Style.RESET_ALL) 97 | return 98 | break 99 | 100 | # Create new wallet 101 | url = 'https://mini-app-api.gm.ai/users/wallet' 102 | response = requests.post(url, headers=headers) 103 | wallet_response = response.json() 104 | 105 | if wallet_response.get('messages') == 'Success': 106 | mnemonic = wallet_response['data']['mnemonic'] 107 | print(Fore.GREEN + f"{telegram_name} | Wallet created: {mnemonic}" + Style.RESET_ALL) 108 | 109 | # Confirm wallet 110 | url = 'https://mini-app-api.gm.ai/users/wallet/confirm' 111 | response = requests.post(url, headers=headers) 112 | confirm_response = response.json() 113 | 114 | if confirm_response.get('messages') == 'Success': 115 | print(Fore.GREEN + f"{telegram_name} | Wallet confirmed" + Style.RESET_ALL) 116 | with open('account_details.txt', 'a') as file: 117 | file.write(f"{telegram_name} | {mnemonic}\n") 118 | else: 119 | print(Fore.RED + f"{telegram_name} | Wallet confirmation failed" + Style.RESET_ALL) 120 | else: 121 | print(Fore.RED + f"{telegram_name} | Wallet creation failed" + Style.RESET_ALL) 122 | 123 | # Function to process an account 124 | def process_account(auth_data): 125 | # Get token and telegram_name 126 | token, telegram_name = get_token(auth_data) 127 | 128 | # Set headers 129 | headers = { 130 | 'accept': '*/*', 131 | 'accept-language': 'en,id-ID;q=0.9,id;q=0.8,en-US;q=0.7', 132 | 'authorization': f'Bearer {token}', 133 | 'cache-control': 'no-cache', 134 | 'content-type': 'application/json', 135 | 'origin': 'https://mini-app.gm.ai', 136 | 'pragma': 'no-cache', 137 | 'priority': 'u=1, i', 138 | 'referer': 'https://mini-app.gm.ai/', 139 | 'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126", "Android WebView";v="126"', 140 | 'sec-ch-ua-mobile': '?1', 141 | 'sec-ch-ua-platform': '"Android"', 142 | 'sec-fetch-dest': 'empty', 143 | 'sec-fetch-mode': 'cors', 144 | 'sec-fetch-site': 'same-site', 145 | 'user-agent': 'Mozilla/5.0 (Linux; Android 13; M2012K11AG Build/TKQ1.220829.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.186 Mobile Safari/537.36', 146 | 'x-requested-with': 'org.telegram.messenger.web' 147 | } 148 | 149 | # Check and create wallet if necessary 150 | check_and_create_wallet(headers, telegram_name) 151 | 152 | # Process basic quests 153 | process_quests(headers, 'basic', telegram_name) 154 | 155 | # Process daily quests 156 | process_quests(headers, 'daily', telegram_name) 157 | 158 | # Get balance and Telegram name after completing all quests 159 | balance_response = get_balance(headers) 160 | if 'data' in balance_response: 161 | user_data = balance_response['data'] 162 | telegram_name = user_data.get('telegram_name', 'N/A') 163 | balance = user_data.get('total_point', 0) 164 | print(f"{Fore.YELLOW + Style.BRIGHT}{telegram_name} | Balance: {balance}\n\n") 165 | else: 166 | print(Fore.RED + "Unexpected balance response format: ", balance_response, Style.RESET_ALL) 167 | 168 | # Read auth_data from query.txt and process each account 169 | with open('query.txt', 'r') as file: 170 | for line in file: 171 | auth_data = line.strip() 172 | if auth_data: 173 | process_account(auth_data) -------------------------------------------------------------------------------- /query.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sirkel-testnet/gmdotai/aa8580472fec2e5e0f5cf6b970b5e76b133a8045/query.txt --------------------------------------------------------------------------------