π₯AI Tool] Phishing Email Analyzer – Scan & Detect Scam Mails in Seconds | FuzzuTech
Demo :
Click Video πππ
π Features Section:
-
Built with Python + Tkinter GUI
-
Uses AI techniques to detect suspicious content
-
Analyzes
.eml
files offline -
Real-time phishing alert system
-
Beginner-friendly GUI
-
Ideal for students, cybersecurity learners, and tech lovers
Code :
import tkinter as tk
from tkinter import filedialog, messagebox
from tkinter import ttk
import email
from email import policy
from email.parser import BytesParser
import re
def analyze_email(file_path):
with open(file_path, 'rb') as f:
msg = BytesParser(policy=policy.default).parse(f)
subject = msg['subject'] or ""
from_addr = msg['from'] or ""
body = msg.get_body(preferencelist=('plain')).get_content() if msg.get_body(preferencelist=('plain')) else ""
score = 0
if re.search(r'urgent|immediate action required', subject, re.IGNORECASE):
score += 1
if re.search(r'click here|verify your account', body, re.IGNORECASE):
score += 1
if re.search(r'http[s]?://', body):
score += 1
return score, subject, from_addr
def browse_file():
path = filedialog.askopenfilename(filetypes=[("Email Files", "*.eml")])
if path:
score, subject, from_addr = analyze_email(path)
if score >= 2:
result = f"⚠️ Phishing Alert Detected!\n\nSubject: {subject}\nFrom: {from_addr}"
else:
result = f"✅ Safe Email\n\nSubject: {subject}\nFrom: {from_addr}"
result_label.config(text=result)
# Main Window
root = tk.Tk()
root.title("FuzzuTech | AI Phishing Email Analyzer")
root.geometry("600x400")
root.configure(bg="#1e1e2e")
style = ttk.Style()
style.theme_use("clam")
style.configure("TButton", font=("Segoe UI", 12), padding=10, background="#3e8ef7", foreground="white")
style.map("TButton", background=[("active", "#1f6feb")])
# Title Label
title = tk.Label(root, text="π Phishing Email Analyzer", font=("Segoe UI", 20, "bold"), fg="white", bg="#1e1e2e")
title.pack(pady=20)
# Browse Button
browse_btn = ttk.Button(root, text="π Select .eml Email File", command=browse_file)
browse_btn.pack(pady=10)
# Result Display
result_label = tk.Label(root, text="", wraplength=500, justify="left", font=("Segoe UI", 12), fg="#c0caf5", bg="#1e1e2e")
result_label.pack(pady=30)
root.mainloop()
Comments
Post a Comment