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