Skip to content
Get locations (Continent, Country, City, Subdivision) from a text list of IP addresses
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Formatting Feb 8, 2020
iplookup.go fixed spacing Feb 8, 2020

README.md

Find The Bad Guys

This is a simple GoLang app that gets the locations (Continent, Country, City, Subdivision) from a text list of IP addresses you provide.

It uses the Maxmind GeoLite Database but I did not include it as I don't have the right to redistribute it.

You can get your own GeoIP account and get the database free of charge by clicking here.

It also uses this Unofficial MaxMind GeoIP2 Reader for Go

Steps:

Start with a text file with a list of IP addresses. If you are running CentOS you can use this script

Download the Geolite database. Add its location to the geolitedb variable

Add the location of the IP address file to the badguysfile variable

Run iplookup

It will store the following files:

  • continents.txt - a list of continents
  • countries.txt - a list of countries
  • cities.txt - a list of cities
  • subdivisions.txt - a list of subdivisions of city

They are not checked for duplicates, in case you want to do counts on each.

If this application is useful, let me know and I'll update it and add features.

You can’t perform that action at this time.