Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.61 KB

File metadata and controls

45 lines (29 loc) · 1.61 KB

Python Port Scanner with Banner Grabbing and Subnet Support

Overview

This is a multi-threaded Python port scanner designed for network security and reconnaissance tasks. It supports scanning single hosts, hostnames, and entire subnets. The tool performs banner grabbing on open ports and saves results in both human-readable text and structured JSON formats.

This project is ideal for demonstrating practical cybersecurity and networking skills, including socket programming, concurrency, IP manipulation, and report generation.


Features

  • Scan single IP addresses, domain names, or CIDR subnets (e.g., 192.168.1.0/24)
  • Multithreaded scanning for improved speed and efficiency
  • Banner grabbing for detected open ports
  • Configurable timeout and thread count via command line arguments
  • Saves detailed scan reports in:
    • Human-readable TXT files
    • Structured JSON files for automation or further analysis
  • Clear terminal output with progress and summary

Requirements

  • Python 3.6 or higher (tested on Python 3.8+)
  • Uses standard Python libraries only (socket, ipaddress, argparse, concurrent.futures, json, datetime, os)

Usage

Clone the repository and run the scanner script from the terminal:

python port_scanner.py <target> <start_port> <end_port> [--timeout TIMEOUT] [--threads THREADS]

Ethical Usage Notice

This port scanner is intended for educational and authorized security testing only.
Scanning networks or devices without explicit permission is illegal and unethical.
Always obtain proper authorization before using this tool on any network or system.