Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Port Scanner (Authorized Use Only)

A Python tool that checks selected TCP ports on a host you own or are explicitly authorized to test.

What this project does

This tool scans a list of ports, checks whether they are open, and generates a simple report for review.

Features

  • Scans selected TCP ports
  • Supports port lists and ranges
  • Shows open, closed, filtered, and error states
  • Saves text and JSON reports
  • Works from the command line

Tech Stack

  • Python 3
  • socket
  • argparse
  • json
  • pathlib
  • time

Folder Structure

port-scanner-authorized/
├── scanner.py
├── requirements.txt
├── README.md
├── .gitignore
├── reports/
└── screenshots/

Usage

Scan localhost using default ports

python scanner.py localhost

Scan custom ports

python scanner.py localhost --ports 22,80,443

Scan a range

python scanner.py localhost --ports 1-100

Save text and JSON reports

python scanner.py localhost --ports 22,80,443 --save reports/scan_report.txt --json reports/scan_report.json

Example Output

Target Host        : localhost
Ports Scanned      : 3
Open Ports         : 1
Closed Ports       : 2

Why this is useful

Clients often need a quick, authorized check to understand which services are exposed on a machine or server they control.

Screenshots

Terminal Output

Demo

Future Improvements

  • Add multithreading
  • Add CSV export
  • Add service banner checks
  • Add subnet support for internal audits
  • Add colored output

License

MIT

About

A Python port scanner for authorized security checks on hosts you own or have permission to test.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages