AI USB Hacker Device Detector – Python Cyber Security Tool (Tkinter GUI)
Demo :
Click Video πππ
✨ Features
-
Real-time USB scanning
-
Detects suspicious hacker files
-
Auto popup warning
-
Hacker-style neon GUI
-
Ideal for students & offices
Code :
import os
import time
import threading
import psutil
from tkinter import *
from tkinter import messagebox
# ================= GUI =================
root = Tk()
root.title("AI USB Hacker Detector")
root.geometry("460x400")
root.configure(bg="#050505")
root.resizable(False, False)
Label(root, text="AI USB HACKER DEVICE DETECTOR",
fg="#00ff00", bg="#050505",
font=("Consolas", 15, "bold")).pack(pady=12)
status = Label(root, text="Status: Waiting for USB...",
fg="white", bg="#050505",
font=("Consolas", 11))
status.pack(pady=5)
log = Text(root, height=14, width=54, bg="black", fg="#00ff00",
insertbackground="#00ff00", font=("Consolas", 9))
log.pack(pady=10)
# ================= LOGIC =================
def is_suspicious(file):
bad_ext = [".lnk", ".vbs", ".bat", ".cmd", ".js", ".exe", ".scr", ".ps1"]
return any(file.lower().endswith(ext) for ext in bad_ext)
def scan_usb():
detected = set()
while True:
status.config(text="Status: Scanning USB ports...")
for p in psutil.disk_partitions():
if 'removable' in p.opts.lower():
mount = p.mountpoint
try:
for f in os.listdir(mount):
if is_suspicious(f) and f not in detected:
detected.add(f)
log.insert(END, f"[ALERT] Suspicious File Found → {f}\n")
log.see(END)
messagebox.showwarning("HACKER DEVICE ALERT",
f"⚠ Suspicious hacker file detected!\n\nFile: {f}\nUSB: {mount}")
except:
pass
time.sleep(5)
threading.Thread(target=scan_usb, daemon=True).start()
root.mainloop()
Comments
Post a Comment