IPGeolocation/steampipe-plugin-ipgeolocation
GitHub: IPGeolocation/steampipe-plugin-ipgeolocation
基于 Steampipe 的 IPGeolocation.io 插件,使用 SQL 统一查询 IP 地理位置与威胁情报。
Stars: 0 | Forks: 0
# Steampipe IPGeolocation.io 插件
使用 SQL 查询 IP 地理位置、威胁情报、ASN 详情和滥用联系信息,来源为 [IPGeolocation.io](https://ipgeolocation.io)。
```
select
ip,
country_name,
city,
isp,
timezone_name
from
ipgeolocation_ip
where
ip = '8.8.8.8';
```
## 快速开始
安装插件:
```
steampipe plugin install ipgeolocation/ipgeolocation
```
在 `~/.steampipe/config/ipgeolocation.spc` 中配置你的 API 密钥:
```
connection "ipgeolocation" {
plugin = "ipgeolocation/ipgeolocation"
# Get your free API key at https://app.ipgeolocation.io/dashboard
# Can also be set with the IPGEOLOCATION_API_KEY environment variable.
# api_key = "a1b2c3d4e5f6..."
}
```
运行查询:
```
steampipe query "select ip, country_name, city from ipgeolocation_ip where ip = '8.8.8.8'"
```
## 开发
前置条件:
- [Steampipe](https://steampipe.io/downloads) ≥ 0.20
- [Go](https://golang.org/dl/) 1.26+
克隆仓库,构建并安装:
```
git clone https://github.com/IPGeolocation/steampipe-plugin-ipgeolocation
cd steampipe-plugin-ipgeolocation
make setup
```
`make setup` 会执行 `go mod tidy`,构建插件二进制文件,并安装二进制文件和示例配置文件。
修改后重新构建:
```
make install
```
运行测试:
```
make test
```
## 文档
完整的表文档可在 [Steampipe Hub](https://hub.steampipe.io/plugins/ipgeolocation/ipgeolocation/tables) 和 [`docs/`](docs/tables) 目录中找到。
| 表名 | 端点 | 描述 | 来源 |
|---|---|---|---|
| [ipgeolocation_ip](docs/tables/ipgeolocation_ip.md) | `/v3/ipgeo` | 地理位置、网络、时区、安全、公司、滥用、主机名 | 1–4 |
| [ipgeolocation_security](docs/tables/ipgeolocation_security.md) | `/v3/security` | VPN、代理、Tor、中继、机器人、垃圾邮件及威胁评分 | 2 |
| [ipgeolocation_abuse](docs/tables/ipgeolocation_abuse.md) | `/v3/abuse` | 滥用联系邮箱、电话号码、组织、CIDR 路由 | 1 |
| [ipgeolocation_asn](docs/tables/ipgeolocation_asn.md) | `/v3/asn` | ASN 详情、路由、对等体、上游、下游、WHOIS | 1 |
## 许可证
本插件根据 [Apache 2.0 许可证](LICENSE) 授权。
标签:API密钥, ASN信息, EVTX分析, IP geolocation, IP信息查询, IP地理定位, IP安全, ISP信息, Steampipe插件, 云端威胁情报, 协作平台, 地理信息, 多线程, 威胁情报, 开发者工具, 开源插件, 数据库插件, 数据查询, 数据集成, 日志审计, 时区信息, 深度包检测, 滥用联系, 网络威胁, 网络安全分析