Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- from tkinter import ttk, filedialog, messagebox, scrolledtext
- import subprocess
- import threading
- import datetime
- import os
- import sys
- import platform
- import ctypes
- import socket
- import re
- # Optional: psutil for system stats
- try:
- import psutil
- PSUTIL_AVAILABLE = True
- except ImportError:
- PSUTIL_AVAILABLE = False
- print("⚠️ psutil not installed. Install with: pip install psutil")
- class GodModeUltimate:
- def __init__(self, root):
- self.root = root
- self.root.title("NAJEEB TOTAL CMD PRO MAX V4 - ULTIMATE ADMIN EDITION")
- self.root.geometry("1200x850")
- self.root.minsize(900, 700)
- # Theme Colors
- self.dark_theme = {
- "bg": "#1e1e1e", "fg": "#00ff00", "input_bg": "#2d2d2d",
- "input_fg": "#ffffff", "btn_bg": "#333333", "btn_fg": "#ffffff",
- "accent": "#007acc", "header_bg": "#252526", "warning": "#ff4444",
- "success": "#00cc00", "info": "#0099ff"
- }
- self.light_theme = {
- "bg": "#ffffff", "fg": "#000000", "input_bg": "#f0f0f0",
- "input_fg": "#000000", "btn_bg": "#e1e1e1", "btn_fg": "#000000",
- "accent": "#005fb8", "header_bg": "#f3f3f3", "warning": "#cc0000",
- "success": "#009900", "info": "#0066cc"
- }
- self.current_theme = "dark"
- # Variables
- self.commands = []
- self.listbox_commands = [] # Maps listbox index to actual command
- self.command_display_names = {} # ✅ Maps command -> display name for fast search
- self.history = []
- self.is_running = False
- self.is_admin = False
- self.templates = self.get_command_templates()
- self.process = None # For stopping commands
- # 📁 Working Directory Variable
- self.work_dir = tk.StringVar(value=os.getcwd())
- # Setup UI
- self.setup_styles()
- self.create_widgets()
- self.apply_theme()
- self.check_admin_privileges()
- def setup_styles(self):
- style = ttk.Style()
- style.theme_use('clam')
- style.configure("Treeview", background="#2d2d2d", foreground="white", fieldbackground="#2d2d2d")
- style.map("Treeview", background=[('selected', '#007acc')])
- self.output_tags = {
- "error": ("red", "bold"),
- "success": ("green", "normal"),
- "warning": ("orange", "bold"),
- "info": ("blue", "normal"),
- "command": ("cyan", "bold")
- }
- def get_command_templates(self):
- return {
- "🖥️ System Info": [
- ("System Info", "systeminfo"),
- ("OS Version", "ver"),
- ("Uptime", "systeminfo | findstr /i \"uptime\""),
- ("Computer Name", "echo %COMPUTERNAME%"),
- ("User Profile", "echo %USERPROFILE%"),
- ("Windows Dir", "echo %WINDIR%"),
- ("System Root", "echo %SYSTEMROOT%"),
- ("Processor Info", "wmic cpu get name,maxclockspeed /format:list"),
- ("BIOS Info", "wmic bios get serialnumber,version /format:list"),
- ("OS Details", "wmic os get caption,version,osarchitecture /format:list"),
- ("Memory Info", "wmic memorychip get capacity,speed /format:list"),
- ("Disk Info", "wmic diskdrive get model,size /format:list"),
- ("Logical Disk", "wmic logicaldisk get size,freespace,caption /format:table"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 💾 DRIVES & STORAGE
- # ═══════════════════════════════════════════════════════════════
- "💾 Drives & Storage": [
- ("C:\\Users List", "dir C:\\Users >> %COMPUTERNAME%-IS.txt"),
- ("Program Files", "dir \"C:\\Program Files\" >> %COMPUTERNAME%-IS.txt"),
- ("Drive Scan D:", "dir /S /B /A \"D:\\\" >> %COMPUTERNAME%-LISTD.txt"),
- ("Drive Scan E:", "dir /S /B /A \"E:\\\" >> %COMPUTERNAME%-LISTE.txt"),
- ("Drive Scan F:", "dir /S /B /A \"F:\\\" >> %COMPUTERNAME%-LISTF.txt"),
- ("Drive Scan G:", "dir /S /B /A \"G:\\\" >> %COMPUTERNAME%-LISTG.txt"),
- ("Drive Scan H:", "dir /S /B /A \"H:\\\" >> %COMPUTERNAME%-LISTH.txt"),
- ("Volume Info", "vol C:"),
- ("Diskpart List", "diskpart /c \"list disk\""),
- ("Disk Check", "chkdsk C: /f /r"),
- ("Defrag", "defrag C: /O /V"),
- ("Format Disk", "format D: /FS:NTFS /Q"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 📁 FILES & FOLDERS (DIR, CD, MD, RD)
- # ═══════════════════════════════════════════════════════════════
- "📁 Files & Folders": [
- ("Directory List", "dir /w"),
- ("Directory Recursive", "dir /s /b"),
- ("File Search *.txt", "dir /s /b *.txt"),
- ("Find Files", "where /r C:\\ *.exe"),
- ("Search Content", "findstr /s /i \"keyword\" *.txt"),
- ("Change Dir", "cd /d D:\\Example"),
- ("Root Dir", "cd\\"),
- ("Parent Dir", "cd.."),
- ("Make Directory", "mkdir NewFolder"),
- ("Remove Directory", "rmdir /s /q foldername"),
- ("Tree View", "tree C:\\ /f /a"),
- ("File Attributes", "attrib filename.txt"),
- ("Set Hidden", "attrib +h file.txt"),
- ("Remove Hidden", "attrib -h file.txt"),
- ("Set System", "attrib +s file.txt"),
- ("Remove System", "attrib -s file.txt"),
- ("Set Read-Only", "attrib +r file.txt"),
- ("Remove Read-Only", "attrib -r file.txt"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 📋 COPY, MOVE, RENAME, DELETE
- # ═══════════════════════════════════════════════════════════════
- "📋 Copy/Move/Rename/Delete": [
- ("Copy File", "copy source.txt dest\\"),
- ("Copy Multiple", "copy file1.txt+file2.txt combined.txt"),
- ("Copy Recursive", "copy /s source\\*.* destination\\"),
- ("Move File", "move source.txt dest\\"),
- ("Rename File", "ren oldname.txt newname.txt"),
- ("Rename Extension", "ren *.pyw *.py"),
- ("Robocopy Mirror", "robocopy source dest /mir"),
- ("Robocopy Backup", "robocopy source dest /backup"),
- ("XCopy Backup", "xcopy \"C:\\Data\" \"D:\\Backup\" /e /h /y"),
- ("Delete File", "del file.txt"),
- ("Delete Recursive", "del /s /q %temp%\\*.*"),
- ("Delete Folder", "rd /s /q foldername"),
- ("Force Delete", "del /f /q *.tmp"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🌐 NETWORK & INTERNET
- # ═══════════════════════════════════════════════════════════════
- "🌐 Network": [
- ("IP Configuration", "ipconfig /all"),
- ("DNS Cache", "ipconfig /displaydns"),
- ("Flush DNS", "ipconfig /flushdns"),
- ("Network Connections", "netstat -ano"),
- ("Listening Ports", "netstat -ano | find \"LISTEN\""),
- ("Ping Test", "ping google.com -n 4"),
- ("Traceroute", "tracert google.com"),
- ("PathPing", "pathping google.com"),
- ("ARP Table", "arp -a"),
- ("Route Table", "route print"),
- ("Get MAC", "getmac /v"),
- ("WiFi Profiles", "netsh wlan show profiles"),
- ("WiFi Details", "netsh wlan show profile name=\"SSID\" key=clear"),
- ("DNS Lookup", "nslookup google.com"),
- ("Netsh Firewall", "netsh advfirewall show allprofiles"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 👥 USERS, GROUPS & SESSIONS
- # ═══════════════════════════════════════════════════════════════
- "👥 Users & Groups": [
- ("User Accounts", "net user"),
- ("User Details", "net user %USERNAME%"),
- ("Local Groups", "net localgroup"),
- ("Local Admins", "net localgroup administrators"),
- ("Current User", "whoami /all"),
- ("Active Sessions", "query session"),
- ("Logged Users", "query user"),
- ("WMIC Users", "wmic useraccount get name,sid,disabled /format:table"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # ⚙️ PROCESSES & SERVICES
- # ═══════════════════════════════════════════════════════════════
- "⚙️ Processes & Services": [
- ("Running Processes", "tasklist"),
- ("Process Filter", "tasklist /fi \"imagename eq chrome.exe\""),
- ("Kill Process", "taskkill /f /im notepad.exe"),
- ("Services Status", "sc query"),
- ("Start Service", "sc start spooler"),
- ("Stop Service", "sc stop spooler"),
- ("Service Config", "sc config spooler start=auto"),
- ("Startup Programs", "wmic startup get caption,command"),
- ("Scheduled Tasks", "schtasks /query /fo LIST"),
- ("Create Task", "schtasks /create /tn \"MyTask\" /tr \"C:\\app.exe\" /sc daily /st 09:00"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🔐 SECURITY & FIREWALL
- # ═══════════════════════════════════════════════════════════════
- "🔐 Security": [
- ("Firewall Status", "netsh advfirewall show allprofiles"),
- ("Firewall Add Rule", "netsh advfirewall firewall add rule name=\"AllowApp\" dir=in action=allow program=\"C:\\app.exe\""),
- ("Windows Defender", "powershell -Command \"Get-MpComputerStatus\""),
- ("Audit Policy", "auditpol /get /category:*"),
- ("Event Logs", "wevtutil qe System /c:5 /f:text"),
- ("Clear Event Log", "wevtutil cl Application"),
- ("Registry Query", "reg query HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"),
- ("Take Ownership", "takeown /f file.txt"),
- ("Set Permissions", "icacls file.txt /grant Users:F"),
- ("Cipher Encrypt", "cipher /e C:\\SecretFolder"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🔧 SYSTEM REPAIR & RECOVERY
- # ═══════════════════════════════════════════════════════════════
- "🔧 Repair & Recovery": [
- ("SFC Scan", "sfc /scannow"),
- ("DISM Check", "DISM /Online /Cleanup-Image /CheckHealth"),
- ("DISM Restore", "DISM /Online /Cleanup-Image /RestoreHealth"),
- ("BCD Edit", "bcdedit /enum"),
- ("Bootrec Fix MBR", "bootrec /fixmbr"),
- ("Bootrec Fix Boot", "bootrec /fixboot"),
- ("Reagentc Info", "reagentc /info"),
- ("System Restore", "rstrui.exe"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🎨 UTILITIES & CONTROL PANEL
- # ═══════════════════════════════════════════════════════════════
- "🎨 Utilities": [
- ("Open Notepad", "notepad"),
- ("Open Calculator", "calc"),
- ("Open Regedit", "regedit"),
- ("Open Task Manager", "taskmgr"),
- ("Open Services", "services.msc"),
- ("Open Disk Management", "diskmgmt.msc"),
- ("Open Device Manager", "devmgmt.msc"),
- ("Open Event Viewer", "eventvwr.msc"),
- ("System Properties", "sysdm.cpl"),
- ("Control Panel", "control"),
- ("MsConfig", "msconfig"),
- ("DXDiag", "dxdiag"),
- ("MsInfo32", "msinfo32"),
- ("Color CMD", "color 0A"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🎬 FFMPEG VIDEO/AUDIO TOOLS
- # ═══════════════════════════════════════════════════════════════
- "🎬 FFmpeg Tools": [
- ("Convert Format", "ffmpeg -i input.mp4 output.mkv"),
- ("Resize Video", "ffmpeg -i input.mp4 -vf \"scale=1280:-2\" output.mp4"),
- ("Extract Audio", "ffmpeg -i video.mp4 -vn audio.mp3"),
- ("Trim Video", "ffmpeg -ss 00:01:00 -t 30 -i input.mp4 -c copy clip.mp4"),
- ("Change Quality", "ffmpeg -i input.mp4 -crf 23 output.mp4"),
- ("Change Bitrate", "ffmpeg -i input.mp4 -b:v 2M output.mp4"),
- ("Extract Frame", "ffmpeg -i input.mp4 -ss 00:00:05 -frames:v 1 image.png"),
- ("Merge Videos", "ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex \"concat\" output.mp4"),
- ("Audio Only", "ffmpeg -i input.mp4 -vn output.mp3"),
- ("Video Only", "ffmpeg -i input.mp4 -an output.mp4"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🖼️ IMAGEMAGICK IMAGE TOOLS
- # ═══════════════════════════════════════════════════════════════
- "🖼️ ImageMagick Tools": [
- ("Convert Format", "magick input.jpg output.png"),
- ("Resize Image", "magick input.jpg -resize 800x600 output.jpg"),
- ("Trim Image", "magick input.jpg -trim output.jpg"),
- ("Crop Image", "magick input.jpg -crop 800x600+0+0 output.jpg"),
- ("Rotate Image", "magick input.jpg -rotate 90 output.jpg"),
- ("Add Watermark", "magick input.jpg -gravity center -annotate +0+0 \"Text\" output.jpg"),
- ("Change Quality", "magick input.jpg -quality 85 output.jpg"),
- ("Batch Resize", "mogrify -resize 1280x720 *.jpg"),
- ("Batch Convert", "mogrify -format png *.jpg"),
- ("Add Border", "magick input.jpg -bordercolor white -border 10 output.jpg"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 📦 BATCH & POWERSHELL SCRIPTS
- # ═══════════════════════════════════════════════════════════════
- "📦 Scripts": [
- ("Batch Loop Files", "for %%f in (*.jpg) do echo %%f"),
- ("Batch Rename", "for %%f in (*.txt) do ren \"%%f\" \"backup_%%f\""),
- ("Batch Date Check", "IF \"%DATE%\" == \"Sat 12/16/2023\" start \"\" \"C:\\file.jpg\""),
- ("PowerShell List", "powershell Get-ChildItem *.txt"),
- ("PowerShell Rename", "powershell Get-ChildItem *.txt | Rename-Item -NewName {$_.Name -replace '.txt','.log'}"),
- ("PowerShell Process", "powershell Get-Process | Sort CPU -Descending | Select -First 10"),
- ("PowerShell Service", "powershell Get-Service | Where-Object {$_.Status -eq 'Running'}"),
- ("PowerShell Download", "powershell Invoke-WebRequest \"URL\" -OutFile \"file.zip\""),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🧹 CLEANUP & MAINTENANCE
- # ═══════════════════════════════════════════════════════════════
- "🧹 Cleanup": [
- ("Clear Temp", "del /s /q %temp%\\*.*"),
- ("Clear Windows Temp", "del /s /q C:\\Windows\\Temp\\*.*"),
- ("Empty Recycle Bin", "rd /s /q C:\\$Recycle.Bin"),
- ("Clear DNS", "ipconfig /flushdns"),
- ("Clear Event Logs", "wevtutil cl System && wevtutil cl Application"),
- ("Disk Cleanup", "cleanmgr /sagerun:1"),
- ("Compact OS", "compact /compactos:always"),
- ("Prefetch Clean", "del /q C:\\Windows\\Prefetch\\*.*"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🌍 WEB DOWNLOAD TOOLS (WGET/CURL/YOUTUBE-DL)
- # ═══════════════════════════════════════════════════════════════
- "🌍 Web Download": [
- ("Wget Download", "wget https://example.com/file.zip"),
- ("Wget Resume", "wget -c https://example.com/file.zip"),
- ("Wget Recursive", "wget -r -A pdf,doc https://example.com/docs/"),
- ("Curl Test", "curl -I https://example.com"),
- ("YouTube-DL Video", "youtube-dl -f best https://youtube.com/watch?v=ID"),
- ("YouTube-DL Audio", "youtube-dl -x --audio-format mp3 https://youtube.com/watch?v=ID"),
- ("yt-dlp Update", "yt-dlp -U"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 📱 TERMUX (ANDROID) COMMANDS
- # ═══════════════════════════════════════════════════════════════
- "📱 Termux": [
- ("Termux Update", "pkg update && pkg upgrade -y"),
- ("Termux Storage", "termux-setup-storage"),
- ("Termux Location", "termux-location"),
- ("Termux Battery", "termux-battery-status"),
- ("Termux WiFi Info", "termux-wifi-connectioninfo"),
- ("Termux Camera", "termux-camera-photo /sdcard/pic.jpg"),
- ("Termux SMS Send", "termux-sms-send -n 03001234567 \"Hello\""),
- ("Termux Torch", "termux-torch on"),
- ("Termux Vibrate", "termux-vibrate -d 1000"),
- ("Termux TTS", "termux-tts-speak \"Hello world\""),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🛠️ NIRCMD UTILITY COMMANDS
- # ═══════════════════════════════════════════════════════════════
- "🛠️ NirCmd": [
- ("Set Wallpaper", "nircmd.exe setwallpaper \"C:\\wallpaper.jpg\""),
- ("Open URL", "nircmd.exe openurl \"https://example.com\""),
- ("Monitor Off", "nircmd.exe monitor off"),
- ("Mute Volume", "nircmd.exe mutesysvolume 1"),
- ("Unmute Volume", "nircmd.exe mutesysvolume 0"),
- ("Shutdown", "nircmd.exe exitwin poweroff force"),
- ("Screenshot", "nircmd.exe savescreenshot \"C:\\shot.png\""),
- ("Speak Text", "nircmd.exe speak text \"Hello\""),
- ("Empty Recycle Bin", "nircmd.exe emptybin"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🐍 PYTHON & PYINSTALLER
- # ═══════════════════════════════════════════════════════════════
- "🐍 Python/PyInstaller": [
- ("Install PyInstaller", "pip install --upgrade pyinstaller"),
- ("Build EXE Basic", "pyinstaller --onefile --noconsole script.py"),
- ("Build EXE with Icon", "pyinstaller --onefile --noconsole --icon=app.ico script.py"),
- ("Build EXE with Data", "pyinstaller --onefile --add-data \"data.txt;.\" script.py"),
- ("Build EXE with VLC", "pyinstaller --onefile --add-binary \"libvlc.dll;.\" --noconsole script.py"),
- ("Auto-Py-To-Exe", "auto-py-to-exe"),
- ],
- # ═══════════════════════════════════════════════════════════════
- # 🔗 QUICK WEB LINKS
- # ═══════════════════════════════════════════════════════════════
- "🔗 Web Links": [
- ("ChatGPT", "start https://chatgpt.com"),
- ("Qwen AI", "start https://chat.qwen.ai"),
- ("Google Search", "start https://www.google.com/search?q="),
- ("YouTube", "start https://www.youtube.com"),
- ("GitHub", "start https://github.com"),
- ("Pastebin", "start https://pastebin.com"),
- ("VirusTotal", "start https://www.virustotal.com"),
- ("DeepL Translator", "start https://www.deepl.com"),
- ],
- }
- def create_widgets(self):
- # === TOP BAR ===
- self.top_bar = tk.Frame(self.root)
- self.top_bar.pack(fill="x", padx=5, pady=5)
- tk.Label(self.top_bar, text="🔥 GOD MODE V4 - ULTIMATE ADMIN EDITION",
- font=("Segoe UI", 18, "bold")).pack(side="left")
- self.admin_indicator = tk.Label(self.top_bar, text="⚠️ NOT ADMIN",
- font=("Segoe UI", 12, "bold"), fg="red")
- self.admin_indicator.pack(side="right", padx=10)
- self.theme_btn = tk.Button(self.top_bar, text="🌙 Dark", command=self.toggle_theme, width=8)
- self.theme_btn.pack(side="right", padx=5)
- # === ADMIN CONTROL PANEL ===
- self.admin_panel = tk.Frame(self.root)
- self.admin_panel.pack(fill="x", padx=5, pady=5)
- tk.Label(self.admin_panel, text="🛡️ ADMINISTRATOR CONTROL",
- font=("Segoe UI", 12, "bold")).pack(side="left", padx=10)
- self.admin_btn = tk.Button(self.admin_panel, text="🔓 Run as Admin",
- command=self.run_as_admin, bg="#ff6600", fg="white", font=("Segoe UI", 10, "bold"))
- self.admin_btn.pack(side="left", padx=5)
- self.refresh_admin_btn = tk.Button(self.admin_panel, text="🔄 Check Status",
- command=self.check_admin_privileges, bg="#007acc", fg="white")
- self.refresh_admin_btn.pack(side="left", padx=5)
- # === TOOLBAR WITH CATEGORIES ===
- self.toolbar = tk.Frame(self.root)
- self.toolbar.pack(fill="x", padx=10, pady=5)
- tk.Label(self.toolbar, text="📋 Templates:", font=("Segoe UI", 10)).pack(side="left")
- self.category_var = tk.StringVar()
- self.category_var.set("🖥️ System")
- self.category_menu = ttk.Combobox(self.toolbar, textvariable=self.category_var,
- values=list(self.templates.keys()), width=15, state="readonly")
- self.category_menu.pack(side="left", padx=5)
- self.category_menu.bind("<<ComboboxSelected>>", self.load_template_commands)
- self.load_template_btn = tk.Button(self.toolbar, text="📥 Load Templates",
- command=self.load_template_commands, bg="#28a745", fg="white")
- self.load_template_btn.pack(side="left", padx=5)
- quick_actions = [
- ("🚀 Elevate CMD", self.elevate_cmd),
- ("📊 System Monitor", self.open_system_monitor),
- ("🌐 Network Tools", self.open_network_tools),
- ("📜 Event Viewer", self.open_event_viewer),
- ]
- for text, cmd in quick_actions:
- btn = tk.Button(self.toolbar, text=text, command=cmd, width=12)
- btn.pack(side="left", padx=2)
- tk.Button(self.toolbar, text="💾 Export Log", command=self.save_log, width=10).pack(side="right", padx=2)
- tk.Button(self.toolbar, text="🗑️ Clear", command=self.clear_output, width=8).pack(side="right", padx=2)
- tk.Button(self.toolbar, text="📋 Copy", command=self.copy_output, width=8).pack(side="right", padx=2)
- # === MAIN CONTENT AREA ===
- self.paned = tk.PanedWindow(self.root, orient=tk.HORIZONTAL, bg="gray")
- self.paned.pack(fill="both", expand=True, padx=5, pady=5)
- # LEFT PANEL - Command Library
- self.left_frame = tk.Frame(self.paned)
- self.paned.add(self.left_frame, width=350)
- # 🔍 Search Box - ✅ FIXED: Added textvariable
- search_frame = tk.Frame(self.left_frame)
- search_frame.pack(fill="x", padx=5, pady=5)
- tk.Label(search_frame, text="🔍 Search:").pack(side="left")
- self.search_var = tk.StringVar()
- # ✅ Compatible trace for all tkinter versions
- try:
- self.search_var.trace_add("write", self.filter_commands)
- except AttributeError:
- self.search_var.trace("w", self.filter_commands)
- # ✅ KEY FIX: Connect Entry to StringVar
- self.search_entry = tk.Entry(search_frame, textvariable=self.search_var)
- self.search_entry.pack(side="left", fill="x", expand=True, padx=5)
- # Command Listbox
- self.listbox_frame = tk.Frame(self.left_frame)
- self.listbox_frame.pack(fill="both", expand=True, padx=5, pady=5)
- self.listbox = tk.Listbox(self.listbox_frame, font=("Consolas", 9), exportselection=False)
- self.listbox.pack(side="left", fill="both", expand=True)
- listbox_scroll = ttk.Scrollbar(self.listbox_frame, orient="vertical", command=self.listbox.yview)
- listbox_scroll.pack(side="right", fill="y")
- self.listbox.configure(yscrollcommand=listbox_scroll.set)
- self.listbox.bind("<Double-Button-1>", self.load_to_input)
- self.listbox.bind("<<ListboxSelect>>", self.on_listbox_select)
- # Listbox Controls
- lb_controls = tk.Frame(self.left_frame)
- lb_controls.pack(fill="x", padx=5, pady=5)
- tk.Button(lb_controls, text="📂 Load List", command=self.load_file, width=10).pack(side="left", expand=True)
- tk.Button(lb_controls, text="💾 Save List", command=self.save_file, width=10).pack(side="left", expand=True)
- tk.Button(lb_controls, text="➕ Add", command=self.add_current_command, width=8).pack(side="left", expand=True)
- self.cmd_info_label = tk.Label(self.left_frame, text="Commands: 0",
- font=("Segoe UI", 9), anchor="w")
- self.cmd_info_label.pack(fill="x", padx=5, pady=2)
- # RIGHT PANEL - Execution Area
- self.right_frame = tk.Frame(self.paned)
- self.paned.add(self.right_frame)
- # Command Input Section
- input_frame = tk.Frame(self.right_frame)
- input_frame.pack(fill="x", padx=5, pady=5)
- tk.Label(input_frame, text="⌨️ Command:", font=("Segoe UI", 11, "bold")).pack(side="left")
- self.cmd_entry = tk.Entry(input_frame, font=("Consolas", 11))
- self.cmd_entry.pack(side="left", fill="x", expand=True, padx=10)
- self.cmd_entry.bind("<Return>", lambda e: self.run_command_thread())
- self.cmd_entry.bind("<Up>", self.history_up)
- self.cmd_entry.bind("<Down>", self.history_down)
- # Run Buttons
- btn_frame = tk.Frame(input_frame)
- btn_frame.pack(side="left", padx=5)
- self.run_btn = tk.Button(btn_frame, text="▶ RUN", command=self.run_command_thread,
- bg="#28a745", fg="white", font=("Segoe UI", 10, "bold"), width=8)
- self.run_btn.pack(side="left", padx=2)
- self.admin_run_btn = tk.Button(btn_frame, text="🔓 RUN AS ADMIN",
- command=self.run_as_admin_command,
- bg="#ff6600", fg="white", font=("Segoe UI", 10, "bold"), width=12)
- self.admin_run_btn.pack(side="left", padx=2)
- self.stop_btn = tk.Button(btn_frame, text="⏹ STOP", command=self.stop_command,
- bg="#dc3545", fg="white", width=6, state="disabled")
- self.stop_btn.pack(side="left", padx=2)
- # Options Checkboxes
- options_frame = tk.Frame(self.right_frame)
- options_frame.pack(fill="x", padx=5, pady=3)
- self.run_as_admin_var = tk.BooleanVar(value=False)
- tk.Checkbutton(options_frame, text="🔓 Always Run as Admin",
- variable=self.run_as_admin_var).pack(side="left", padx=5)
- self.show_output_var = tk.BooleanVar(value=True)
- tk.Checkbutton(options_frame, text="📺 Show Output",
- variable=self.show_output_var).pack(side="left", padx=5)
- self.log_history_var = tk.BooleanVar(value=True)
- tk.Checkbutton(options_frame, text="📜 Log History",
- variable=self.log_history_var).pack(side="left", padx=5)
- # 📁 WORKING DIRECTORY SECTION
- dir_frame = tk.Frame(self.right_frame)
- dir_frame.pack(fill="x", padx=5, pady=5)
- tk.Label(dir_frame, text="📂 Work Dir:", font=("Segoe UI", 9, "bold")).pack(side="left")
- self.dir_entry = tk.Entry(dir_frame, textvariable=self.work_dir, font=("Consolas", 9), width=55)
- self.dir_entry.pack(side="left", fill="x", expand=True, padx=5)
- tk.Button(dir_frame, text="🗂️ Browse", command=self.browse_directory, width=8).pack(side="left", padx=2)
- tk.Button(dir_frame, text="🔄 Reset", command=self.reset_directory, width=8).pack(side="left", padx=2)
- tk.Button(dir_frame, text="▶ Apply", command=self.apply_directory, width=8, bg="#007acc", fg="white").pack(side="left", padx=2)
- # Output Area
- output_frame = tk.Frame(self.right_frame)
- output_frame.pack(fill="both", expand=True, padx=5, pady=5)
- tk.Label(output_frame, text="📊 Output Console:", font=("Segoe UI", 11, "bold")).pack(anchor="w")
- self.output = scrolledtext.ScrolledText(output_frame, font=("Consolas", 10), state='disabled')
- self.output.pack(fill="both", expand=True)
- self.output.tag_config("error", foreground="red", font=("Consolas", 10, "bold"))
- self.output.tag_config("success", foreground="green", font=("Consolas", 10))
- self.output.tag_config("warning", foreground="orange", font=("Consolas", 10, "bold"))
- self.output.tag_config("info", foreground="blue", font=("Consolas", 10))
- self.output.tag_config("command", foreground="cyan", font=("Consolas", 10, "bold"))
- self.output_menu = tk.Menu(self.root, tearoff=0)
- self.output_menu.add_command(label="📋 Copy All", command=self.copy_output)
- self.output_menu.add_command(label="🗑️ Clear", command=self.clear_output)
- self.output_menu.add_command(label="💾 Save Log", command=self.save_log)
- self.output.bind("<Button-3>", self.show_output_menu)
- # === STATUS BAR ===
- self.status_bar = tk.Frame(self.root)
- self.status_bar.pack(fill="x", side="bottom")
- self.status_left = tk.Label(self.status_bar, text="Ready", bd=1, relief=tk.SUNKEN, anchor="w")
- self.status_left.pack(side="left", fill="x", expand=True)
- self.status_middle = tk.Label(self.status_bar, text="| CPU: --% | RAM: --%", bd=1, relief=tk.SUNKEN)
- self.status_middle.pack(side="left")
- self.status_right = tk.Label(self.status_bar, text="| V4.0 Ultimate", bd=1, relief=tk.SUNKEN, anchor="e")
- self.status_right.pack(side="right")
- if PSUTIL_AVAILABLE:
- self.update_system_stats()
- self.entry_menu = tk.Menu(self.root, tearoff=0)
- self.entry_menu.add_command(label="Paste", command=self.paste_command)
- self.cmd_entry.bind("<Button-3>", self.show_entry_menu)
- def apply_theme(self):
- colors = self.dark_theme if self.current_theme == "dark" else self.light_theme
- self.root.configure(bg=colors["bg"])
- self.top_bar.configure(bg=colors["header_bg"])
- self.admin_panel.configure(bg=colors["header_bg"])
- self.toolbar.configure(bg=colors["bg"])
- self.left_frame.configure(bg=colors["bg"])
- self.right_frame.configure(bg=colors["bg"])
- self.paned.configure(bg=colors["bg"])
- self.status_bar.configure(bg=colors["header_bg"])
- self.theme_btn.configure(bg=colors["btn_bg"], fg=colors["btn_fg"])
- self.cmd_entry.configure(bg=colors["input_bg"], fg=colors["input_fg"],
- insertbackground=colors["fg"])
- self.output.configure(bg=colors["input_bg"], fg=colors["fg"])
- self.listbox.configure(bg=colors["input_bg"], fg=colors["fg"])
- self.search_entry.configure(bg=colors["input_bg"], fg=colors["input_fg"])
- self.dir_entry.configure(bg=colors["input_bg"], fg=colors["input_fg"],
- insertbackground=colors["fg"])
- self.status_left.configure(bg=colors["header_bg"], fg=colors["fg"])
- self.status_middle.configure(bg=colors["header_bg"], fg=colors["fg"])
- self.status_right.configure(bg=colors["header_bg"], fg=colors["fg"])
- self.cmd_info_label.configure(bg=colors["bg"], fg=colors["fg"])
- for widget in self.toolbar.winfo_children():
- if isinstance(widget, tk.Button):
- widget.configure(bg=colors["btn_bg"], fg=colors["btn_fg"])
- for widget in self.left_frame.winfo_children():
- if isinstance(widget, tk.Frame):
- for child in widget.winfo_children():
- if isinstance(child, tk.Button):
- child.configure(bg=colors["btn_bg"], fg=colors["btn_fg"])
- # Directory frame buttons styling
- dir_frame = None
- for frame in self.right_frame.winfo_children():
- if isinstance(frame, tk.Frame) and len(frame.winfo_children()) > 0:
- if any("Browse" in str(w.cget("text")) for w in frame.winfo_children() if isinstance(w, tk.Button)):
- dir_frame = frame
- break
- if dir_frame:
- dir_frame.configure(bg=colors["bg"])
- for widget in dir_frame.winfo_children():
- if isinstance(widget, tk.Button):
- widget.configure(bg=colors["btn_bg"], fg=colors["btn_fg"])
- def toggle_theme(self):
- self.current_theme = "light" if self.current_theme == "dark" else "dark"
- self.theme_btn.config(text="🌞 Light" if self.current_theme == "dark" else "🌙 Dark")
- self.apply_theme()
- def check_admin_privileges(self):
- try:
- if sys.platform == 'win32':
- self.is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
- else:
- self.is_admin = os.geteuid() == 0
- if self.is_admin:
- self.admin_indicator.config(text="✅ ADMIN", fg="green")
- self.admin_btn.config(text="✅ Running as Admin", state="disabled", bg="green")
- self.log_message("✅ Running with Administrator privileges", "success")
- else:
- self.admin_indicator.config(text="⚠️ NOT ADMIN", fg="red")
- self.admin_btn.config(text="🔓 Run as Admin", state="normal", bg="#ff6600")
- self.log_message("⚠️ Not running as Administrator. Some commands may fail.", "warning")
- except Exception as e:
- self.admin_indicator.config(text="❓ Unknown", fg="orange")
- self.log_message(f"❌ Admin check failed: {str(e)}", "error")
- def run_as_admin(self):
- """Restart the script with administrator privileges"""
- if sys.platform == 'win32':
- try:
- ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable,
- " ".join([__file__] + sys.argv[1:]), None, 1)
- self.root.destroy()
- except Exception as e:
- messagebox.showerror("Error", f"Failed to elevate: {str(e)}")
- else:
- messagebox.showinfo("Info", "Admin elevation only supported on Windows")
- def elevate_cmd(self):
- """Open elevated Command Prompt"""
- if sys.platform == 'win32':
- try:
- subprocess.Popen('cmd.exe', shell=True)
- self.log_message("🚀 Command Prompt opened", "info")
- except Exception as e:
- self.log_message(f"❌ Failed to open CMD: {str(e)}", "error")
- def open_system_monitor(self):
- try:
- subprocess.Popen('taskmgr.exe', shell=True)
- self.log_message("📊 Task Manager opened", "info")
- except Exception as e:
- self.log_message(f"❌ Failed: {str(e)}", "error")
- def open_network_tools(self):
- try:
- subprocess.Popen('ncpa.cpl', shell=True)
- self.log_message("🌐 Network Connections opened", "info")
- except Exception as e:
- self.log_message(f"❌ Failed: {str(e)}", "error")
- def open_event_viewer(self):
- try:
- subprocess.Popen('eventvwr.msc', shell=True)
- self.log_message("📜 Event Viewer opened", "info")
- except Exception as e:
- self.log_message(f"❌ Failed: {str(e)}", "error")
- # ==================== 🛠️ HELPER METHODS ====================
- def _get_display_name(self, cmd):
- """✅ Helper: Get friendly display name for any command"""
- cmd_clean = cmd.strip().lower()
- # Search templates with flexible matching
- for category in self.templates.values():
- for name, actual_cmd in category:
- if actual_cmd.strip().lower() == cmd_clean:
- return name
- # Fallback: generate display name from command
- clean_cmd = cmd.split('>>')[0].split('|')[0].strip()
- parts = clean_cmd.split()
- if not parts:
- return cmd[:40] + "..." if len(cmd) > 40 else cmd
- first_word = parts[0].lower().replace('"', '').replace("'", '')
- if first_word in ['cmd', 'powershell', 'cmd.exe', 'powershell.exe'] and len(parts) > 1:
- first_word = parts[1].replace('"', '').replace("'", '')
- display = cmd[:35] + "..." if len(cmd) > 35 else cmd
- return display
- def load_template_commands(self, event=None):
- """✅ Load commands with proper name/command mapping"""
- category = self.category_var.get()
- self.commands = []
- self.listbox_commands = []
- self.command_display_names = {} # ✅ Reset mapping
- self.listbox.delete(0, tk.END)
- if category in self.templates:
- for name, cmd in self.templates[category]:
- self.commands.append(cmd)
- self.listbox_commands.append(cmd)
- self.command_display_names[cmd] = name # ✅ Store for fast search
- self.listbox.insert(tk.END, name)
- self.update_command_count()
- self.log_message(f"📥 Loaded {len(self.commands)} commands from {category}", "info")
- def filter_commands(self, *args):
- """✅ FIXED: Filter works for both template AND custom commands"""
- keyword = self.search_var.get().lower()
- self.listbox.delete(0, tk.END)
- self.listbox_commands = []
- for cmd in self.commands:
- # ✅ Use stored display name or generate on fly
- display_name = self.command_display_names.get(cmd, self._get_display_name(cmd))
- if keyword in display_name.lower() or keyword in cmd.lower():
- self.listbox.insert(tk.END, display_name)
- self.listbox_commands.append(cmd)
- self.update_command_count()
- def load_file(self):
- """✅ Load commands from file with proper display"""
- path = filedialog.askopenfilename(filetypes=[("Text Files", "*.txt"), ("All Files", "*.*")])
- if path:
- try:
- with open(path, "r", encoding='utf-8') as f:
- loaded_commands = [line.strip() for line in f
- if line.strip() and not line.strip().startswith('#')]
- if not loaded_commands:
- messagebox.showinfo("Info", "No valid commands found in file")
- return
- self.commands = loaded_commands
- self.listbox_commands = loaded_commands[:]
- self.listbox.delete(0, tk.END)
- for cmd in loaded_commands:
- display_name = self._get_display_name(cmd)
- self.command_display_names[cmd] = display_name # ✅ Store mapping
- self.listbox.insert(tk.END, display_name)
- self.update_command_count()
- self.log_message(f"✅ Loaded {len(self.commands)} commands from {os.path.basename(path)}", "success")
- except UnicodeDecodeError:
- try:
- with open(path, "r", encoding='latin-1') as f:
- loaded_commands = [line.strip() for line in f
- if line.strip() and not line.strip().startswith('#')]
- self.commands = loaded_commands
- self.listbox_commands = loaded_commands[:]
- self.listbox.delete(0, tk.END)
- for cmd in loaded_commands:
- display_name = self._get_display_name(cmd)
- self.command_display_names[cmd] = display_name
- self.listbox.insert(tk.END, display_name)
- self.update_command_count()
- self.log_message(f"✅ Loaded {len(self.commands)} commands (latin-1 encoding)", "success")
- except Exception as e:
- messagebox.showerror("Encoding Error", f"Could not read file: {str(e)}")
- except Exception as e:
- messagebox.showerror("Error", f"Failed to load file: {str(e)}")
- def add_current_command(self):
- """✅ Add command with proper display name"""
- cmd = self.cmd_entry.get().strip()
- if cmd and cmd not in self.commands:
- self.commands.append(cmd)
- self.listbox_commands.append(cmd)
- display_name = self._get_display_name(cmd)
- self.command_display_names[cmd] = display_name # ✅ Store for search
- self.listbox.insert(tk.END, display_name)
- self.update_command_count()
- self.log_message("➕ Command added to list", "success")
- elif cmd in self.commands:
- self.log_message("⚠️ Command already in list", "warning")
- def on_listbox_select(self, event=None):
- """Show command preview when selecting from listbox"""
- selection = self.listbox.curselection()
- if selection and self.listbox_commands:
- idx = selection[0]
- if idx < len(self.listbox_commands):
- cmd = self.listbox_commands[idx]
- self.status_left.config(text=f"Selected: {cmd[:60]}...")
- def update_command_count(self):
- count = self.listbox.size()
- self.cmd_info_label.config(text=f"Commands: {count}")
- def load_to_input(self, event=None):
- """✅ Load actual command, not display name"""
- selection = self.listbox.curselection()
- if selection and self.listbox_commands:
- idx = selection[0]
- if idx < len(self.listbox_commands):
- cmd = self.listbox_commands[idx]
- self.cmd_entry.delete(0, tk.END)
- self.cmd_entry.insert(0, cmd)
- self.cmd_entry.focus()
- def save_file(self):
- path = filedialog.asksaveasfilename(defaultextension=".txt",
- filetypes=[("Text Files", "*.txt")])
- if path:
- try:
- with open(path, "w", encoding='utf-8') as f:
- for cmd in self.commands:
- f.write(cmd + "\n")
- self.log_message(f"💾 Saved {len(self.commands)} commands", "success")
- except Exception as e:
- messagebox.showerror("Error", str(e))
- def save_log(self):
- path = filedialog.asksaveasfilename(defaultextension=".log",
- filetypes=[("Log Files", "*.log"), ("Text Files", "*.txt")])
- if path:
- try:
- with open(path, "w", encoding='utf-8') as f:
- f.write(self.output.get("1.0", tk.END))
- self.log_message(f"📜 Log saved to {os.path.basename(path)}", "success")
- except Exception as e:
- messagebox.showerror("Error", str(e))
- def clear_output(self):
- self.output.config(state='normal')
- self.output.delete("1.0", tk.END)
- self.output.config(state='disabled')
- self.log_message("🧹 Output cleared", "info")
- def copy_output(self):
- self.root.clipboard_clear()
- self.root.clipboard_append(self.output.get("1.0", tk.END))
- self.log_message("📋 Output copied to clipboard", "success")
- def paste_command(self):
- try:
- text = self.root.clipboard_get()
- self.cmd_entry.insert(tk.END, text)
- except:
- pass
- def show_output_menu(self, event):
- self.output_menu.post(event.x_root, event.y_root)
- def show_entry_menu(self, event):
- self.entry_menu.post(event.x_root, event.y_root)
- def safety_check(self, cmd):
- dangerous = ['format', 'fdisk', 'del /f /s', 'rm -rf', 'shutdown -r',
- 'shutdown -s', 'diskpart', 'cipher /w']
- for d in dangerous:
- if d in cmd.lower():
- return messagebox.askyesno("⚠️ SECURITY WARNING",
- f"Dangerous command detected: '{d}'\n\nThis can PERMANENTLY damage your system!\n\nContinue?")
- return True
- def log_message(self, msg, msg_type="info"):
- timestamp = datetime.datetime.now().strftime("%H:%M:%S")
- self.status_left.config(text=f"{msg}")
- if msg_type in ["error", "success", "warning", "info", "command"]:
- self.output.config(state='normal')
- self.output.insert(tk.END, f"[{timestamp}] {msg}\n", msg_type)
- self.output.config(state='disabled')
- self.output.see(tk.END)
- def update_system_stats(self):
- """Update CPU and RAM usage in status bar"""
- if PSUTIL_AVAILABLE:
- try:
- cpu = psutil.cpu_percent(interval=1)
- ram = psutil.virtual_memory().percent
- self.status_middle.config(text=f"| CPU: {cpu}% | RAM: {ram}%")
- except:
- pass
- self.root.after(5000, self.update_system_stats)
- def history_up(self, event):
- if self.history:
- current = self.cmd_entry.get()
- if current not in self.history:
- self.history.insert(0, current)
- idx = self.history.index(current) + 1 if current in self.history else 0
- if idx < len(self.history):
- self.cmd_entry.delete(0, tk.END)
- self.cmd_entry.insert(0, self.history[idx])
- def history_down(self, event):
- if self.history:
- current = self.cmd_entry.get()
- if current in self.history:
- idx = self.history.index(current) - 1
- if idx >= 0:
- self.cmd_entry.delete(0, tk.END)
- self.cmd_entry.insert(0, self.history[idx])
- elif idx == -1:
- self.cmd_entry.delete(0, tk.END)
- # ==================== 📁 WORKING DIRECTORY METHODS ====================
- def browse_directory(self):
- """🗂️ Open folder browser and set working directory"""
- path = filedialog.askdirectory(title="Select Working Directory")
- if path:
- self.work_dir.set(path)
- self.log_message(f"📂 Directory selected: {path}", "info")
- def reset_directory(self):
- """🔄 Reset to default (current) directory"""
- default_path = os.getcwd()
- self.work_dir.set(default_path)
- self.log_message(f"🔄 Directory reset to: {default_path}", "info")
- def apply_directory(self):
- """▶ Validate and apply the working directory"""
- path = self.work_dir.get().strip()
- if path and os.path.isdir(path):
- self.log_message(f"✅ Working directory set: {path}", "success")
- return True
- else:
- self.log_message(f"❌ Invalid directory: {path}", "error")
- messagebox.showerror("Invalid Path", f"Directory does not exist:\n{path}")
- return False
- def get_working_directory(self):
- """📁 Get validated working directory for command execution"""
- path = self.work_dir.get().strip()
- if path and os.path.isdir(path):
- return path
- return None # Use default if invalid
- # ==================== COMMAND EXECUTION ====================
- def run_command_thread(self):
- if self.is_running:
- messagebox.showwarning("Warning", "A command is already running!")
- return
- cmd = self.cmd_entry.get().strip()
- if not cmd:
- messagebox.showwarning("Warning", "Please enter a command!")
- return
- if not self.safety_check(cmd):
- return
- self.is_running = True
- self.run_btn.config(state='disabled', text="⏳ Running...")
- self.stop_btn.config(state='normal')
- if self.log_history_var.get() and cmd not in self.history:
- self.history.insert(0, cmd)
- if len(self.history) > 100:
- self.history.pop()
- run_as_admin = self.run_as_admin_var.get()
- thread = threading.Thread(target=self.execute_command, args=(cmd, run_as_admin))
- thread.daemon = True
- thread.start()
- def run_as_admin_command(self):
- """🔓 Run command with administrator privileges"""
- cmd = self.cmd_entry.get().strip()
- if not cmd:
- messagebox.showwarning("Warning", "Please enter a command!")
- return
- if not self.safety_check(cmd):
- return
- if sys.platform == 'win32':
- try:
- # Get working directory for admin command
- work_dir = self.get_working_directory()
- if work_dir:
- cmd = f'cd /d "{work_dir}" && {cmd}'
- escaped_cmd = cmd.replace('"', '\\"')
- ctypes.windll.shell32.ShellExecuteW(
- None, "runas", "cmd.exe", f'/c "{escaped_cmd}"', None, 1
- )
- self.log_message(f"🔓 Command launched as Admin: {cmd}", "success")
- except Exception as e:
- self.log_message(f"❌ Failed to run as admin: {str(e)}", "error")
- else:
- self.log_message("❌ Admin execution only supported on Windows", "error")
- def execute_command(self, cmd, run_as_admin=False):
- try:
- self.output.config(state='normal')
- timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
- # 📁 Get working directory
- work_dir = self.get_working_directory()
- dir_info = f"📁 Dir: {work_dir}\n" if work_dir else ""
- self.output.insert(tk.END, f"\n{'='*60}\n", "info")
- self.output.insert(tk.END, f"📅 [{timestamp}] ", "info")
- self.output.insert(tk.END, f"CMD: {cmd}\n", "command")
- if dir_info:
- self.output.insert(tk.END, dir_info, "info")
- if run_as_admin:
- self.output.insert(tk.END, f"🔓 Running as Administrator\n", "warning")
- self.output.insert(tk.END, f"{'='*60}\n\n", "info")
- self.output.config(state='disabled')
- self.output.see(tk.END)
- # 📁 Prepare subprocess with working directory
- subprocess_kwargs = {
- 'shell': True,
- 'stdout': subprocess.PIPE,
- 'stderr': subprocess.PIPE,
- 'text': True,
- 'encoding': 'utf-8',
- 'errors': 'replace'
- }
- # 📁 Add cwd if valid directory specified
- if work_dir:
- subprocess_kwargs['cwd'] = work_dir
- self.process = subprocess.Popen(cmd, **subprocess_kwargs)
- stdout, stderr = self.process.communicate(timeout=120)
- self.root.after(0, self.update_output, stdout, stderr, self.process.returncode)
- except subprocess.TimeoutExpired:
- if self.process and self.process.poll() is None:
- self.process.kill()
- self.root.after(0, self.update_output, "", "⏱️ Command timed out (120s)", -1)
- except FileNotFoundError as e:
- self.root.after(0, self.update_output, "", f"❌ Directory not found: {work_dir}\n{str(e)}", -1)
- except Exception as e:
- self.root.after(0, self.update_output, "", str(e), -1)
- finally:
- self.process = None
- self.root.after(0, self.reset_run_btn)
- def update_output(self, stdout, stderr, returncode):
- self.output.config(state='normal')
- if stdout:
- self.output.insert(tk.END, f"✅ OUTPUT:\n{stdout}\n", "success")
- if stderr:
- self.output.insert(tk.END, f"❌ ERROR:\n{stderr}\n", "error")
- status = "Success" if returncode == 0 else f"Failed (Code: {returncode})"
- status_tag = "success" if returncode == 0 else "error"
- self.output.insert(tk.END, f"🏁 Status: {status}\n", status_tag)
- self.output.insert(tk.END, f"{'='*60}\n", "info")
- self.output.see(tk.END)
- self.output.config(state='disabled')
- def reset_run_btn(self):
- self.is_running = False
- self.run_btn.config(state='normal', text="▶ RUN")
- self.stop_btn.config(state='disabled')
- def stop_command(self):
- """⏹ Stop running command"""
- if self.process and self.process.poll() is None:
- try:
- self.process.kill()
- self.log_message("⏹ Command stopped", "warning")
- except:
- pass
- self.is_running = False
- self.reset_run_btn()
- if __name__ == "__main__":
- root = tk.Tk()
- try:
- if os.path.exists('COMMANDS/icon.ico'):
- root.iconbitmap('COMMANDS/icon.ico')
- except:
- pass
- app = GodModeUltimate(root)
- root.mainloop()
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=ryxjwerknp
- This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment