How to Build a Cybersecurity Scanner App in Python GUI (Modern Hacking-Style Interface)
Demo :
Click Video πππ
π Features:
-
Stylish Hacker-Like Interface π―
-
One-click Scan + Definitions Update
-
Pure Python, No Extra Libraries
-
Beginner Friendly + Looks Pro
Code :
import tkinter as tk
from tkinter import messagebox
from datetime import datetime
import random
# GUI Setup
root = tk.Tk()
root.title("CyberShield - Cybersecurity App")
root.geometry("500x400")
root.configure(bg="#0f172a")
# Fonts and colors
TITLE_FONT = ("Helvetica", 18, "bold")
LABEL_FONT = ("Helvetica", 12)
BUTTON_FONT = ("Helvetica", 10, "bold")
FG_COLOR = "#f8fafc"
BG_COLOR = "#0f172a"
BTN_COLOR = "#1e293b"
HIGHLIGHT = "#22d3ee"
# Functions
def scan_system():
output.set("π Scanning...")
root.after(1500, lambda: output.set("✅ No threats found." if random.choice([True, False]) else "⚠️ Threats detected!"))
def update_defs():
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
output.set(f"⬇️ Definitions updated at {current_time}")
def show_about():
messagebox.showinfo("About", "CyberShield v1.0\nDeveloped by Fuzzu Developer\nFor educational use only.")
# Widgets
tk.Label(root, text="CyberShield", font=TITLE_FONT, fg=HIGHLIGHT, bg=BG_COLOR).pack(pady=20)
tk.Button(root, text="Scan System", font=BUTTON_FONT, bg=BTN_COLOR, fg=FG_COLOR, command=scan_system).pack(pady=10)
tk.Button(root, text="Update Definitions", font=BUTTON_FONT, bg=BTN_COLOR, fg=FG_COLOR, command=update_defs).pack(pady=10)
tk.Button(root, text="About", font=BUTTON_FONT, bg=BTN_COLOR, fg=FG_COLOR, command=show_about).pack(pady=10)
output = tk.StringVar()
output.set("Welcome to CyberShield!")
tk.Label(root, textvariable=output, font=LABEL_FONT, fg=FG_COLOR, bg=BG_COLOR, wraplength=400).pack(pady=20)
tk.Label(root, text="Developed by FuzzuTech", font=("Courier", 9), fg="#94a3b8", bg=BG_COLOR).pack(side="bottom", pady=10)
root.mainloop()
Comments
Post a Comment