Skip to content

A comprehensive network analysis toolkit featuring a high-speed multi-threaded Port Scanner and a real-time Traffic Monitor. Designed with a beautiful CLI interface for efficient network diagnostics.

Notifications You must be signed in to change notification settings

waheeb71/Network-Insight-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Rich Scapy License

Network Scanning and Monitoring Tools

This repository contains two Python tools designed for network analysis: a Global Port Scanner and a Traffic Monitor. These tools are built to be efficient, easy to use, and provide clear, visually appealing output.

Prerequisites

Before using these tools, ensure you have Python installed. You will also need to install the required dependencies.

  1. Install Python Libraries: Run the following command to install the necessary packages:

    pip install rich scapy
  2. Windows Users: For the Traffic Monitor to work correctly on Windows, you must have Npcap installed. This is typically included when you install Wireshark. Ensure you check the option "Install Npcap in WinPcap API-compatible Mode" during installation.

1. Global Port Scanner (port_scanner.py)

Port Scanner Output

This tool allows you to scan a target IP address or hostname for open ports. It supports both TCP and UDP protocols, multi-threading for speed, and flexible port range selection.

Usage

To run the scanner, use the following command structure:

python port_scanner.py <TARGET> [OPTIONS]

Options

  • target: The IP address or hostname you want to scan.
  • -p, --ports: Specify the ports to scan. You can use a single port (e.g., 80), a range (e.g., 1-1024), a list (e.g., 22,80,443), or ALL to scan all 65535 ports. Default is 1-1024.
  • -a, --all: A shortcut flag to scan all ports (1-65535).
  • -u, --udp: Switch to UDP scanning mode (default is TCP).
  • -t, --threads: Set the number of concurrent threads. Default is 100.
  • --timeout: Set the socket timeout in seconds. Default is 1.0.

Examples

Scan default ports (1-1024) on a local IP:

python port_scanner.py 192.168.1.1

Scan all ports on a target:

python port_scanner.py 192.168.1.1 --all

Scan specific ports:

python port_scanner.py google.com -p 80,443,8080

Scan UDP ports:

python port_scanner.py 192.168.1.1 -p 53,123 --udp

2. Traffic Monitor (traffic_monitor.py)

Traffic Monitor Output

This tool acts as a lightweight network sniffer, similar to Wireshark, but focused on a specific target IP. It captures and displays traffic in a clean, readable table format directly in your terminal.

Usage

To start monitoring traffic for a specific IP:

python traffic_monitor.py <TARGET_IP>

Options

  • target_ip: The IP address you want to monitor.
  • -i, --interface: (Optional) Specify the network interface to use.
  • --count: (Optional) Stop after capturing a specific number of packets.

Important Note on Visibility

On modern switched networks (like most home Wi-Fi or office networks), your computer can typically only see traffic that is sent to or from your own device, or broadcast traffic. You will not see traffic between two other devices (e.g., between a phone and the router) unless you use specific network techniques like port mirroring.

This tool is best used for:

  • Monitoring traffic entering or leaving your own machine.
  • Troubleshooting network applications on your local device.
  • Educational purposes to understand packet flow.

Example

Monitor traffic for your local machine:

python traffic_monitor.py 127.0.0.1

To stop the capture, simply press Ctrl+C.


Disclaimer

These tools are intended for educational purposes and for managing networks you own or have permission to audit. Please use them responsibly.

Contact


Author / المطور

English: Waheeb Mahyoob Al-Humaeri العربية: وهيب مهيوب الحميري

About

A comprehensive network analysis toolkit featuring a high-speed multi-threaded Port Scanner and a real-time Traffic Monitor. Designed with a beautiful CLI interface for efficient network diagnostics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages