Your Webcam & Microphone Might Be Active Without You Knowing (Python GUI Tool)
Demo :
Click Video πππ
⭐ Features :
-
Modern hacker-style GUI
-
Python CustomTkinter
-
Cyber security awareness
-
Webcam & microphone monitoring simulation
-
Live security logs
-
Beginner-friendly code
Code :
import customtkinter as ctk
import random
import time
import threading
# ----------------- APP CONFIG -----------------
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("dark-blue")
APP_TITLE = "ShadowWatch • Cyber Security Monitor"
APP_SIZE = "600x520"
# ----------------- MAIN APP -----------------
class ShadowWatchApp(ctk.CTk):
def __init__(self):
super().__init__()
self.title(APP_TITLE)
self.geometry(APP_SIZE)
self.resizable(False, False)
self.running = True
self.build_ui()
self.start_simulation()
# ----------------- UI -----------------
def build_ui(self):
# HEADER
header = ctk.CTkFrame(self, height=60, corner_radius=0)
header.pack(fill="x")
title = ctk.CTkLabel(
header,
text="π‘️ SHADOWWATCH — SYSTEM SURVEILLANCE",
font=("Segoe UI", 20, "bold"),
text_color="#00ff9c"
)
title.pack(pady=15)
# MAIN BODY
body = ctk.CTkFrame(self)
body.pack(fill="both", expand=True, padx=20, pady=20)
# LEFT PANEL
left = ctk.CTkFrame(body, width=260)
left.pack(side="left", fill="y", padx=10)
self.cam_status = self.status_card(left, "π₯ WEBCAM", "IDLE")
self.mic_status = self.status_card(left, "π️ MICROPHONE", "IDLE")
self.net_status = self.status_card(left, "π NETWORK", "SECURE")
# RIGHT PANEL
right = ctk.CTkFrame(body)
right.pack(side="right", fill="both", expand=True, padx=10)
log_title = ctk.CTkLabel(
right,
text="LIVE SECURITY LOGS",
font=("Consolas", 16, "bold"),
text_color="#ff5555"
)
log_title.pack(anchor="w", pady=(10, 5), padx=10)
self.log_box = ctk.CTkTextbox(
right,
font=("Consolas", 13),
text_color="#00ff9c"
)
self.log_box.pack(fill="both", expand=True, padx=10, pady=10)
self.log_box.insert("end", "[ SYSTEM INITIALIZED ]\n")
# FOOTER
footer = ctk.CTkLabel(
self,
text="Simulation Tool • Cyber Awareness Only • No Real Monitoring",
font=("Segoe UI", 10),
text_color="#777777"
)
footer.pack(pady=5)
# ----------------- STATUS CARD -----------------
def status_card(self, parent, title, status):
frame = ctk.CTkFrame(parent, height=100)
frame.pack(fill="x", pady=10, padx=10)
label = ctk.CTkLabel(
frame,
text=title,
font=("Segoe UI", 15, "bold")
)
label.pack(pady=(10, 5))
status_label = ctk.CTkLabel(
frame,
text=status,
font=("Segoe UI", 18, "bold"),
text_color="#00ff9c"
)
status_label.pack(pady=5)
return status_label
# ----------------- SIMULATION -----------------
def start_simulation(self):
threading.Thread(target=self.simulate_activity, daemon=True).start()
def simulate_activity(self):
while self.running:
time.sleep(random.randint(2, 4))
event = random.choice([
"cam_on", "mic_on", "net_warn", "safe"
])
if event == "cam_on":
self.update_status(self.cam_status, "ACTIVE", "#ff4444")
self.log("⚠️ Webcam activated by unknown process")
elif event == "mic_on":
self.update_status(self.mic_status, "LISTENING", "#ff4444")
self.log("⚠️ Microphone access detected")
elif event == "net_warn":
self.update_status(self.net_status, "SUSPICIOUS", "#ffaa00")
self.log("⚠️ Suspicious outbound network traffic")
else:
self.reset_status()
# ----------------- HELPERS -----------------
def update_status(self, label, text, color):
label.configure(text=text, text_color=color)
def reset_status(self):
self.cam_status.configure(text="IDLE", text_color="#00ff9c")
self.mic_status.configure(text="IDLE", text_color="#00ff9c")
self.net_status.configure(text="SECURE", text_color="#00ff9c")
self.log("✔ System running normally")
def log(self, message):
timestamp = time.strftime("%H:%M:%S")
self.log_box.insert("end", f"[{timestamp}] {message}\n")
self.log_box.see("end")
# ----------------- RUN -----------------
if __name__ == "__main__":
app = ShadowWatchApp()
app.mainloop()
Comments
Post a Comment