BeratMuhammedFirat/simple-python-port-scanner
GitHub: BeratMuhammedFirat/simple-python-port-scanner
一个基于Python标准库开发的入门级TCP端口扫描器,用于快速识别目标IP上1-1024范围内的开放端口。
Stars: 0 | Forks: 0
# 简易 Python 端口扫描器
本项目是一个入门级的网络安全工具,使用 Python 的核心网络库开发,用于识别特定 IP 地址上的开放端口。
功能
```
IP Validation: The ipaddress module ensures the user-provided address is in a valid format.
TCP Scanning: Sends TCP connection requests to ports 1-1024 on the designated target.
Error Handling: Manages invalid IP formats and connection timeouts effectively.
Summary Report: Provides a final report on the total number of open ports discovered after the scan.
```
# 环境要求
要运行本项目,您的系统只需安装 Python 3.x。不需要安装任何外部库(pip)。
使用方法
```
Download the project files to your computer.
Open a terminal or command prompt.
Navigate to the project directory and run the following command:
python src/port_scanner.py
Enter the IP address you wish to scan (e.g., 127.0.0.1) when prompted.
```
# 代码结构
```
ip_control(ip): Performs input validation and handles format-related errors.
port_scanner(target_ip): Manages the main scanning loop and establishes socket connections.
```
# 警告
本工具仅供教育和测试目的使用。未经明确许可扫描网络和系统可能会导致法律后果。请以道德和负责任的方式使用本工具。
标签:IP验证, Python, TCP扫描, 套接字编程, 开源安全工具, 插件系统, 教育工具, 数据统计, 无后门, 白帽黑客, 端口扫描, 网络安全测试, 网络扫描器, 轻量级工具, 逆向工具, 逆向工程平台