360 Secure SkillHub
360 安全技能中心

Ip Geo Toolkit

该Skill提供Python脚本,可通过命令行查询单个或多个IP的地理位置、ISP、ASN及反向DNS,也可检测本机公网IP,并支持从文件或标准输入批量查询最多100个IP。依赖ip-api.com和ipify等免费服务,无需API密钥,按接口速率自动限流。

johnnywang2001
johnnywang2001
热度 80.22
最近更新 2026-05-11 17:33:53
分类:搜索依赖:代码执行 / 第三方 API / 读写文件应用场景:数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ip-geo-toolkit
Metadata
name
ip-geo-toolkit
description
Look up IP geolocation, find your public IP, perform reverse DNS, and run bulk IP lookups. Uses free APIs (ip-api.com, ipify) with no API key required. No external dependencies — pure Python. Use when looking up IP address location, finding your public IP, checking ISP/ASN info, doing reverse DNS, or processing lists of IPs for geolocation data.

IP Geolocation Toolkit

Look up IP locations, ISP info, and reverse DNS with zero dependencies.

Commands

All commands use scripts/ip_geo.py.

Look Up IP(s)

python3 scripts/ip_geo.py lookup 8.8.8.8
python3 scripts/ip_geo.py lookup 8.8.8.8 1.1.1.1 9.9.9.9
python3 scripts/ip_geo.py lookup 8.8.8.8 --json

Returns: country, region, city, ZIP, coordinates, timezone, ISP, organization, AS number, and reverse DNS.

Find Your Public IP

python3 scripts/ip_geo.py myip
python3 scripts/ip_geo.py myip --json

Detects your public IP and runs a full geolocation lookup.

Bulk Lookup

python3 scripts/ip_geo.py bulk --input ips.txt
python3 scripts/ip_geo.py bulk --input ips.txt --json --output results.json
cat ips.txt | python3 scripts/ip_geo.py bulk --input -

Processes up to 100 IPs per batch via ip-api.com batch endpoint. Input file: one IP per line, lines starting with # are skipped.

Data Returned

Each lookup returns: country, countryCode, region, regionName, city, zip, lat, lon, timezone, isp, org, as (ASN), and reverse DNS (via local socket).

Rate Limits

Free ip-api.com tier: 45 requests/minute for single lookups, 15 requests/minute for batch. The script auto-throttles between requests.