ichaida / FindTheBadGuys

Get locations (Continent, Country, City, Subdivision) from a text list of IP addresses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Get locations (Continent, Country, City, Subdivision) from a text list of IP addresses


Languages

Language:Go 100.0%