1
1
Fork
You've already forked whip
0
WHOIS lookup tool for BGP AS information.
  • Go 100%
2026年02月16日 21:48:36 +01:00
cmd/whip 🩹 Fix resolver/display flag verification 2026年02月16日 21:48:36 +01:00
display Improve live ranking 2026年02月16日 21:11:53 +01:00
parser Improved CLI 2026年02月16日 12:07:23 +01:00
resolver 🚀 Let's go! 2026年02月15日 23:22:30 +01:00
whip 🚀 Let's go! 2026年02月15日 23:22:30 +01:00
go.mod 🚀 Let's go! 2026年02月15日 23:22:30 +01:00
go.sum 🚀 Let's go! 2026年02月15日 23:22:30 +01:00
README.md Improve live ranking 2026年02月16日 21:11:53 +01:00

WHIP

WHOIS lookup tool for BGP AS information.

Uses the Team Cymru DNS resolver to perform lookups, so results are cached by your resolver. An additional in-memory cache is maintained, during runtime to reduce network i/o.

Usage

Resolve a hand-full of IP addresses in a one-shot call:

whip 1.1.1.1 4.4.4.4 8.8.8.8
AS-13335 🇺🇸(US) 🇦🇺(AU) 1.1.1.0/24 1.1.1.1 CLOUDFLARENET - Cloudflare, Inc., US
AS-3356 🇺🇸(US) 🇺🇸(US) 4.0.0.0/9 4.4.4.4 LEVEL3 - Level 3 Parent, LLC, US
AS-15169 🇺🇸(US) 🇺🇸(US) 8.8.8.0/24 8.8.8.8 GOOGLE - Google LLC, US

Resolve all IPs in 'ips.txt' and return the results as JSON.

whip --file ips.txt --display json
{"ip":"1.1.1.1","rir":"apnic","as_country":"US","asn":13335,"as":"CLOUDFLARENET - Cloudflare, Inc., US","prefix":"1.1.1.0/24","prefix_country":"AU"}
{"ip":"4.4.4.4","rir":"arin","as_country":"US","asn":3356,"as":"LEVEL3 - Level 3 Parent, LLC, US","prefix":"4.0.0.0/9","prefix_country":"US"}
{"ip":"8.8.8.8","rir":"arin","as_country":"US","asn":15169,"as":"GOOGLE - Google LLC, US","prefix":"8.8.8.0/24","prefix_country":"US"}

Live-Rank all Apache2 clients within the past 10m, 2m and 30s:

tail -Fn1 /var/log/apache/access.log | whip \
 --display rank \
 --rank-times 5m,30s \
 --rank-best 3
 Autonomous-Systems:
 5m0s 35 AS-8075 🇺🇸(US) 🇺🇸(US) 72.144.0.0/14 72.144.12.31 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 5m0s 13 AS-150436 🇸🇬(SG) 🇸🇬(SG) 45.78.216.0/21 45.78.218.154 BYTEPLUS-AS-AP Byteplus Pte. Ltd., SG
 5m0s 11 AS-14061 🇺🇸(US) 🇺🇸(US) 188.166.64.0/18 188.166.104.250 DIGITALOCEAN-ASN - DigitalOcean, LLC, US
 30s 35 AS-8075 🇺🇸(US) 🇺🇸(US) 72.144.0.0/14 72.144.12.31 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 30s 13 AS-150436 🇸🇬(SG) 🇸🇬(SG) 45.78.216.0/21 45.78.218.154 BYTEPLUS-AS-AP Byteplus Pte. Ltd., SG
 30s 11 AS-14061 🇺🇸(US) 🇺🇸(US) 188.166.64.0/18 188.166.104.250 DIGITALOCEAN-ASN - DigitalOcean, LLC, US
 Prefixes:
 5m0s 24 AS-8075 🇺🇸(US) 🇺🇸(US) 20.64.0.0/10 20.123.146.93 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 5m0s 13 AS-150436 🇸🇬(SG) 🇸🇬(SG) 45.78.216.0/21 45.78.218.154 BYTEPLUS-AS-AP Byteplus Pte. Ltd., SG
 5m0s 11 AS-8075 🇺🇸(US) 🇺🇸(US) 72.144.0.0/14 72.144.12.31 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 30s 24 AS-8075 🇺🇸(US) 🇺🇸(US) 20.64.0.0/10 20.123.146.93 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 30s 13 AS-150436 🇸🇬(SG) 🇸🇬(SG) 45.78.216.0/21 45.78.218.154 BYTEPLUS-AS-AP Byteplus Pte. Ltd., SG
 30s 11 AS-8075 🇺🇸(US) 🇺🇸(US) 72.144.0.0/14 72.144.12.31 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 IPs:
 5m0s 13 AS-150436 🇸🇬(SG) 🇸🇬(SG) 45.78.216.0/21 45.78.218.154 BYTEPLUS-AS-AP Byteplus Pte. Ltd., SG
 5m0s 11 AS-8075 🇺🇸(US) 🇺🇸(US) 72.144.0.0/14 72.144.12.31 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 5m0s 10 AS-38365 🇨🇳(CN) 🇨🇳(CN) 180.76.96.0/20 180.76.96.235 BAIDU Beijing Baidu Netcom Science and Technology Co., Ltd., CN
 30s 13 AS-150436 🇸🇬(SG) 🇸🇬(SG) 45.78.216.0/21 45.78.218.154 BYTEPLUS-AS-AP Byteplus Pte. Ltd., SG
 30s 11 AS-8075 🇺🇸(US) 🇺🇸(US) 72.144.0.0/14 72.144.12.31 MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation, US
 30s 10 AS-38365 🇨🇳(CN) 🇨🇳(CN) 180.76.96.0/20 180.76.96.235 BAIDU Beijing Baidu Netcom Science and Technology Co., Ltd., CN
Total lookups: 53
Running for: 10s