wiki:whois_lookup_list_ips_find_countries
This is an old revision of the document!
Table of Contents
whois lookup on list of IPs and find countries
For a list of IPs in file like this:
115.73.43.82 171.226.37.107 116.100.13.224 171.252.244.192 27.75.96.60 115.73.181.107 27.64.204.111 116.177.225.197 27.65.174.108 115.72.36.7 ...
do a lookup with whois
for ip in $(cat list);do whois $ip |awk -F: '/country/ {print $2}'| sort;done > sorted1.txt
Then show sorted and aggregated.
cat sorted1.txt |sort|uniq -c
Tested on
See also
References
wiki/whois_lookup_list_ips_find_countries.1646301880.txt.gz · Last modified: 2022/03/03 10:04 by antisa