A lightweight, Object-Oriented TCP port scanner built in Python. This tool is designed to map open vulnerabilities on a target network by probing standard server ports to identify active services.
The scanner utilizes Python's built-in socket library to establish TCP streams (SOCK_STREAM) with a target IP address. It iterates through a predefined list of high-value ports (FTP, SSH, HTTP, HTTPS) and uses connect_ex to securely evaluate the port status without crashing the engine on locked doors.
It includes custom timeout handling to ensure rapid execution when encountering dropped packets or stealth firewalls.
- Object-Oriented Programming (OOP): Encapsulating network variables and execution logic inside a reusable class structure.
- Network Protocol Engineering: Understanding TCP handshakes, IPv4 addressing (
AF_INET), and socket creation. - Error Handling & Flow Control: Utilizing
connect_exreturn codes (0 for success) to conditionally format output.
- Python 3
socket(Standard Library)
This tool was built strictly for educational purposes and local environment testing. The default execution target is set to the loopback address (127.0.0.1). Do not use this tool against networks or external IP addresses without explicit, written authorization from the network owner.