fabian-hk/nano_siem

Convert IPs to Coordinates

Closed this issue · 0 comments

Write a Python function that takes an IP address as a string and outputs the corresponding coordinates as a tuple: (Longitude, Latitude). The tuple should have the data type (float, float). The conversion should be done locally with the GeoLite2 database. You can use the python-geoip package for this.

Update: There is a newer version of the library geoip2 that you should use. But I think therefore you have to manually download the GeoLite2 database. Don't use the web service.

Please develop this feature in the feature/geoip-lookup branch. You should complete the function in this file.

Database attributes documentation: https://dev.maxmind.com/static/pdf/GeoLite2-IP-MetaData-Databases-Comparison-Chart.pdf