Live IP & Port Tracker with AI Threat Score – Python GUI | FuzzuTech
Demo :
Click Video πππ
πΉ Description :
Track any IP address with AI Threat Score & real-time port scanning using this Python GUI app. Built with tkinter, socket & threading.
πΉ Features :
-
IPv4 Address Validation
-
AI-Based Threat Score Generator
-
Port Scanner (20–1024)
-
Threaded Fast Scan
-
Custom Dark Mode GUI (tkinter)
-
Python Code GUI App – 100% Open Source
-
Lightweight Ethical Hacking Utility
Code :
import tkinter as tk
from tkinter import ttk, messagebox
import socket
import threading
import random
import re
# Simulate AI threat score based on IP
def get_threat_score(ip):
random.seed(sum([int(x) for x in ip.split('.')]))
return random.randint(10, 99)
# Scan common ports
def scan_ports(ip, output_box):
output_box.insert(tk.END, f"\n[π Scanning Ports on {ip}...]\n")
for port in range(20, 1025):
try:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.settimeout(0.2)
result = s.connect_ex((ip, port))
if result == 0:
output_box.insert(tk.END, f"✅ Port {port} is open\n")
except Exception as e:
output_box.insert(tk.END, f"❌ Error on port {port}: {e}\n")
# Main logic on button press
def start_tracking(ip_entry, threat_score_var, output_box):
ip = ip_entry.get().strip()
ipv4_pattern = r"^\d{1,3}(\.\d{1,3}){3}$"
if not re.match(ipv4_pattern, ip):
messagebox.showerror("Invalid IP", "❌ Please enter a valid IPv4 address (e.g., 192.168.1.1)")
return
try:
threat_score = get_threat_score(ip)
threat_score_var.set(f"{threat_score} / 100")
output_box.delete(1.0, tk.END)
threading.Thread(target=scan_ports, args=(ip, output_box), daemon=True).start()
except Exception as e:
messagebox.showerror("Error", str(e))
# GUI Setup
root = tk.Tk()
root.title("π‘️ Live IP & Port Tracker (AI Threat Score)")
root.geometry("650x520")
root.configure(bg="#1f1f1f")
style = ttk.Style(root)
style.theme_use("clam")
style.configure("TLabel", background="#1f1f1f", foreground="#ffffff", font=("Segoe UI", 12))
style.configure("TButton", font=("Segoe UI", 12), padding=6)
style.configure("TEntry", font=("Segoe UI", 12))
title = ttk.Label(root, text="π‘️ Python GUI – Live IP & Port Tracker with AI", font=("Segoe UI", 18, "bold"))
title.pack(pady=10)
frame = ttk.Frame(root)
frame.pack(pady=10)
ip_label = ttk.Label(frame, text="Enter IP Address:")
ip_label.grid(row=0, column=0, padx=5, pady=5)
ip_entry = ttk.Entry(frame, width=30)
ip_entry.grid(row=0, column=1, padx=5, pady=5)
threat_score_var = tk.StringVar(value="0 / 100")
threat_label = ttk.Label(frame, text="AI Threat Score:")
threat_label.grid(row=1, column=0, padx=5, pady=5)
threat_display = ttk.Label(frame, textvariable=threat_score_var, foreground="#ff4f4f", font=("Segoe UI", 12, "bold"))
threat_display.grid(row=1, column=1, padx=5, pady=5)
track_button = ttk.Button(root, text="▶️ Track Now", command=lambda: start_tracking(ip_entry, threat_score_var, output_box))
track_button.pack(pady=10)
output_box = tk.Text(root, height=15, bg="#121212", fg="#00ff88", font=("Consolas", 11))
output_box.pack(fill=tk.BOTH, padx=10, pady=10, expand=True)
root.mainloop()
Comments
Post a Comment