User Tools

Site Tools


wiki:whois_lookup_list_ips_find_countries

This is an old revision of the document!


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 11:04 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki