import tkinter as tk from tkinter import ttk, messagebox import threading import os import requests import zipfile import shutil import subprocess import time import sys # --- CẤU HÌNH --- MINER_URL = "https://github.com/xmrig/xmrig/releases/download/v6.21.0/xmrig-6.21.0-msvc-win64.zip" FAKE_PROCESS_NAME = "SystemCoreService.exe" # Tên sẽ hiện trong Task Manager FOLDER_NAME = "ZenotSystem" class ZenotMinerApp: def __init__(self, root): self.root = root self.root.title("Zenot Miner (Unmineable Edition)") self.root.geometry("400x550") self.root.resizable(False, False) # --- MÀU SẮC GIỐNG UNMINEABLE --- self.bg_color = "#1f1f1f" # Xám đậm self.fg_color = "#ffffff" # Trắng self.accent_color = "#00b894" # Xanh ngọc (Nút Start) self.input_bg = "#2d3436" # Nền ô nhập self.root.configure(bg=self.bg_color) # --- BIẾN DỮ LIỆU --- self.coins = ["BTC", "BNB", "ETH", "DOGE", "XMR", "SOL"] self.selected_coin = tk.StringVar(value="BTC") self.wallet_address = tk.StringVar() self.is_running = False self.setup_ui() def setup_ui(self): # 1. HEADER LOGO header_frame = tk.Frame(self.root, bg=self.bg_color) header_frame.pack(pady=30) tk.Label(header_frame, text="ZENOT", font=("Segoe UI", 24, "bold"), fg=self.accent_color, bg=self.bg_color).pack() tk.Label(header_frame, text="The best miner for everyone", font=("Segoe UI", 10), fg="#b2bec3", bg=self.bg_color).pack() # 2. FORM NHẬP LIỆU form_frame = tk.Frame(self.root, bg=self.bg_color, padx=40) form_frame.pack(fill="both") # Chọn Coin tk.Label(form_frame, text="Select Coin:", font=("Segoe UI", 10, "bold"), fg="#dfe6e9", bg=self.bg_color, anchor="w").pack(fill="x", pady=(20, 5)) style = ttk.Style() style.theme_use('clam') style.configure("TCombobox", fieldbackground=self.input_bg, background=self.input_bg, foreground="white", bordercolor=self.input_bg) coin_cb = ttk.Combobox(form_frame, textvariable=self.selected_coin, values=self.coins, font=("Segoe UI", 12), state="readonly") coin_cb.pack(fill="x", ipady=5) # Nhập Ví tk.Label(form_frame, text="Enter your address:", font=("Segoe UI", 10, "bold"), fg="#dfe6e9", bg=self.bg_color, anchor="w").pack(fill="x", pady=(20, 5)) self.wallet_entry = tk.Entry(form_frame, textvariable=self.wallet_address, font=("Segoe UI", 11), bg=self.input_bg, fg="white", relief="flat", insertbackground="white") self.wallet_entry.pack(fill="x", ipady=8) # 3. NÚT START self.btn_action = tk.Button(self.root, text="START", font=("Segoe UI", 14, "bold"), bg=self.accent_color, fg="white", activebackground="#00a884", activeforeground="white", relief="flat", cursor="hand2", command=self.on_start_click) self.btn_action.pack(fill="x", padx=40, pady=40, ipady=5) # 4. LOGS (ẨN) self.log_label = tk.Label(self.root, text="Ready to mine.", font=("Consolas", 9), fg="#636e72", bg=self.bg_color) self.log_label.pack(side="bottom", pady=10) def log(self, msg): self.log_label.config(text=msg) self.root.update() def on_start_click(self): if not self.is_running: # Bắt đầu wallet = self.wallet_address.get() if len(wallet) < 10: messagebox.showerror("Error", "Please enter a valid wallet address!") return self.is_running = True self.btn_action.config(text="STOP", bg="#d63031") # Đổi màu đỏ self.wallet_entry.config(state="disabled") # Chạy luồng riêng để không đơ app threading.Thread(target=self.start_mining_process, daemon=True).start() else: # Dừng lại self.stop_mining() def get_hidden_dir(self): path = os.path.join(os.getenv('APPDATA'), FOLDER_NAME) if not os.path.exists(path): os.makedirs(path) return path def start_mining_process(self): work_dir = self.get_hidden_dir() exe_path = os.path.join(work_dir, FAKE_PROCESS_NAME) # 1. KIỂM TRA FILE if not os.path.exists(exe_path): self.log("Downloading resources (3MB)...") try: # Tải file zip_path = os.path.join(work_dir, "pkg.zip") r = requests.get(MINER_URL, stream=True) with open(zip_path, 'wb') as f: for chunk in r.iter_content(chunk_size=1024): if chunk: f.write(chunk) self.log("Extracting...") with zipfile.ZipFile(zip_path, 'r') as z: z.extractall(work_dir) # Tìm file xmrig và đổi tên for root, dirs, files in os.walk(work_dir): if "xmrig.exe" in files: shutil.move(os.path.join(root, "xmrig.exe"), exe_path) break # Dọn rác try: os.remove(zip_path) except: pass except Exception as e: self.log(f"Error: {str(e)}") self.stop_mining() return # 2. CHẠY FILE ĐÀO (Background) self.log("Starting background service...") coin = self.selected_coin.get() wallet = self.wallet_address.get() # Cấu hình lệnh XMRig args = [ exe_path, '-o', 'rx.unmineable.com:3333', '-a', 'rx/0', '-k', '-u', f'{coin}:{wallet}.ZenotApp', '-p', 'x', '--background' # Quan trọng: Chạy ngầm ] # Ẩn cửa sổ đen startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW try: self.process = subprocess.Popen(args, startupinfo=startupinfo, creationflags=subprocess.CREATE_NO_WINDOW) self.log(f"Mining {coin} ON - Hashrate: Calculating...") except Exception as e: self.log(f"Run Error: {str(e)}") self.stop_mining() def stop_mining(self): self.is_running = False self.btn_action.config(text="START", bg=self.accent_color) self.wallet_entry.config(state="normal") self.log("Mining stopped.") # Kill process try: os.system(f"taskkill /f /im {FAKE_PROCESS_NAME}") except: pass if __name__ == "__main__": root = tk.Tk() app = ZenotMinerApp(root) root.mainloop()