360 Secure SkillHub
360 安全技能中心

Ip Geo Toolkit

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

分类:搜索
johnnywang2001
johnnywang2001
热度 33.04
最近更新 2026-05-11 17:33:53

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add johnnywang2001/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.