Python Port Scanner 🔍
A simple TCP port scanner developed in Python as a university cybersecurity assignment.
📌 Overview
This project demonstrates the basic concepts of network port scanning using Python's built-in "socket" library.
The scanner checks specified TCP ports on a target host and identifies whether they are open or closed.
⚙️ Features
- Scan a single TCP port
- Scan a range of ports
- Accept IP addresses or hostnames
- Detect open and closed ports
- TCP socket-based scanning
- Connection timeout handling
- Simple command-line interface
- Beginner-friendly Python implementation
🛠️ Technologies Used
- Python 3
- Python "socket" library
🚀 How to Run
Make sure Python 3 is installed.
python port_scanner.py
Follow the instructions displayed by the program.
🧪 Example
Example target:
127.0.0.1
Example output:
Scanning target: 127.0.0.1
Port 22 - OPEN Port 80 - OPEN Port 443 - CLOSED
📚 What I Learned
Through this project, I practiced:
- TCP/IP networking concepts
- IP addresses and port numbers
- TCP connections
- Python socket programming
- Exception handling
- Basic network reconnaissance
- Building a command-line cybersecurity tool
This project is intended for educational purposes and authorized security testing only.
Only scan systems, networks, and devices that you own or have explicit permission to test.
👨💻 Author
Abbas Jafari
Cybersecurity Student