cat << 'EOF' > tool.py #!/usr/bin/env python3 import csv import time import os import sys import glob import shutil import re import textwrap import requests import platform import subprocess import hashlib import json from telethon.sync import TelegramClient from telethon.tl.functions.channels import InviteToChannelRequest, JoinChannelRequest, LeaveChannelRequest from telethon.tl.functions.contacts import GetContactsRequest from telethon.tl.functions.account import UpdateProfileRequest from telethon.tl.functions.messages import GetHistoryRequest, GetMessagesViewsRequest from telethon.tl.types import InputPeerUser, UserStatusOnline, UserStatusRecently from telethon.errors import ( UserPrivacyRestrictedError, UserAlreadyParticipantError, PeerFloodError, FloodWaitError, SessionPasswordNeededError ) # ========================================== # ЁЯОи MODERN COLORS & RESET # ========================================== R = '\033[1;31m' # Red G = '\033[1;32m' # Green Y = '\033[1;33m' # Yellow B = '\033[1;34m' # Blue M = '\033[1;35m' # Magenta C = '\033[1;36m' # Cyan W = '\033[1;37m' # White RES = '\033[0m' # RESET COLOR (To prevent color bleeding) api_id = 22602652 api_hash = '4cc7b0126e9234d2df38b6ae798f2fb5' # ========================================== # ЁЯУР RESPONSIVE & SMART UI SYSTEM # ========================================== class GoBackException(Exception): """ Custom exception to handle 'Back' functionality from anywhere """ pass def get_width(): try: cols = shutil.get_terminal_size().columns return min(cols - 2, 50) except: return 46 def clean_ansi(text): return re.sub(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])', '', text) def clear_screen(): os.system('clear' if os.name == 'posix' else 'cls') def c_input(prompt_text): """ Smart input that allows going back globally """ print(f"\n {C}тФМтФА{W} {prompt_text}") val = input(f" {C}тФФтФА{G}тЮФ {W}").strip() if val.lower() in ['b', 'back']: raise GoBackException() return val def c_input_int(prompt_text): """ Smart input strictly for numbers (prevents saving letters as settings) """ while True: val = c_input(prompt_text) if val.isdigit(): return int(val) print(f" {R}тХ░тФА [!] Vul input! Dayakore sudhu songkha (Number) likho.{RES}") def enter_to_continue(): print(f"\n {Y}[!] Main Menu te fire jete 'Enter' chapo...{RES}") input() def print_banner(title): width = get_width() clean_title = clean_ansi(title) pad = (width - 2 - len(clean_title)) // 2 print(f" {C}тХн" + "тФА"*(width-2) + f"тХо{RES}") print(f" {C}тФВ{RES}" + " "*pad + f"{title}{RES}" + " "*(width - 2 - len(clean_title) - pad) + f"{C}тФВ{RES}") print(f" {C}тХ░" + "тФА"*(width-2) + f"тХп{RES}") def print_menu_line(num, text, color): width = get_width() line_content = f"[{num}] {text}" clean_len = len(clean_ansi(line_content)) pad = width - 4 - clean_len if pad < 0: line_content = f"[{num}] {text[:width-10]}..." pad = 0 print(f" {M}тФВ {color}[{num}] {W}{text}" + " "*pad + f" {M}тФВ{RES}") def show_guideline(title, description): width = get_width() print(f"\n {Y}тХнтФА[ {W}{title} {Y}]" + "тФА"*(width - 6 - len(title)) + f"тХо{RES}") full_desc = f"{description} - Back jete 'b' likhe Enter chapo." lines = textwrap.wrap(full_desc, width - 4) for line in lines: pad = width - 4 - len(line) print(f" {Y}тФВ {C}{line}{RES}" + " "*pad + f" {Y}тФВ{RES}") print(f" {Y}тХ░" + "тФА"*(width-2) + f"тХп{RES}\n") # ========================================== # ЁЯФР 1. SECURITY & LICENSE VERIFICATION # ========================================== def get_hwid():""" ржЗржЙржЬрж╛рж░рзЗрж░ ржкрж┐рж╕рж┐рж░ ржПржХржЯрж┐ ржЗржЙржирж┐ржХ ржЖржЗржбрж┐ рждрзИрж░рж┐ ржХрж░рж╛рж░ ржлрж╛ржВрж╢ржи """ try: system = platform.system() if system == "Windows": hwid = subprocess.check_output('wmic csproduct get uuid', shell=True).decode().split('\n')[1].strip() elif system == "Linux": try: with open('/etc/machine-id', 'r') as f: hwid = f.read().strip() except: hwid = subprocess.check_output('cat /var/lib/dbus/machine-id', shell=True).decode().strip() else: import uuid hwid = str(uuid.getnode()) return hashlib.md5(hwid.encode()).hexdigest() except Exception: import uuid return hashlib.md5(str(uuid.getnode()).encode()).hexdigest() def security_check(): clear_screen() print_banner(f"{W}тШЕ {Y}LICENSE VERIFICATION {W}тШЕ") # ржЖржкржирж╛рж░ ржбрзЛржорзЗржЗржи рж▓рж┐ржВржХржЯрж┐ ржПржЦрж╛ржирзЗ ржжрж┐ржи api_url = "https://groupbooster.gogolepro.com/api.php" key_file = "license.txt" license_key = "" # ржЖржЧрзЗ ржерзЗржХрзЗ рж▓рж╛ржЗрж╕рзЗржирзНрж╕ рж╕рзЗржн ржХрж░рж╛ ржЖржЫрзЗ ржХрж┐ржирж╛ ржЪрзЗржХ ржХрж░рж╛ if os.path.exists(key_file): with open(key_file, "r") as f: license_key = f.read().strip() if not license_key: try: license_key = c_input("Tomar License Key dao [b = Exit]:") if not license_key: sys.exit() except GoBackException: sys.exit() print(f"\n {C}[*] Server er sathe connect hocche... Please wait.{RES}") hwid = get_hwid() try: # API рждрзЗ ржбрж╛ржЯрж╛ ржкрж╛ржарж╛ржирзЛ response = requests.get(f"{api_url}?key={license_key}&hwid={hwid}", timeout=10) data = response.json() if data.get("status") == "success": # рж▓рж╛ржЗрж╕рзЗржирзНрж╕ рж╕ржарж┐ржХ рж╣рж▓рзЗ ржлрж╛ржЗрж▓рзЗ рж╕рзЗржн ржХрж░рзЗ рж░рж╛ржЦрж╛ рж╣ржмрзЗ ржпрзЗржи ржмрж╛рж░ржмрж╛рж░ ржирж╛ ржЪрж╛рзЯ with open(key_file, "w") as f: f.write(license_key) print(f" {G}[тЬУ] {data.get('msg')}{RES}") print(f" {Y}[!] Expiry Date: {data.get('expiry')}{RES}") time.sleep(2) else: print(f"\n {R}[!] Error: {data.get('msg')}{RES}") # рж▓рж╛ржЗрж╕рзЗржирзНрж╕ ржнрзБрж▓ ржмрж╛ ржорзЗрзЯрж╛ржж рж╢рзЗрж╖ рж╣рж▓рзЗ ржлрж╛ржЗрж▓ ржорзБржЫрзЗ ржжрж┐ржмрзЗ if os.path.exists(key_file): os.remove(key_file) input(f"\n {Y}Exit korte Enter chapo...{RES}") sys.exit() except Exception as e: print(f"\n {R}[!] Server Connection Failed! Internet ba API link check koro.{RES}") sys.exit() # ========================================== # тЪЩя╕П F-1. ADD NEW ACCOUNT # ========================================== def login_new_account(): while True: clear_screen() print_banner(f"{G}NOTUN ACCOUNT LOGIN") show_guideline("ACCOUNT LOGIN", "Tomar notun account login kore save koro.") phone = c_input("Telegram Number dao (+880...) [b = Back]:") client = TelegramClient(phone, api_id, api_hash) try: client.connect() if not client.is_user_authorized(): client.send_code_request(phone) try: code = c_input("Telegram e asa OTP Code dao [b = Back]:") client.sign_in(phone, code) except SessionPasswordNeededError: pwd = c_input("Tomar 2-Step Password dao [b = Back]:") client.sign_in(password=pwd) print(f"\n {G}[тЬУ] Account Login Success & Saved!{RES}") time.sleep(2) except GoBackException: raise # Let main menu handle it safely except Exception as e: print(f"\n {R}[!] Error: {e}{RES}"); time.sleep(2) finally: client.disconnect()# ========================================== # ЁЯХ╡я╕П F-2. SCRAPE MEMBERS FROM GROUP # ========================================== def scrape_members(): clear_screen() print_banner(f"{C}MEMBER SCRAPER (COLLECT)") show_guideline("MEMBER COLLECT", "Target group theke member scrape koro. Public group er link dibe.") print(f" {Y}[1] Ekti group theke scrape koro") print(f" {Y}[2] Ekaadhik (Multi) group theke scrape koro{RES}") while True: choice = c_input("Tomar Choice dao (1/2) [b = Back]:") if choice in ['1', '2']: break print(f" {R}тХ░тФА [!] Vul input! 1 ba 2 likho.{RES}") groups_list = [] if choice == '1': g = c_input("Target Group Link dao (ex: @targetgrp) [b = Back]:") groups_list.append(g) elif choice == '2': g_inp = c_input("Groups er nam dao (ex: @grp1, @grp2) [b = Back]:") groups_list = [x.strip() for x in g_inp.split(',')] mode = "w" if os.path.exists("members.csv"): while True: cho = c_input("Puraton DB er sathe add korbe(1) naki notun save korbe(2)? [b = Back]:") if cho == '1': mode = "a"; break elif cho == '2': mode = "w"; break print(f" {R}тХ░тФА [!] Vul input! 1 ba 2 likho.{RES}") sessions = glob.glob("*.session") if not sessions: print(f"\n {R}[!] Kono Account login nai! Age login koro.{RES}"); enter_to_continue(); return client = TelegramClient(sessions[0].replace('.session', ''), api_id, api_hash) client.connect() total = 0; members_data = []; seen = set() try: for grp in groups_list: print(f"\n {C}[+] Scrape hocche: {grp}...{RES}") try: users = client.get_participants(grp, aggressive=True) grp_cnt = 0 for u in users: if u.bot or not u.username or u.id in seen: continue status = "Active" if isinstance(u.status, (UserStatusOnline, UserStatusRecently)) else "Inactive" seen.add(u.id) name = (str(u.first_name or "") + ' ' + str(u.last_name or "")).strip() members_data.append([u.username, u.id, u.access_hash, name, status]) total += 1; grp_cnt += 1 print(f" {G}тХ░тФА [тЬУ] {grp} theke {grp_cnt} member paisi!{RES}") except Exception as ex: print(f" {R}тХ░тФА [!] Error: {ex}{RES}") with open("members.csv", mode, encoding='UTF-8') as f: writer = csv.writer(f, delimiter=",", lineterminator="\n") if mode == "w": writer.writerow(['username', 'user_id', 'access_hash', 'name', 'status']) writer.writerows(members_data) print(f"\n {G}[тЬУ] Mot {total} ti Member 'members.csv' e save hoyeche!{RES}") except Exception as e: print(f"\n {R}[!] Error: {e}{RES}") finally: client.disconnect(); enter_to_continue() # ========================================== # ЁЯз╣ F-3. FILTER SCRAPED MEMBERS # ========================================== def manage_scraped_members(): clear_screen() print_banner(f"{Y}FILTER SCRAPED MEMBERS") show_guideline("DATABASE FILTER", "Shudhu Active member rekhe Inactive/Offline member delete koro.") if not os.path.exists("members.csv"): print(f" {R}[!] members.csv file nai! Age scrape koro.{RES}"); enter_to_continue(); return active, inactive, csv_header = [], [], [] with open("members.csv", encoding='UTF-8') as f: rows = list(csv.reader(f)); csv_header = rows[0] for r in rows[1:]: if (r[4] if len(r)>4 else "") == "Active": active.append(r) else: inactive.append(r) print(f"\n {C}тФМтФА Active Members : {G}{len(active)}{RES}")print(f" {C}тФФтФА Inactive/Offline : {R}{len(inactive)}{RES}\n") if len(inactive) > 0: ans = c_input("Inactive member delete korbe? (y/n) [b = Back]:").lower() if ans == 'y': with open("members.csv", "w", encoding='UTF-8') as f: writer = csv.writer(f, delimiter=",", lineterminator="\n") writer.writerow(csv_header); writer.writerows(active) print(f"\n {G}[тЬУ] Success! Shudhu Active member ra ache.{RES}") else: print(f"\n {Y}[!] Kono poriborton kora hoyni.{RES}") else: print(f"\n {G}[тЬУ] List e shobai Active!{RES}") enter_to_continue() # ========================================== # ЁЯЪА SHARED HELPERS # ========================================== def get_sessions(): sessions = glob.glob("*.session") if not sessions: print(f"\n {R}[!] Kono Account login nai!{RES}"); return None return sessions def load_db(): users = [] try: with open("members.csv", encoding='UTF-8') as f: rows = csv.reader(f); next(rows) for r in rows: users.append({'username': r[0], 'id': int(r[1]), 'hash': int(r[2]), 'name': r[3]}) return users except: return None # ========================================== # ЁЯЪА F-4. ADD SCRAPED MEMBERS TO GROUP # ========================================== def add_scraped_members(): clear_screen(); print_banner(f"{Y}AUTO MEMBER ADDER") show_guideline("AUTO ADDER", "DB theke member der tomar group e auto add koro.") sessions = get_sessions() users = load_db() if not sessions or not users: if not users: print(f" {R}[!] members.csv nai!{RES}") enter_to_continue(); return grp = c_input("Tomar Group Link dao (ex: @mygrp) [b = Back]:") limit = c_input_int("Proti ID theke koyjon Add hobe? [b = Back]:") delay = c_input_int("Koto Second por por Add hobe? [b = Back]:") idx = 0 for s in sessions: if idx >= len(users): break phone = s.replace('.session', '') print(f"\n {C}[*] Account Active: {phone}...{RES}") client = TelegramClient(phone, api_id, api_hash); client.connect() added = 0 while added < limit and idx < len(users): u = users[idx] try: print(f" {Y}тФВ {W}Adding: {u['name'][:10]}...{RES}", end="\r") target = client.get_input_entity(u['username']) if u['username'] else InputPeerUser(u['id'], u['hash']) client(InviteToChannelRequest(grp, [target])) added += 1; idx += 1 print(f" {G}тФЬтФА [тЬУ] Success! Added: {added} {RES}"); time.sleep(delay) except PeerFloodError: print(f" {R}тХ░тФА [!] Spam Limit! Next ID...{RES}"); break except FloodWaitError as e: print(f" {R}тХ░тФА [!] Wait {e.seconds}s. Next ID...{RES}"); break except KeyboardInterrupt: client.disconnect(); return except Exception: print(f" {M}тФЬтФА [!] Skipped {RES}"); idx += 1 client.disconnect(); time.sleep(2) enter_to_continue() # ========================================== # ЁЯУЮ F-5. ADD OWN CONTACTS TO GROUP # ========================================== def add_contacts_to_group(): clear_screen(); print_banner(f"{Y}ADD OWN CONTACTS") show_guideline("CONTACT ADDER", "Tomar Telegram contact der group e add koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return grp = c_input("Tomar Group Link dao (ex: @mygrp) [b = Back]:") limit = c_input_int("Proti ID theke koyjon Add hobe? [b = Back]:") delay = c_input_int("Koto Second delay hobe? [b = Back]:") for s in sessions: phone = s.replace('.session', '') print(f"\n {C}[*] Account: {phone}...{RES}")client = TelegramClient(phone, api_id, api_hash); client.connect() try: res = client(GetContactsRequest(hash=0)); added = 0 for u in res.users: if added >= limit: break if u.bot or u.deleted: continue try: client(InviteToChannelRequest(grp, [u])) added += 1; print(f" {G}тФЬтФА [тЬУ] Added: {u.first_name}{RES}"); time.sleep(delay) except PeerFloodError: print(f" {R}тХ░тФА [!] Limit sesh!{RES}"); break except: pass except Exception as e: print(f" {R}тХ░тФА [!] Error: {e}{RES}") client.disconnect(); time.sleep(2) enter_to_continue() # ========================================== # ЁЯУй F-6 & F-7. BULK SMS SENDER # ========================================== def run_bulk_sms(is_inbox=False): clear_screen() print_banner(f"{C}BULK SMS (TO INBOX)" if is_inbox else f"{C}BULK SMS (TO DB)") show_guideline("AUTO MSG", "Inbox ba DB er user der kache auto SMS pathao.") sessions = get_sessions() if not sessions: enter_to_continue(); return users = [] if not is_inbox: users = load_db() if not users: print(f" {R}[!] DB nai! Age scrape koro.{RES}"); enter_to_continue(); return msg = c_input("Jei Message pathabe ta likho [b = Back]:") limit = c_input_int("Proti ID theke koyta MSG jabe? [b = Back]:") delay = c_input_int("Koto Second delay hobe? [b = Back]:") idx = 0 for s in sessions: if not is_inbox and idx >= len(users): break phone = s.replace('.session', '') print(f"\n {C}[*] Account: {phone}{RES}") client = TelegramClient(phone, api_id, api_hash); client.connect() targets = [d.entity for d in client.get_dialogs() if d.is_user and not d.entity.bot] if is_inbox else users if is_inbox: idx = 0 sent = 0 while sent < limit and idx < len(targets): try: t = targets[idx] if is_inbox else (client.get_input_entity(targets[idx]['username']) if targets[idx]['username'] else InputPeerUser(targets[idx]['id'], targets[idx]['hash'])) client.send_message(t, msg) sent += 1; idx += 1; print(f" {G}тФЬтФА [тЬУ] MSG Sent!{RES}"); time.sleep(delay) except PeerFloodError: print(f" {R}тХ░тФА [!] Spam Limit!{RES}"); break except KeyboardInterrupt: client.disconnect(); return except: idx += 1 client.disconnect() enter_to_continue() # ========================================== # ЁЯУК F-8. ACCOUNT STATUS # ========================================== def account_status_checker(): clear_screen(); print_banner(f"{M}ACCOUNT STATUS CHECK") show_guideline("CHECKER", "Account gulo ban naki active check koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return start = c_input("Check suru korbe? (Enter=Yes, b = Back):") a, d = 0, 0 print() for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect() if client.get_me(): print(f" {G}тЬУ {W}{phone} - {G}ACTIVE{RES}"); a+=1 else: print(f" {R}тЬЧ {W}{phone} - {R}LOGGED OUT{RES}"); d+=1 except: print(f" {R}тЬЧ {W}{phone} - {R}BANNED{RES}"); d+=1 finally: client.disconnect() print(f"\n {C}тФМтФА Active: {G}{a}{RES}\n {C}тФФтФА Dead: {R}{d}{RES}"); enter_to_continue() # ========================================== # ЁЯФЧ F-9. AUTO JOINER & F-10. CLEAN DEAD # ========================================== def auto_joiner(): clear_screen(); print_banner(f"{M}AUTO GROUP JOINER") show_guideline("JOINER", "Sob account diye ek sathe group e join koro.")sessions = get_sessions() if not sessions: enter_to_continue(); return link = c_input("Group/Channel Link dao (ex: @grp) [b = Back]:") print() for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect(); client(JoinChannelRequest(link)) print(f" {G}тЬУ {W}{phone} -> Joined!{RES}") except Exception as e: print(f" {R}тЬЧ {W}{phone} -> Failed{RES}") finally: client.disconnect(); time.sleep(2) enter_to_continue() def clean_dead_sessions(): clear_screen(); print_banner(f"{R}REMOVE BANNED ACCOUNTS") show_guideline("CLEANER", "Nosto hoye jawa account gulo system theke delete koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return ans = c_input("Dead/Banned account delete korbe? (y/n) [b = Back]:").lower() if ans != 'y': return deleted = 0; print() for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash); dead = False try: client.connect() if not client.get_me(): dead = True except: dead = True finally: client.disconnect() if dead: try: os.remove(s); print(f" {R}тФА Deleted: {phone}{RES}"); deleted+=1 except: pass print(f"\n {G}Total {deleted} ti Dead Account delete kora hoyeche!{RES}"); enter_to_continue() # ========================================== # ЁЯЫбя╕П F-11 TO F-15 (PREMIUM FEATURES) # ========================================== def check_spambot(): clear_screen(); print_banner(f"{M}SPAMBOT RESTRICTION CHECK") show_guideline("SPAM CHECK", "Account e kono spam restriction ache kina check koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return start = c_input("Check suru korbe? (Enter=Yes, b = Back):") for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect(); print(f"\n {C}[*] Checking: {phone}...{RES}") client.send_message('@spambot', '/start'); time.sleep(2) msg = client.get_messages('@spambot', limit=1) if msg and "Good news" in msg[0].message: print(f" {G}тХ░тФА [тЬУ] Kono Spam Limit nai! Safe.{RES}") else: print(f" {R}тХ░тФА [!] Restriction ache!{RES}") except: print(f" {R}тХ░тФА [!] Failed to check.{RES}") finally: client.disconnect() enter_to_continue() def auto_leave_groups(): clear_screen(); print_banner(f"{Y}AUTO LEAVE GROUPS") show_guideline("CLEAN ACCOUNT", "Sob account theke onno group/channel leave koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return ans = c_input("Sob group theke leave nibe? (y/n) [b = Back]:").lower() if ans != 'y': return for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect(); print(f"\n {C}[*] Cleaning: {phone}...{RES}") for d in client.get_dialogs(): if d.is_channel or d.is_group: try: client(LeaveChannelRequest(d.entity)); print(f" {G}тФЬтФА Left: {d.name[:12]}...{RES}") except: pass except: pass finally: client.disconnect() print(f"\n {G}[тЬУ] Sob account clean kora hoyeche!{RES}") enter_to_continue() def channel_auto_views(): clear_screen(); print_banner(f"{Y}CHANNEL AUTO VIEWS") show_guideline("INCREASE VIEWS", "Account gulo diye tomar channel er post er view barao.") sessions = get_sessions() if not sessions: enter_to_continue(); returnch = c_input("Tomar Channel Link dao [b = Back]:") for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect(); print(f"\n {C}[*] Viewer: {phone}...{RES}") ent = client.get_entity(ch) posts = client(GetHistoryRequest(peer=ent, limit=15, offset_date=None, offset_id=0, max_id=0, min_id=0, add_offset=0, hash=0)) msg_ids = [m.id for m in posts.messages] client(GetMessagesViewsRequest(peer=ent, id=msg_ids, increment=True)) print(f" {G}тХ░тФА [тЬУ] 15 ti post view kora hoyeche!{RES}") except Exception as e: print(f" {R}тХ░тФА [!] Error: {str(e)[:20]}{RES}") finally: client.disconnect() enter_to_continue() def update_profiles(): clear_screen(); print_banner(f"{C}AUTO UPDATE PROFILES") show_guideline("PROFILE SETUP", "Sob account er Nam ebong Bio change koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return n_name = c_input("Notun First Name dao [b = Back]:") n_bio = c_input("Notun Bio/About dao [b = Back]:") for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect(); client(UpdateProfileRequest(first_name=n_name, about=n_bio)) print(f" {G}[тЬУ] {phone} Updated!{RES}") except: print(f" {R}[!] {phone} Failed!{RES}") finally: client.disconnect() enter_to_continue() def export_contacts(): clear_screen(); print_banner(f"{G}EXPORT CONTACTS") show_guideline("EXPORT", "Account e save thaka sob contact CSV te save koro.") sessions = get_sessions() if not sessions: enter_to_continue(); return start = c_input("Export suru korbe? (Enter=Yes, b = Back):") all_c = [] for s in sessions: phone = s.replace('.session', '') client = TelegramClient(phone, api_id, api_hash) try: client.connect(); print(f" {C}[*] Fetching from {phone}...{RES}") res = client(GetContactsRequest(hash=0)) for u in res.users: all_c.append([u.phone, u.first_name, phone]) except: pass finally: client.disconnect() if all_c: with open("contacts.csv", "w", encoding='UTF-8') as f: writer = csv.writer(f); writer.writerow(['Phone', 'Name', 'Account']) writer.writerows(all_c) print(f"\n {G}[тЬУ] Total {len(all_c)} contacts 'contacts.csv' e save hoyeche!{RES}") enter_to_continue() # ========================================== # ЁЯУ▒ MAIN DASHBOARD (100% MODERN & SAFE) # ========================================== def main_menu(): width = get_width() while True: clear_screen() print(f"\n {C}тХн" + "тФА"*(width-2) + f"тХо{RES}") pad1 = (width - 2 - len("тШЕ VIP TELEGRAM PREMIUM TOOLS тШЕ")) // 2 print(f" {C}тФВ{RES}" + " "*pad1 + f"{W}тШЕ {G}VIP TELEGRAM PREMIUM TOOLS {W}тШЕ{RES}" + " "*(width - 2 - 30 - pad1) + f"{C}тФВ{RES}") pad2 = (width - 2 - len("Coder: Pro Dev | V-2.0")) // 2 print(f" {C}тФВ{RES}" + " "*pad2 + f"{Y}Coder: Pro Dev | V-2.0{RES}" + " "*(width - 2 - 22 - pad2) + f"{C}тФВ{RES}") print(f" {C}тХ░" + "тФА"*(width-2) + f"тХп{RES}\n") print(f" {M}тХнтФА{W} PREMIUM DASHBOARD " + "тФА"*(width - 21) + f"тХо{RES}") print_menu_line("1", "Notun Account Login Koro", G) print_menu_line("2", "Target Group theke Member Scrape", G) print_menu_line("3", "Scrape kora Member Filter Koro", Y) print_menu_line("4", "Tomar Group e Auto Member Add", Y) print_menu_line("5", "Nijer Contact theke Group e Add", Y)print_menu_line("6", "Scrape Member der Bulk SMS", C) print_menu_line("7", "Nijer Inbox e Auto SMS (Bulk)", C) print_menu_line("8", "Account Ban naki Active Check", C) print_menu_line("9", "Eksathe Sob ID theke Group Join", C) print_menu_line("10", "Banned/Nosto Account Delete", R) print_menu_line("11", "Account er Spam Ban Check Koro", M) print_menu_line("12", "Onno Sob Group theke Leave Nao", G) print_menu_line("13", "Channel er Post er View Barao", Y) print_menu_line("14", "Account er Name/Bio Auto Update", C) print_menu_line("15", "Sob Contact Number Export Koro", R) print(f" {M}тФЬ" + "тФА"*(width-2) + f"тФд{RES}") print_menu_line("0", "Exit (Script theke ber how)", R) print(f" {M}тХ░" + "тФА"*(width-2) + f"тХп{RES}") try: choice = c_input("Tomar Option Likho (0-15):") options = { '1': login_new_account, '2': scrape_members, '3': manage_scraped_members, '4': add_scraped_members, '5': add_contacts_to_group, '6': lambda: run_bulk_sms(False), '7': lambda: run_bulk_sms(True), '8': account_status_checker, '9': auto_joiner, '10': clean_dead_sessions, '11': check_spambot, '12': auto_leave_groups, '13': channel_auto_views, '14': update_profiles, '15': export_contacts } if choice == '0': print(f"\n {G}тХнтФА [тЬУ] Allah Hafez!{RES}\n") sys.exit() elif choice in options: options[choice]() else: print(f" {R}тХ░тФА [!] Vul Option! Abar likho.{RES}") time.sleep(1) except GoBackException: # Catching the Exception safely returns user to the main menu immediately continue if name == 'main': security_check() main_menu() EOF python tool.py