elliotwutingfeng/get_ips
GitHub: elliotwutingfeng/get_ips
一个批量解析主机名 IPv4/IPv6 地址的 Python 命令行工具,通过文件输入输出完成 DNS 查询任务。
Stars: 3 | Forks: 0
# 获取 ips

[](https://coveralls.io/github/elliotwutingfeng/get_ips?branch=main)
[](LICENSE)
使用 [socket.getaddrinfo()](https://docs.python.org/3/library/socket.html#socket.getaddrinfo) 获取主机名的 IPv4 和 IPv6 地址。
## 环境要求
Python 3.8+
## 安装
```
python3 -m venv venv
venv/bin/python3 -m pip install --upgrade pip
venv/bin/python3 -m pip install -r requirements.txt
```
## 测试
```
venv/bin/python3 -m pytest --cov --cov-report html
```
## 用法
```
venv/bin/python3 main.py --input-file sample_urls.txt --output-file output.txt
```
标签:DNS解析, IP查询, Python, 安全规则引擎, 开源项目, 无后门, 网络工具, 逆向工具