March 2019
Beginner
490 pages
12h 40m
English
There are other Python modules that use the MaxMind database:
In the following script, we can see an example of how to use the maxminddb-geolite2 package.
You can find the following code in the geoip_reader.py file:
#!/usr/bin/env python3import socketfrom geolite2 import geolite2import argparseimport json# Setup commandline argumentsparser = argparse.ArgumentParser(description='Get IP Geolocation info')parser.add_argument('--hostname', action="store", dest="hostname", required=True)# Parse ...Read now
Unlock full access