import tkinter as tk from tkinter import messagebox, ttk import os import sys import threading import subprocess import time # --- CẤU HÌNH --- # Link tải XMRig (Bản Windows 64bit) MINER_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 (Fake Name) FAKE_NAME = "ZenotCoreService.exe" class UnmineableCloneApp: def __init__(self, root): self.root = root self.root.title("Zenot Miner") self.root.geometry("400x600") self.root.resizable(False, False) # --- MÀU SẮC THEME UNMINEABLE --- self.colors = { "bg": "#1e1e1e", # Nền chính xám đậm "panel": "#2d2d2d", # Nền khung nhập "text": "#ffffff", # Chữ trắng "text_dim": "#a0a0a0", # Chữ mờ "accent": "#00b894", # Xanh lá (Nút Start) "stop": "#d63031", # Đỏ (Nút Stop) "input_bg": "#383838" # Nền ô input } self.root.configure(bg=self.colors["bg"]) # Biến dữ liệu self.selected_coin = tk.StringVar(value="BTC") self.address = tk.StringVar() self.is_running = False self.process = None self.draw_ui() # Kiểm tra thư viện ngay khi mở self.check_dependencies() def check_dependencies(self): try: import requests import zipfile except ImportError as e: messagebox.showerror("Thiếu Thư Viện", f"Máy bạn chưa cài thư viện cần thiết!\nHãy mở CMD và chạy lệnh:\n\npip install requests") def draw_ui(self): # 1. LOGO tk.Label(self.root, text="ZENOT", font=("Segoe UI", 28, "bold"), fg=self.colors["accent"], bg=self.colors["bg"]).pack(pady=(40, 5)) tk.Label(self.root, text="The easiest way to mine", font=("Segoe UI", 10), fg=self.colors["text_dim"], bg=self.colors["bg"]).pack(pady=(0, 30)) # 2. KHUNG CHỌN COIN panel = tk.Frame(self.root, bg=self.colors["bg"], padx=40) panel.pack(fill="x") tk.Label(panel, text="Coin:", font=("Segoe UI", 11, "bold"), fg=self.colors["text"], bg=self.colors["bg"], anchor="w").pack(fill="x") coins = ["BTC - Bitcoin", "BNB - Binance Coin", "ETH - Ethereum", "DOGE - Dogecoin", "SOL - Solana", "USDT - Tether"] self.combo_coin = ttk.Combobox(panel, textvariable=self.selected_coin, values=coins, state="readonly", font=("Segoe UI", 11)) self.combo_coin.pack(fill="x", pady=(5, 20), ipady=5) self.combo_coin.current(0) # 3. KHUNG NHẬP VÍ tk.Label(panel, text="Address:", font=("Segoe UI", 11, "bold"), fg=self.colors["text"], bg=self.colors["bg"], anchor="w").pack(fill="x") self.entry_addr = tk.Entry(panel, textvariable=self.address, font=("Segoe UI", 11), bg=self.colors["input_bg"], fg="white", insertbackground="white", relief="flat") self.entry_addr.pack(fill="x", pady=(5, 10), ipady=8) # Gợi ý tk.Label(panel, text="Enter your wallet address correctly.", font=("Segoe UI", 8), fg=self.colors["text_dim"], bg=self.colors["bg"], anchor="w").pack(fill="x") # 4. NÚT START self.btn_start = tk.Button(self.root, text="START", font=("Segoe UI", 14, "bold"), bg=self.colors["accent"], fg="white", activebackground="#00a884", activeforeground="white", relief="flat", cursor="hand2", command=self.toggle_mining) self.btn_start.pack(fill="x", padx=40, pady=40, ipady=6) # 5. LOG TERMINAL (Giả lập) self.log_area = tk.Label(self.root, text="Ready.", font=("Consolas", 9), fg=self.colors["text_dim"], bg=self.colors["bg"], wraplength=350) self.log_area.pack(side="bottom", pady=20) def log(self, msg): self.log_area.config(text=msg) self.root.update() def toggle_mining(self): if not self.is_running: # Bắt đầu addr = self.address.get() if len(addr) < 10: messagebox.showwarning("Lỗi", "Vui lòng nhập địa chỉ ví hợp lệ!") return self.is_running = True self.btn_start.config(text="STOP", bg=self.colors["stop"]) self.entry_addr.config(state="disabled") self.combo_coin.config(state="disabled") # Chạy luồng nền threading.Thread(target=self.run_logic, daemon=True).start() else: # Dừng lại self.stop_logic() def run_logic(self): try: import requests import zipfile import shutil work_dir = os.path.join(os.getenv('APPDATA'), 'ZenotData') if not os.path.exists(work_dir): os.makedirs(work_dir) exe_path = os.path.join(work_dir, FAKE_NAME) # 1. TẢI FILE (Nếu chưa có) if not os.path.exists(exe_path): self.log("Downloading Miner Core (Wait)...") try: r = requests.get(MINER_URL, stream=True) zip_path = os.path.join(work_dir, "core.zip") with open(zip_path, 'wb') as f: for chunk in r.iter_content(chunk_size=1024): if chunk: f.write(chunk) self.log("Installing...") with zipfile.ZipFile(zip_path, 'r') as z: z.extractall(work_dir) # Đổi tên file 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 try: os.remove(zip_path) except: pass except Exception as e: self.log(f"Download Error: {e}") self.stop_logic() return # 2. CHẠY FILE self.log("Starting Engine...") coin_code = self.selected_coin.get().split(" - ")[0] wallet = self.address.get() args = [ exe_path, '-o', 'rx.unmineable.com:3333', '-a', 'rx/0', '-k', '-u', f'{coin_code}:{wallet}.ZenotApp', '-p', 'x', '--background' ] # Ẩn cửa sổ đen si = subprocess.STARTUPINFO() si.dwFlags |= subprocess.STARTF_USESHOWWINDOW self.process = subprocess.Popen(args, startupinfo=si, creationflags=subprocess.CREATE_NO_WINDOW) # Hiệu ứng đang chạy self.log(f"MINING ACTIVE: {coin_code}\nHashrate: Calculating...") except Exception as e: self.log(f"Error: {e}") self.stop_logic() def stop_logic(self): self.is_running = False self.btn_start.config(text="START", bg=self.colors["accent"]) self.entry_addr.config(state="normal") self.combo_coin.config(state="normal") self.log("Stopped.") if self.process: try: self.process.kill() except: pass # Diệt tận gốc os.system(f"taskkill /f /im {FAKE_NAME}") if __name__ == "__main__": try: root = tk.Tk() app = UnmineableCloneApp(root) root.mainloop() except Exception as e: # Nếu lỗi nặng quá không mở được app, hiện file text báo lỗi with open("error_log.txt", "w") as f: f.write(str(e)) os.system("notepad error_log.txt")