Fake Bank SMS & OTP Scams Explained with Python GUI (Cyber Security Demo)

 Demo :


Click Video πŸ‘‡πŸ‘‡πŸ‘‡























⭐ Features :

  • Hacker-style Python GUI

  • SMS keyword detection

  • Link risk analysis

  • Scam awareness demo

  • Full main.py code


Code :


import customtkinter as ctk

import tkinter as tk

from tkinter import messagebox

import time

import threading


# ---------------- CONFIG ----------------

ctk.set_appearance_mode("dark")

ctk.set_default_color_theme("dark-blue")


SCAM_KEYWORDS = [

    "urgent", "verify", "blocked", "suspended", "click",

    "link", "otp", "immediately", "account", "debit",

    "credit", "limit", "warning"

]


FAKE_DOMAINS = [

    "bit.ly", "tinyurl", "rb.gy", "paytm-secure",

    "upi-secure", "verify-now"

]


# ---------------- APP ----------------

class BankSMSDetector(ctk.CTk):


    def __init__(self):

        super().__init__()


        self.title("Bank SMS Detector - Hacker Simulation")

        self.geometry("520x580")

        self.resizable(False, False)


        self.build_ui()


    def build_ui(self):

        title = ctk.CTkLabel(

            self,

            text="⚠️ Fake Bank SMS Detector",

            font=("Consolas", 24, "bold"),

            text_color="#00ff99"

        )

        title.pack(pady=15)


        subtitle = ctk.CTkLabel(

            self,

            text="Cyber Security Simulation | Python GUI",

            font=("Consolas", 13),

            text_color="#aaaaaa"

        )

        subtitle.pack(pady=5)


        self.sms_box = ctk.CTkTextbox(

            self,

            width=580,

            height=180,

            font=("Consolas", 13)

        )

        self.sms_box.pack(pady=15)

        self.sms_box.insert(

            "0.0",

            "Paste Bank / OTP SMS here..."

        )


        self.scan_btn = ctk.CTkButton(

            self,

            text="πŸ” Scan SMS",

            font=("Consolas", 16, "bold"),

            command=self.start_scan

        )

        self.scan_btn.pack(pady=10)


        self.status_label = ctk.CTkLabel(

            self,

            text="Status: Waiting for input...",

            font=("Consolas", 14),

            text_color="#ffaa00"

        )

        self.status_label.pack(pady=10)


        self.result_box = ctk.CTkTextbox(

            self,

            width=580,

            height=140,

            font=("Consolas", 13)

        )

        self.result_box.pack(pady=10)


    # ---------------- SCAN LOGIC ----------------

    def start_scan(self):

        sms = self.sms_box.get("0.0", "end").lower().strip()

        if not sms or "paste" in sms:

            messagebox.showwarning("Input Error", "Please paste an SMS to scan.")

            return


        self.result_box.delete("0.0", "end")

        self.status_label.configure(text="Status: Scanning...", text_color="#ffaa00")


        threading.Thread(target=self.fake_scan, args=(sms,), daemon=True).start()


    def fake_scan(self, sms):

        steps = [

            "Connecting to cyber engine...",

            "Analyzing sender pattern...",

            "Checking keywords...",

            "Scanning embedded links...",

            "Finalizing risk score..."

        ]


        for step in steps:

            self.update_status(step)

            time.sleep(0.7)


        risk_score = 0

        reasons = []


        for word in SCAM_KEYWORDS:

            if word in sms:

                risk_score += 1

                reasons.append(f"⚠ Suspicious keyword detected: '{word}'")


        for domain in FAKE_DOMAINS:

            if domain in sms:

                risk_score += 2

                reasons.append(f"🚨 Dangerous link detected: '{domain}'")


        if "otp" in sms and "share" in sms:

            risk_score += 2

            reasons.append("🚨 OTP sharing attempt detected")


        # ---------------- RESULT ----------------

        self.result_box.insert("end", "=== Scan Report ===\n\n")


        if risk_score >= 4:

            self.status_label.configure(

                text="Status: HIGH RISK (Possible Scam)",

                text_color="#ff4444"

            )

            self.result_box.insert(

                "end",

                "❌ RESULT: HIGH RISK SMS\n\n"

            )

        elif risk_score >= 2:

            self.status_label.configure(

                text="Status: MEDIUM RISK",

                text_color="#ffaa00"

            )

            self.result_box.insert(

                "end",

                "⚠ RESULT: SUSPICIOUS SMS\n\n"

            )

        else:

            self.status_label.configure(

                text="Status: LOW RISK",

                text_color="#00ff99"

            )

            self.result_box.insert(

                "end",

                "✅ RESULT: SMS looks safe\n\n"

            )


        if reasons:

            for r in reasons:

                self.result_box.insert("end", f"- {r}\n")

        else:

            self.result_box.insert("end", "- No obvious scam indicators found\n")


        self.result_box.insert(

            "end",

            "\n⚠ Note: This is a cyber security simulation for awareness."

        )


    def update_status(self, text):

        self.status_label.configure(text=f"Status: {text}")


# ---------------- RUN ----------------

if __name__ == "__main__":

    app = BankSMSDetector()

    app.mainloop()


Comments

Popular posts from this blog

Is This News Real or Fake? πŸ€– AI Exposes the Truth | FuzzuTech Python App Demo

🚨 Python Intrusion Detection System (IDS) – Real-Time ML + Tkinter GUI Project | FuzzuTech

Educational File Encryptor GUI (Python AES Project) | FuzzuTech