dvlinuxx-max/portscope
GitHub: dvlinuxx-max/portscope
一个仅用 Python 标准库实现、无需 root 权限的并发 TCP 端口扫描器,支持服务识别和 banner grabbing。
Stars: 0 | Forks: 0
# portscope
并发 TCP 端口扫描器,支持服务识别和 banner grabbing。
connect scan 不需要 root 权限,因此只要有 Python 环境即可运行。仅使用
标准库,无额外依赖。
## 用法
```
python portscope.py [options]
```
`target` 可以是主机名、IP 地址或 CIDR 范围(`10.0.0.0/24`)。
```
python portscope.py scanme.nmap.org
python portscope.py 192.168.1.10 -p 1-1024
python portscope.py 10.0.0.0/24 -p top --open-only
python portscope.py example.com -p 80,443,8080 --no-banner --json
```
## 选项
```
-p, --ports top | all | list (22,80,443) | range (1-1024) (default: top)
-t, --timeout per-connection timeout in seconds (default: 1.0)
-w, --workers concurrent connections per host (default: 200)
--no-banner skip banner grabbing
--open-only only show hosts with at least one open port
--json machine-readable output
--no-color disable ANSI colors
```
`top` 包含了常见的服务端口以及 Web/管理端口。在进行 CIDR 扫描时,会首先
探测每个主机的存活状态,从而快速跳过无响应的地址。
## 注意事项
connect scan 会完成完整的 TCP 握手,因此结果可靠,但会在目标日志中留下记录。banner grabbing 会读取服务返回的第一行信息,对于 HTTP
端口,会发送 `HEAD /` 请求。在读取信息之前,会先对 TLS 端口进行封装。
## 授权
仅扫描您拥有或获得明确书面授权测试的主机。未经授权扫描第三方系统在许多地区是非法的。
## 许可证
MIT
标签:Python, Qt框架, 动态分析, 底层编程, 插件系统, 数据统计, 无后门, 服务识别, 端口扫描, 网络安全, 网络工具, 逆向工具, 隐私保护