{"id":4139,"date":"2016-04-16T04:03:03","date_gmt":"2016-04-15T20:03:03","guid":{"rendered":"https:\/\/www.darknet.org.uk\/?p=4139"},"modified":"2016-04-16T04:03:12","modified_gmt":"2016-04-15T20:03:12","slug":"ipgeolocation-retrieve-ip-geolocation-information","status":"publish","type":"post","link":"https:\/\/www.darknet.org.uk\/2016\/04\/ipgeolocation-retrieve-ip-geolocation-information\/","title":{"rendered":"IPGeoLocation – Retrieve IP Geolocation Information"},"content":{"rendered":"
IPGeoLocation is a Python based tool designed to retrieve IP geolocation information from the ip-api service, useful for building into your security tools.<\/p>\n
<\/p>\n
Do be aware that as this tool is leveraging a 3rd party API, you will be limited to 150 requests a minute. Whilst that is quite a lot, just be wary of it because if you exceed the limit you will get blocked.<\/p>\n
$ .\/ip2geolocation.py\r\nusage: ipgeolocation.py [-h] [-m] [-t TARGET] [-T file] [-u User-Agent]\r\n [-U file] [-g] [--noprint] [-v] [--nolog] [-x PROXY]\r\n [-X file] [-e file] [-ec file] [-ex file]\r\n\r\nIPGeolocation 2.0.3\r\n\r\n--[ Retrieve IP Geolocation information from ip-api.com\r\n--[ Copyright (c) 2015-2016 maldevel (@maldevel)\r\n--[ ip-api.com service will automatically ban any IP addresses doing over 150 requests per minute.\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n -m, --my-ip Get Geolocation info for my IP address.\r\n -t TARGET, --target TARGET\r\n IP Address or Domain to be analyzed.\r\n -T file, --tlist file\r\n A list of IPs\/Domains targets, each target in new line.\r\n -u User-Agent, --user-agent User-Agent\r\n Set the User-Agent request header (default: IP2GeoLocation 2.0.3).\r\n -U file, --ulist file\r\n A list of User-Agent strings, each string in new line.\r\n -g Open IP location in Google maps with default browser.\r\n --noprint IPGeolocation will print IP Geolocation info to terminal. It is possible to tell IPGeolocation n\r\not to print results to terminal with this option.\r\n -v, --verbose Enable verbose output.\r\n --nolog IPGeolocation will save a .log file. It is possible to tell IPGeolocation not to save those log\r\nfiles with this option.\r\n -x PROXY, --proxy PROXY\r\n Setup proxy server (example: http:\/\/127.0.0.1:8080)\r\n -X file, --xlist file\r\n A list of proxies, each proxy url in new line.\r\n -e file, --txt file Export results.\r\n -ec file, --csv file Export results in CSV format.\r\n -ex file, --xml file Export results in XML format.<\/pre>\nYou can download IPGeoLocation v2.0.3 here:<\/p>\n