πŸ”₯ Fuzzu Ethical Port Scanner – Python GUI App to Scan Open Ports Fast

 Demo :


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





Description:

Fuzzu Ethical Port Scanner is a Python GUI app that scans open ports on any IP/domain using threading for fast performance. Designed in a stylish dark mode with tkinter + socket module. Perfect for cybersecurity students, ethical hackers, and Python enthusiasts. Created by FuzzuTech. Learn, build, and secure!


Features:

  • Threaded port scanning from 1–1024

  • Fast GUI display with Treeview

  • Dark mode design (hacker-style)

  • Error handling for invalid hosts

  • Built using core Python libraries only


Code :


import socket

import threading

import tkinter as tk

from tkinter import ttk, messagebox

from datetime import datetime


# -------------------- SCAN FUNCTION --------------------

def scan_port(host, port, tree):

    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    s.settimeout(0.5)

    try:

        con = s.connect((host, port))

        tree.insert("", "end", values=(port, "Open"))

        con.close()

    except:

        pass


def start_scan():

    tree.delete(*tree.get_children())  # Clear table

    target = host_entry.get().strip()


    if not target:

        messagebox.showerror("Error", "Please enter a target IP or hostname.")

        return


    try:

        socket.gethostbyname(target)

    except socket.gaierror:

        messagebox.showerror("Error", "Invalid host!")

        return


    start_time = datetime.now()


    try:

        for port in range(1, 1025):

            thread = threading.Thread(target=scan_port, args=(target, port, tree))

            thread.start()

    except KeyboardInterrupt:

        messagebox.showinfo("Stopped", "Scan stopped by user.")


    end_time = datetime.now()

    duration = end_time - start_time

    status_label.config(text=f"Scan Completed in {duration}")


# -------------------- UI --------------------

root = tk.Tk()

root.title("Fuzzu - Ethical Port Scanner")

root.geometry("650x500")

root.configure(bg="#0d1117")

root.resizable(False, False)


style = ttk.Style()

style.theme_use("clam")

style.configure("Treeview", background="#161b22", foreground="white", rowheight=25, fieldbackground="#161b22")

style.map("Treeview", background=[("selected", "#58a6ff")])


# Heading

title_label = tk.Label(root, text="Fuzzu Ethical Port Scanner", font=("Segoe UI", 18, "bold"), fg="#58a6ff", bg="#0d1117")

title_label.pack(pady=15)


# Host Entry

host_frame = tk.Frame(root, bg="#0d1117")

host_frame.pack(pady=10)

tk.Label(host_frame, text="Target IP/Domain:", font=("Segoe UI", 12), fg="white", bg="#0d1117").grid(row=0, column=0, padx=5)

host_entry = tk.Entry(host_frame, font=("Segoe UI", 12), width=30, bg="#161b22", fg="white", insertbackground="white")

host_entry.grid(row=0, column=1, padx=5)


# Scan Button

scan_btn = tk.Button(root, text="Start Scan", font=("Segoe UI", 12, "bold"), bg="#238636", fg="white", activebackground="#2ea043", activeforeground="white", command=start_scan)

scan_btn.pack(pady=10)


# Result Table

tree_frame = tk.Frame(root, bg="#0d1117")

tree_frame.pack(pady=10)

tree = ttk.Treeview(tree_frame, columns=("Port", "Status"), show="headings", height=15)

tree.heading("Port", text="Port")

tree.heading("Status", text="Status")

tree.column("Port", width=100, anchor="center")

tree.column("Status", width=200, anchor="center")

tree.pack()


# Status Label

status_label = tk.Label(root, text="", font=("Segoe UI", 10), fg="white", bg="#0d1117")

status_label.pack(pady=5)


root.mainloop()

Comments

Popular posts from this blog

πŸš€ Simple Login & Registration System in Python Tkinter πŸ“±

πŸ”₯ Advanced MP3 Music Player in Python | CustomTkinter + Pygame | Free Source Code

πŸš€ Create a Python Screen Recorder with Audio (Complete Code)