├── query.txt ├── config.json ├── .gitignore ├── requirements.txt ├── README.md ├── main.py ├── agent.py └── banana.py /query.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "intercept":"4138c1862becb652d78590e849075134" 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .vscode 3 | venv 4 | .DS_Store 5 | query.txt 6 | query.txt 7 | query_bak.txt 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | colorama==0.4.6 2 | fake-useragent==1.5.1 3 | pytz==2024.1 4 | Requests==2.32.3 5 | cloudscraper 6 | pycryptodome -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BANANA Bot 2 | BANANA Bot 3 | 4 | support my github channel 5 | 6 | Register Here : [BANANA Bot](https://t.me/OfficialBananaBot/banana?startapp=referral=8D8HGK5) 7 | 8 | Join to My Telegram Group : [S4NSGroup](https://t.me/sansxgroup) 9 | 10 | 11 | ## Tutorial 12 | 13 | Install with python 14 | 15 | 1. Download Python > install 16 | 2. run in cmd pip install -r requirements.txt(if have requirements.txt) 17 | 3. create file query.txt 18 | 4. Open Bot Banana in web & open inspect webview 19 | 5. Open Application > Session Storage > copy all tgWebAppData/tgAppData ex: query=xxxxx/user=xxxxx 20 | 21 | 22 | ## Features 23 | - Auto Claim Bot 24 | - Auto Clear Task 25 | - Auto Lottery 26 | 27 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import random 2 | from banana import Banana, print_timestamp 3 | from colorama import Fore, Style, init 4 | import time 5 | import sys 6 | 7 | def load_credentials(): 8 | try: 9 | with open('query.txt', 'r') as f: 10 | queries = [line.strip() for line in f.readlines()] 11 | return queries 12 | except FileNotFoundError: 13 | print("File query.txt tidak ditemukan.") 14 | return [ ] 15 | except Exception as e: 16 | print("Terjadi kesalahan saat memuat token:", str(e)) 17 | return [ ] 18 | 19 | def main(): 20 | init(autoreset=True) 21 | delay = random.randint(14400, 14550) 22 | prints = """ 23 | =========== t.me/sansxgroup =========== 24 | 25 | """ 26 | ban = Banana() 27 | print(prints) 28 | while True: 29 | queries = load_credentials() 30 | 31 | start_time = time.time() 32 | assets = 0 33 | peels = 0 34 | for index, query in enumerate(queries): 35 | token = ban.login(query=query) 36 | time.sleep(2) 37 | get_user = ban.get_user_info(token=token) 38 | print_timestamp( 39 | f"{Fore.CYAN + Style.BRIGHT}[ {get_user['data']['username']} 🤖 ]{Style.RESET_ALL}" 40 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 41 | f"{Fore.YELLOW + Style.BRIGHT}[ Peel {get_user['data']['peel']} 🍌 ]{Style.RESET_ALL}" 42 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 43 | f"{Fore.GREEN + Style.BRIGHT}[ USDT {get_user['data']['usdt']} 🤑 ]{Style.RESET_ALL}" 44 | ) 45 | assets += get_user['data']['usdt'] 46 | peels += get_user['data']['peel'] 47 | time.sleep(2) 48 | ban.clear_quest(token=token) 49 | time.sleep(2) 50 | ban.get_lottery_info(token=token) 51 | time.sleep(2) 52 | ban.get_banana_list(token=token) 53 | print_timestamp(f"{Fore.WHITE + Style.BRIGHT}=-={Style.RESET_ALL}" * 10) 54 | 55 | end_time = time.time() 56 | total = delay - (end_time-start_time) 57 | hours, remainder = divmod(total, 3600) 58 | minutes, seconds = divmod(remainder, 60) 59 | print_timestamp(f"[ Total Assets : {assets} USDT | {peels} Peels ]") 60 | print(f"{Fore.YELLOW + Style.BRIGHT}[ {round(hours)} Hours {round(minutes)} Minutes {round(seconds)} Seconds Remaining To Process All Account ]{Style.RESET_ALL}", end="\r", flush=True) 61 | time.sleep(total) 62 | print() 63 | 64 | 65 | if __name__ == '__main__': 66 | try: 67 | main() 68 | except Exception as e: 69 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 70 | except KeyboardInterrupt: 71 | sys.exit(0) -------------------------------------------------------------------------------- /agent.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def generate_random_user_agent(device_type='android', browser_type='chrome'): 4 | chrome_versions = list(range(110, 127)) 5 | firefox_versions = list(range(90, 100)) 6 | 7 | if browser_type == 'chrome': 8 | major_version = random.choice(chrome_versions) 9 | minor_version = random.randint(0, 9) 10 | build_version = random.randint(1000, 9999) 11 | patch_version = random.randint(0, 99) 12 | browser_version = f"{major_version}.{minor_version}.{build_version}.{patch_version}" 13 | elif browser_type == 'firefox': 14 | browser_version = random.choice(firefox_versions) 15 | 16 | if device_type == 'android': 17 | android_versions = ['10.0', '11.0', '12.0', '13.0'] 18 | android_device = random.choice([ 19 | 'SM-G960F', 'Pixel 5', 'SM-A505F', 'Pixel 4a', 'Pixel 6 Pro', 'SM-N975F', 20 | 'SM-G973F', 'Pixel 3', 'SM-G980F', 'Pixel 5a', 'SM-G998B', 'Pixel 4', 21 | 'SM-G991B', 'SM-G996B', 'SM-F711B', 'SM-F916B', 'SM-G781B', 'SM-N986B', 22 | 'SM-N981B', 'Pixel 2', 'Pixel 2 XL', 'Pixel 3 XL', 'Pixel 4 XL', 23 | 'Pixel 5 XL', 'Pixel 6', 'Pixel 6 XL', 'Pixel 6a', 'Pixel 7', 'Pixel 7 Pro', 24 | 'OnePlus 8', 'OnePlus 8 Pro', 'OnePlus 9', 'OnePlus 9 Pro', 'OnePlus Nord', 'OnePlus Nord 2', 25 | 'OnePlus Nord CE', 'OnePlus 10', 'OnePlus 10 Pro', 'OnePlus 10T', 'OnePlus 10T Pro', 26 | 'Xiaomi Mi 9', 'Xiaomi Mi 10', 'Xiaomi Mi 11', 'Xiaomi Redmi Note 8', 'Xiaomi Redmi Note 9', 27 | 'Huawei P30', 'Huawei P40', 'Huawei Mate 30', 'Huawei Mate 40', 'Sony Xperia 1', 28 | 'Sony Xperia 5', 'LG G8', 'LG V50', 'LG V60', 'Nokia 8.3', 'Nokia 9 PureView' 29 | ]) 30 | android_version = random.choice(android_versions) 31 | if browser_type == 'chrome': 32 | return (f"Mozilla/5.0 (Linux; Android {android_version}; {android_device}) AppleWebKit/537.36 " 33 | f"(KHTML, like Gecko) Chrome/{browser_version} Mobile Safari/537.36") 34 | elif browser_type == 'firefox': 35 | return (f"Mozilla/5.0 (Android {android_version}; Mobile; rv:{browser_version}.0) " 36 | f"Gecko/{browser_version}.0 Firefox/{browser_version}.0") 37 | 38 | elif device_type == 'ios': 39 | ios_versions = ['13.0', '14.0', '15.0', '16.0'] 40 | ios_version = random.choice(ios_versions) 41 | if browser_type == 'chrome': 42 | return (f"Mozilla/5.0 (iPhone; CPU iPhone OS {ios_version.replace('.', '_')} like Mac OS X) " 43 | f"AppleWebKit/537.36 (KHTML, like Gecko) CriOS/{browser_version} Mobile/15E148 Safari/604.1") 44 | elif browser_type == 'firefox': 45 | return (f"Mozilla/5.0 (iPhone; CPU iPhone OS {ios_version.replace('.', '_')} like Mac OS X) " 46 | f"AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/{browser_version}.0 Mobile/15E148 Safari/605.1.15") 47 | 48 | elif device_type == 'windows': 49 | windows_versions = ['10.0', '11.0'] 50 | windows_version = random.choice(windows_versions) 51 | if browser_type == 'chrome': 52 | return (f"Mozilla/5.0 (Windows NT {windows_version}; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " 53 | f"Chrome/{browser_version} Safari/537.36") 54 | elif browser_type == 'firefox': 55 | return (f"Mozilla/5.0 (Windows NT {windows_version}; Win64; x64; rv:{browser_version}.0) " 56 | f"Gecko/{browser_version}.0 Firefox/{browser_version}.0") 57 | 58 | elif device_type == 'ubuntu': 59 | if browser_type == 'chrome': 60 | return (f"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) AppleWebKit/537.36 (KHTML, like Gecko) " 61 | f"Chrome/{browser_version} Safari/537.36") 62 | elif browser_type == 'firefox': 63 | return (f"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:{browser_version}.0) Gecko/{browser_version}.0 " 64 | f"Firefox/{browser_version}.0") 65 | 66 | return None -------------------------------------------------------------------------------- /banana.py: -------------------------------------------------------------------------------- 1 | import json 2 | from Crypto.Cipher import AES 3 | from Crypto import Random 4 | from colorama import Fore, Style 5 | from datetime import datetime 6 | from fake_useragent import FakeUserAgent 7 | import pytz 8 | import time 9 | import cloudscraper 10 | import base64 11 | import hashlib 12 | 13 | from agent import generate_random_user_agent 14 | requests = cloudscraper.create_scraper() 15 | 16 | def print_timestamp(message, timezone='Asia/Jakarta'): 17 | local_tz = pytz.timezone(timezone) 18 | now = datetime.now(local_tz) 19 | timestamp = now.strftime(f'%x %X %Z') 20 | print( 21 | f"{Fore.BLUE + Style.BRIGHT}[ {timestamp} ]{Style.RESET_ALL}" 22 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 23 | f"{message}" 24 | ) 25 | 26 | def make_request(method, url, headers, json=None, data=None): 27 | retry_count = 0 28 | while True: 29 | time.sleep(2) 30 | if method.upper() == "GET": 31 | response = requests.get(url, headers=headers, json=json) 32 | elif method.upper() == "POST": 33 | response = requests.post(url, headers=headers, json=json, data=data) 34 | elif method.upper() == "PUT": 35 | response = requests.put(url, headers=headers, json=json, data=data) 36 | else: 37 | raise ValueError("Invalid method.") 38 | 39 | if response.status_code >= 500: 40 | if retry_count >= 4: 41 | print_timestamp(f"Status Code: {response.status_code} | Server Down") 42 | return None 43 | retry_count += 1 44 | elif response.status_code >= 400: 45 | print_timestamp(f"Status Code: {response.status_code} | {response.text}") 46 | return None 47 | elif response.status_code >= 200: 48 | return response.json() 49 | 50 | 51 | 52 | class Banana: 53 | def __init__(self): 54 | file_path = 'config.json' 55 | with open(file_path, 'r') as file: 56 | data = json.load(file) 57 | intercept_value = data.get('intercept') 58 | self.headers = { 59 | 'Accept': 'application/json, text/plain, */*', 60 | 'Connection': 'keep-alive', 61 | 'Content-Type': 'application/json', 62 | 'Origin': 'https://banana.carv.io', 63 | 'Referer': 'https://banana.carv.io/', 64 | 'sec-fetch-dest': 'empty', 65 | 'sec-fetch-mode': 'cors', 66 | 'priority': 'u=1, i', 67 | 'sec-fetch-site': 'same-site', 68 | 'User-Agent': generate_random_user_agent(), 69 | 'x-app-id': 'carv' 70 | } 71 | 72 | def pads(self, s): 73 | BS = 16 74 | return s + (BS - len(s) % BS) * chr(BS - len(s) % BS) 75 | 76 | def SA(self, e=None): 77 | if e is None: 78 | e = int(time.time() * 1000) 79 | 80 | def encrypt(t, n): 81 | n = str(n).zfill(16)[:16] 82 | n = n.encode('utf-8') 83 | t = str(t).encode('utf-8') 84 | cipher = AES.new(n, AES.MODE_CBC, iv=n) 85 | padded = self.pads(t.decode('utf-8')) 86 | encrypted = cipher.encrypt(padded.encode('utf-8')) 87 | hex_str = ''.join([format(b, '02x') for b in encrypted]) 88 | return hex_str 89 | 90 | wA = "https://interface.carv.io" 91 | xA = "EWbnkc7qHBtenQee" 92 | 93 | result = encrypt(str(e), xA) 94 | # print(result) 95 | return result 96 | 97 | def pad(self, s): 98 | block_size = 16 99 | padding = block_size - len(s.encode('utf-8')) % block_size 100 | return s + chr(padding) * padding 101 | 102 | def get_key_and_iv(self, password, salt, klen=32, ilen=16, msgdgst='md5'): 103 | password = password.encode('utf-8') 104 | maxlen = klen + ilen 105 | keyiv = b'' 106 | prev = b'' 107 | while len(keyiv) < maxlen: 108 | prev = hashlib.md5(prev + password + salt).digest() 109 | keyiv += prev 110 | key = keyiv[:klen] 111 | iv = keyiv[klen:klen+ilen] 112 | return key, iv 113 | 114 | def encrypt_timestamp(self, timestamp, password): 115 | salt = Random.new().read(8) 116 | key, iv = self.get_key_and_iv(password, salt) 117 | cipher = AES.new(key, AES.MODE_CBC, iv) 118 | padded_timestamp = self.pad(timestamp) 119 | encrypted = cipher.encrypt(padded_timestamp.encode('utf-8')) 120 | encrypted_data = b"Salted__" + salt + encrypted 121 | encrypted_b64 = base64.b64encode(encrypted_data).decode('utf-8') 122 | return encrypted_b64 123 | 124 | 125 | 126 | def login(self, query): 127 | x_interceptor_id = self.SA() 128 | url = 'https://interface.carv.io/banana/login' 129 | headers = { 130 | **self.headers, 131 | "X-Interceptor-Id": x_interceptor_id 132 | } 133 | while True: 134 | payload = { 135 | 'tgInfo': query, 136 | } 137 | time.sleep(2) 138 | response = make_request('post', url, headers=headers, json=payload) 139 | data = response 140 | token = f"{data['data']['token']}" 141 | return f"Bearer {token}" 142 | 143 | def get_user_info(self, token: str): 144 | url = 'https://interface.carv.io/banana/get_user_info' 145 | x_interceptor_id = self.SA() 146 | headers = { 147 | **self.headers, 148 | 'authorization' : token, 149 | "X-Interceptor-Id": x_interceptor_id 150 | } 151 | try: 152 | response = make_request('get', url, headers=headers) 153 | return response 154 | except (Exception) as e: 155 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 156 | 157 | def get_lottery_info(self, token: str): 158 | url = 'https://interface.carv.io/banana/get_lottery_info' 159 | x_interceptor_id = self.SA() 160 | headers = { 161 | **self.headers, 162 | 'authorization' : token, 163 | "X-Interceptor-Id": x_interceptor_id 164 | } 165 | 166 | try: 167 | get_user = self.get_user_info(token=token) 168 | response = make_request('get', url, headers=headers) 169 | data = response 170 | if get_user['data']['max_click_count'] > get_user['data']['today_click_count']: 171 | click = self.do_click(token=token, click_count=get_user['data']['max_click_count'] - get_user['data']['today_click_count']) 172 | if click['msg'] == "Success": 173 | print_timestamp(f"{Fore.GREEN + Style.BRIGHT}[ Clicked {click['data']['peel']} 🍌 ]{Style.RESET_ALL}") 174 | else: 175 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {click['msg']} ]{Style.RESET_ALL}") 176 | else: 177 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ Out Of Clicks, Banana Break 😋 ]{Style.RESET_ALL}") 178 | 179 | now = datetime.now() 180 | last_countdown_start_time = datetime.fromtimestamp(data['data']['last_countdown_start_time'] / 1000) 181 | countdown_interval_minutes = data['data']['countdown_interval'] 182 | 183 | elapsed_time_minutes = (now - last_countdown_start_time).total_seconds() / 60 184 | remaining_time_minutes = max(countdown_interval_minutes - elapsed_time_minutes, 0) 185 | if remaining_time_minutes > 0 and data['data']['countdown_end'] == False: 186 | hours, remainder = divmod(remaining_time_minutes * 60, 3600) 187 | minutes, seconds = divmod(remainder, 60) 188 | print_timestamp(f"{Fore.BLUE + Style.BRIGHT}[ Claim Your Banana In {int(hours)} Hours {int(minutes)} Minutes {int(seconds)} Seconds ]{Style.RESET_ALL}") 189 | else: 190 | claim_lottery = self.claim_lottery(token=token, lottery_type=1) 191 | if claim_lottery['msg'] == "Success": 192 | print_timestamp(f"{Fore.GREEN + Style.BRIGHT}[ Lottery Claimed 🍌 ]{Style.RESET_ALL}") 193 | time.sleep(2) 194 | print_timestamp('Claim Ads') 195 | ads = self.claim_ads(token=token, type=2) 196 | if ads is not None: 197 | code = ads.get('code',0) 198 | if code == 0: 199 | data = ads.get('data',{}) 200 | print_timestamp(f"income : {data.get('income',0)} | peels : {data.get('peels',0)} | speedup : {data.get('speedup',0)}") 201 | else: 202 | print_timestamp(f"Code : {code} | msg : {ads.get('msg')}") 203 | speedup_count = get_user['data']['speedup_count'] 204 | if speedup_count > 0: 205 | # time.sleep(2) 206 | # ads = self.claim_ads(token=token, type=1) 207 | # if ads is not None: 208 | # code = ads.get('code',0) 209 | # if code == 0: 210 | # data = ads.get('data',{}) 211 | # print_timestamp(f"income : {data.get('income',0)} | peels : {data.get('peels',0)} | speedup : {data.get('speedup',0)}") 212 | # else: 213 | # print_timestamp(f"Code : {code} | msg : {ads.get('msg')}") 214 | time.sleep(2) 215 | speedup = self.do_speedup(token=token) 216 | if speedup['msg'] == "Success": 217 | print_timestamp(f"{Fore.GREEN + Style.BRIGHT}[ Speedup Applied ]") 218 | else: 219 | time.sleep(2) 220 | ads = self.claim_ads(token=token, type=1) 221 | if ads is not None: 222 | code = ads.get('code',0) 223 | if code == 0: 224 | data = ads.get('data',{}) 225 | print_timestamp(f"income : {data.get('income',0)} | peels : {data.get('peels',0)} | speedup : {data.get('speedup',0)}") 226 | speedup = {data.get('speedup',0)} 227 | if speedup != 0: 228 | time.sleep(2) 229 | speedup = self.do_speedup(token=token) 230 | if speedup['msg'] == "Success": 231 | print_timestamp(f"{Fore.GREEN + Style.BRIGHT}[ Speedup Applied ]") 232 | else: 233 | print_timestamp(f"Code : {code} | msg : {ads.get('msg')}") 234 | else: 235 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {claim_lottery['msg']} ]{Style.RESET_ALL}") 236 | time.sleep(2) 237 | 238 | 239 | get_lottery = self.get_user_info(token=token) 240 | harvest = get_lottery['data']['lottery_info']['remain_lottery_count'] 241 | while harvest > 0: 242 | time.sleep(10) 243 | self.do_lottery(token=token) 244 | harvest -= 1 245 | except (Exception) as e: 246 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 247 | 248 | def do_click(self, token: str, click_count: int): 249 | url = 'https://interface.carv.io/banana/do_click' 250 | x_interceptor_id = self.SA() 251 | headers = { 252 | **self.headers, 253 | 'authorization' : token, 254 | "X-Interceptor-Id": x_interceptor_id 255 | } 256 | payload = { 257 | 'clickCount': click_count 258 | } 259 | try: 260 | response = make_request('post', url, headers=headers, json=payload) 261 | return response 262 | except (Exception) as e: 263 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 264 | 265 | def do_speedup(self, token: str): 266 | url = 'https://interface.carv.io/banana/do_speedup' 267 | x_interceptor_id = self.SA() 268 | headers = { 269 | **self.headers, 270 | 'authorization' : token, 271 | "X-Interceptor-Id": x_interceptor_id 272 | } 273 | payload = {} 274 | try: 275 | response = make_request('post', url, headers=headers, json=payload) 276 | return response 277 | except (Exception) as e: 278 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 279 | 280 | def claim_lottery(self, token: str, lottery_type: int): 281 | url = 'https://interface.carv.io/banana/claim_lottery' 282 | x_interceptor_id = self.SA() 283 | headers = { 284 | **self.headers, 285 | 'authorization' : token, 286 | "X-Interceptor-Id": x_interceptor_id 287 | } 288 | payload = { 289 | 'claimLotteryType': lottery_type 290 | } 291 | try: 292 | response = make_request('post', url, headers=headers, json=payload) 293 | return response 294 | except (Exception) as e: 295 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 296 | 297 | def do_lottery(self, token: str): 298 | url = 'https://interface.carv.io/banana/do_lottery' 299 | timestamp = str(int(time.process_time() * 1000)) 300 | encrypted_timestamp = self.encrypt_timestamp(timestamp, "1,1,0") 301 | x_interceptor_id = self.SA() 302 | headers = { 303 | **self.headers, 304 | 'authorization' : token, 305 | "Request-Time": encrypted_timestamp, 306 | "X-Interceptor-Id": x_interceptor_id 307 | } 308 | payload = {} 309 | 310 | response = make_request('post', url, headers=headers, json=payload) 311 | data = response 312 | if data['msg'] == "Success": 313 | print_timestamp( 314 | f"{Fore.YELLOW + Style.BRIGHT}[ {data['data']['banana_info']['name']} 🍌 ]{Style.RESET_ALL}" 315 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 316 | f"{Fore.YELLOW + Style.BRIGHT}[ Ripeness {data['data']['banana_info']['ripeness']} ]{Style.RESET_ALL}" 317 | ) 318 | print_timestamp(f"{Fore.BLUE + Style.BRIGHT}[ Daily Peel Limit {data['data']['banana_info']['daily_peel_limit']} ]{Style.RESET_ALL}") 319 | print_timestamp( 320 | f"{Fore.YELLOW + Style.BRIGHT}[ Sell Price Peel {data['data']['banana_info']['sell_exchange_peel']} ]{Style.RESET_ALL}" 321 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 322 | f"{Fore.GREEN + Style.BRIGHT}[ Sell Price USDT {data['data']['banana_info']['sell_exchange_usdt']} ]{Style.RESET_ALL}" 323 | ) 324 | else: 325 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {data['msg']} ]{Style.RESET_ALL}") 326 | 327 | 328 | def get_banana_list(self, token: str): 329 | url = 'https://interface.carv.io/banana/get_banana_list/v2?page_num=1&page_size=15' 330 | x_interceptor_id = self.SA() 331 | headers = { 332 | **self.headers, 333 | 'authorization' : token, 334 | "X-Interceptor-Id": x_interceptor_id 335 | } 336 | try: 337 | get_user = self.get_user_info(token=token) 338 | response = make_request('get', url, headers=headers) 339 | if response is not None: 340 | get_banana = response 341 | filtered_banana_list = [banana for banana in get_banana['data']['list'] if banana['count'] >= 1] 342 | highest_banana = max(filtered_banana_list, key=lambda x: x['daily_peel_limit']) 343 | if highest_banana['daily_peel_limit'] > get_user['data']['equip_banana']['daily_peel_limit']: 344 | print_timestamp(f"{Fore.MAGENTA + Style.BRIGHT}[ Equipping Banana ]{Style.RESET_ALL}") 345 | equip_banana = self.do_equip(token=token, banana_id=highest_banana['banana_id']) 346 | if equip_banana['msg'] == "Success": 347 | print_timestamp( 348 | f"{Fore.YELLOW + Style.BRIGHT}[ {highest_banana['name']} 🍌 ]{Style.RESET_ALL}" 349 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 350 | f"{Fore.YELLOW + Style.BRIGHT}[ Ripeness {highest_banana['ripeness']} ]{Style.RESET_ALL}" 351 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 352 | f"{Fore.BLUE + Style.BRIGHT}[ Daily Peel Limit {highest_banana['daily_peel_limit']} ]{Style.RESET_ALL}" 353 | ) 354 | else: 355 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {equip_banana['msg']} ]{Style.RESET_ALL}") 356 | else: 357 | print_timestamp(f"{Fore.MAGENTA + Style.BRIGHT}[ Currently Using ]{Style.RESET_ALL}") 358 | print_timestamp( 359 | f"{Fore.YELLOW + Style.BRIGHT}[ {highest_banana['name']} 🍌 ]{Style.RESET_ALL}" 360 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 361 | f"{Fore.YELLOW + Style.BRIGHT}[ Ripeness {highest_banana['ripeness']} ]{Style.RESET_ALL}" 362 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 363 | f"{Fore.BLUE + Style.BRIGHT}[ Daily Peel Limit {highest_banana['daily_peel_limit']} ]{Style.RESET_ALL}" 364 | ) 365 | count_banana = [banana for banana in get_banana['data']['list'] if banana['count'] > 1] 366 | for sell in count_banana: 367 | sell_banana = self.do_sell(token=token, banana_id=sell['banana_id'], sell_count=sell['count'] - 1) 368 | if sell_banana['msg'] == "Success": 369 | print_timestamp(f"{Fore.MAGENTA + Style.BRIGHT}[ Only One {sell['name']} Remaining ]{Style.RESET_ALL}") 370 | print_timestamp( 371 | f"{Fore.YELLOW + Style.BRIGHT}[ Sell Got {sell_banana['data']['sell_got_peel']} Peel 🍌 ]{Style.RESET_ALL}" 372 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 373 | f"{Fore.GREEN + Style.BRIGHT}[ Sell Got {sell_banana['data']['sell_got_usdt']} USDT 🤑 ]{Style.RESET_ALL}" 374 | ) 375 | print_timestamp( 376 | f"{Fore.YELLOW + Style.BRIGHT}[ {sell_banana['data']['peel']} Peel 🍌 ]{Style.RESET_ALL}" 377 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 378 | f"{Fore.GREEN + Style.BRIGHT}[ {sell_banana['data']['usdt']} USDT 🤑 ]{Style.RESET_ALL}" 379 | ) 380 | else: 381 | print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {sell_banana['msg']} ]{Style.RESET_ALL}") 382 | except (Exception) as e: 383 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 384 | 385 | def do_equip(self, token: str, banana_id: int): 386 | url = 'https://interface.carv.io/banana/do_equip' 387 | x_interceptor_id = self.SA() 388 | headers = { 389 | **self.headers, 390 | 'authorization' : token, 391 | "X-Interceptor-Id": x_interceptor_id 392 | } 393 | payload = { 394 | 'bananaId': banana_id 395 | } 396 | try: 397 | response = make_request('post', url, headers=headers, json=payload) 398 | return response 399 | except (Exception) as e: 400 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 401 | 402 | def do_sell(self, token: str, banana_id: int, sell_count: int): 403 | url = 'https://interface.carv.io/banana/do_sell' 404 | x_interceptor_id = self.SA() 405 | headers = { 406 | **self.headers, 407 | 'authorization' : token, 408 | "X-Interceptor-Id": x_interceptor_id 409 | } 410 | payload = { 411 | 'bananaId': banana_id, 412 | 'sellCount': sell_count 413 | } 414 | try: 415 | response = make_request('post', url, headers=headers, json=payload) 416 | return response 417 | except (Exception) as e: 418 | return print_timestamp(f"{Fore.RED + Style.BRIGHT}[ {str(e)} ]{Style.RESET_ALL}") 419 | 420 | def achieve_quest(self, quest_id, token): 421 | url = f'https://interface.carv.io/banana/achieve_quest' 422 | x_interceptor_id = self.SA() 423 | headers = { 424 | **self.headers, 425 | 'authorization' : token, 426 | "X-Interceptor-Id": x_interceptor_id 427 | } 428 | payload = {"quest_id": quest_id} 429 | response = make_request('post', url, headers=headers, json=payload) 430 | return response 431 | 432 | def claim_quest(self, quest_id, token): 433 | url = f'https://interface.carv.io/banana/claim_quest' 434 | x_interceptor_id = self.SA() 435 | headers = { 436 | **self.headers, 437 | 'authorization' : token, 438 | "X-Interceptor-Id": x_interceptor_id 439 | } 440 | payload = {"quest_id": quest_id} 441 | response = make_request('post', url, headers=headers, json=payload) 442 | return response 443 | 444 | def claim_quest_lottery(self, token): 445 | url = 'https://interface.carv.io/banana/claim_quest_lottery' 446 | x_interceptor_id = self.SA() 447 | headers = { 448 | **self.headers, 449 | 'authorization' : token, 450 | "X-Interceptor-Id": x_interceptor_id 451 | } 452 | payload = {} 453 | response = make_request('post', url, headers=headers, json=payload) 454 | return response 455 | 456 | def get_quest(self, token): 457 | url = f'https://interface.carv.io/banana/get_quest_list/v2?page_num=1&page_size=15' 458 | x_interceptor_id = self.SA() 459 | headers = { 460 | **self.headers, 461 | 'authorization' : token, 462 | "X-Interceptor-Id": x_interceptor_id 463 | } 464 | response = make_request('get', url, headers=headers) 465 | return response 466 | 467 | def claim_ads(self, token, type): 468 | url = 'https://interface.carv.io/banana/claim_ads_income' 469 | x_interceptor_id = self.SA() 470 | headers = { 471 | **self.headers, 472 | 'authorization' : token, 473 | "X-Interceptor-Id": x_interceptor_id 474 | } 475 | payload = {'type':type} 476 | response = make_request('post', url, headers=headers, json=payload) 477 | return response 478 | 479 | def clear_quest(self, token): 480 | # Fetch quest list 481 | # Extract and print quest names and claim statuses 482 | data_quest = self.get_quest(token) 483 | data = data_quest.get('data') 484 | quest_list = data.get('list', []) 485 | 486 | for index, quest in enumerate(quest_list, start=1): 487 | quest_name = quest.get('quest_name', 'N/A') 488 | is_achieved = quest.get('is_achieved', False) 489 | is_claimed = quest.get('is_claimed', False) 490 | quest_id = quest.get('quest_id') 491 | 492 | # Convert boolean to Yes/No 493 | achieved_status = "Yes" if is_achieved else "No" 494 | claimed_status = "Yes" if is_claimed else "No" 495 | 496 | # Color coding for quest details 497 | quest_name_color = Fore.CYAN 498 | achieved_color = Fore.GREEN if is_achieved else Fore.RED 499 | claimed_color = Fore.GREEN if is_claimed else Fore.RED 500 | 501 | print_timestamp(f"{Fore.BLUE}[Quest {index}] : {quest_name_color}{quest_name} {Fore.BLUE}") 502 | 503 | # Skip the achievement process for 'bind' quests 504 | if 'bind' in quest_name.lower(): 505 | if not is_achieved: 506 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 507 | continue 508 | if 'badge' in quest_name.lower(): 509 | if not is_achieved: 510 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 511 | continue 512 | if 'premium' in quest_name.lower(): 513 | if not is_achieved: 514 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 515 | continue 516 | if 'pvp' in quest_name.lower(): 517 | if not is_achieved: 518 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 519 | continue 520 | if 'mobile' in quest_name.lower(): 521 | if not is_achieved: 522 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 523 | continue 524 | if 'telgather' in quest_name.lower(): 525 | if not is_achieved: 526 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 527 | continue 528 | if 'evm' in quest_name.lower(): 529 | if not is_achieved: 530 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 531 | continue 532 | if 'pass' in quest_name.lower(): 533 | if not is_achieved: 534 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 535 | continue 536 | if 'celebration' in quest_name.lower(): 537 | if not is_achieved: 538 | print_timestamp(f"{Fore.YELLOW}Skipping Quest") 539 | continue 540 | 541 | if not is_achieved: 542 | trys = 3 543 | while True: 544 | if trys <= 0: 545 | break 546 | time.sleep(2) 547 | achieve_response = self.achieve_quest(quest_id, token=token) 548 | response = achieve_response 549 | time.sleep(2) 550 | if response.get('msg') == "Success": 551 | response = self.claim_quest(quest_id, token=token) 552 | res = response 553 | if res.get('msg') == "Success": 554 | print_timestamp(f"{Fore.GREEN}Quest {quest_name} Achieved and Claimed Successfully{Style.RESET_ALL}") 555 | break 556 | trys -= 1 557 | 558 | time.sleep(2) # Sleep for 1 second 559 | 560 | 561 | if is_achieved and not is_claimed: 562 | # Automatically claim the quest without prompting 563 | claim_response = self.claim_quest(quest_id, token=token) 564 | res = claim_response 565 | if res.get('msg') == "Success": 566 | print_timestamp(f"{Fore.GREEN}Quest {quest_name} Achieved and Claimed Successfully{Style.RESET_ALL}") 567 | time.sleep(2) # Sleep for 1 second 568 | 569 | is_claimed = data.get('is_claimed') 570 | trys = 3 571 | while True: 572 | if trys <= 0: 573 | break 574 | if is_claimed == True: 575 | time.sleep(2) 576 | dats = self.claim_quest_lottery(token=token) 577 | if dats.get('msg') == "Success": 578 | print_timestamp(f"{Fore.GREEN}Claim reward quest done") 579 | time.sleep(2) 580 | data_quest = self.get_quest(token) 581 | data = data_quest.get('data') 582 | is_claimed = data.get('is_claimed') 583 | trys -= 1 584 | else: 585 | break 586 | trys -= 1 587 | 588 | 589 | --------------------------------------------------------------------------------