8000 GitHub - chesshacker/geo-lookup-ips
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chesshacker/geo-lookup-ips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geo Lookup IPs

I needed to lookup geolocation info for a list of IPs, and came upon IP Location Lite. You will need to download the latest IP2LOCATION-LITE-DB11.BIN file (DB11.LITE, IPv4 Database, BIN format).

I haven't made any pretty command-line flags or anything either. It reads stdin and writes csv to stdout. Running this:

cat << EOF | go run main.go
8.8.8.8
4.4.4.4
EOF

should return:

ip,country_short,country_long,region,city,latitude,longitude
8.8.8.8,US,United States of America,California,Mountain View,37.405991,-122.078514
4.4.4.4,US,United States of America,Minnesota,Minneapolis,44.979969,-93.263840

What you'll more likely do in practice is

cat some-ips.txt | go run main.go > some-ips-with-geo.csv

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0