π‘️ Fuzzu Ransomware File Shield – Real-Time Folder Monitor in Python GUI
Demo :
Click Video πππ
✍️ Description :
FuzzuTech introduces a real-time ransomware detector app made in Python. It uses tkinter
and watchdog
to alert users instantly when suspicious file types are dropped in the monitored folder. Ideal for cybersecurity learners, ethical hackers, and GUI developers. No antivirus? No problem. Let Fuzzu Folder Shield protect your system.
π§© Features :
-
Real-time file monitoring using watchdog
-
Alert popups for suspicious file types
-
Beautiful dark-mode GUI
-
Built in Python with threading
-
Folder protection without antivirus
Code :
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import threading
import os
import time
# ========== Custom Handler ==========
class RansomwareDetector(FileSystemEventHandler):
def __init__(self, app):
self.app = app
def on_created(self, event):
if any(event.src_path.endswith(ext) for ext in [".exe", ".locked", ".crypt", ".enc", ".ransomed"]):
self.app.log(f"[ALERT] Suspicious file detected: {event.src_path}")
self.app.show_alert_popup(event.src_path)
# ========== Main GUI Application ==========
class FolderShieldApp:
def __init__(self, root):
self.root = root
self.root.title("π‘️ Ransomware File Shield")
self.root.geometry("600x450")
self.root.resizable(False, False)
self.root.configure(bg="#101820")
style = ttk.Style()
style.theme_use('clam')
style.configure("TButton", font=("Helvetica", 10), padding=6)
self.title_label = tk.Label(root, text="π‘️ Folder Shield: Real-Time Ransomware Monitor",
font=("Segoe UI", 14, "bold"), bg="#101820", fg="#F2AA4C")
self.title_label.pack(pady=20)
self.path_frame = tk.Frame(root, bg="#101820")
self.path_frame.pack(pady=10)
self.path_label = tk.Label(self.path_frame, text="Monitor Folder Path: ", font=("Segoe UI", 10),
bg="#101820", fg="#F2AA4C")
self.path_label.pack(side=tk.LEFT)
self.folder_path = tk.StringVar()
self.folder_path.set(os.path.expanduser("~")) # Default to user folder
self.path_entry = ttk.Entry(self.path_frame, width=50, textvariable=self.folder_path)
self.path_entry.pack(side=tk.LEFT, padx=5)
self.start_button = ttk.Button(root, text="Start Monitoring", command=self.start_monitoring)
self.start_button.pack(pady=10)
self.log_text = tk.Text(root, height=12, width=70, bg="#1A1A1D", fg="#00FF99", font=("Consolas", 10))
self.log_text.pack(pady=10)
self.log_text.insert(tk.END, "π Folder monitoring logs will appear here...\n")
def log(self, message):
self.log_text.insert(tk.END, f"{time.strftime('%H:%M:%S')} - {message}\n")
self.log_text.see(tk.END)
def show_alert_popup(self, path):
messagebox.showwarning("Ransomware Alert", f"⚠️ Suspicious file created:\n{path}")
def start_monitoring(self):
folder = self.folder_path.get()
if not os.path.exists(folder):
self.log("❌ Invalid folder path.")
return
self.log(f"✅ Monitoring started on: {folder}")
event_handler = RansomwareDetector(self)
observer = Observer()
observer.schedule(event_handler, path=folder, recursive=True)
thread = threading.Thread(target=self.run_observer, args=(observer,))
thread.daemon = True
thread.start()
def run_observer(self, observer):
observer.start()
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
observer.stop()
observer.join()
# ========== Run App ==========
if __name__ == "__main__":
root = tk.Tk()
app = FolderShieldApp(root)
root.mainloop()
Comments
Post a Comment