aboutsummaryrefslogtreecommitdiff
path: root/src/config/mmdb-convert.py
AgeCommit message (Collapse)Author
2019-12-12python: Add __future__ imports for python 3 compatibilityteor
Except for src/ext, which we may not want to modify. Closes ticket 32732.
2019-03-27Stop assuming that /usr/bin/python3 existsteor
For scripts that work with python2, use /usr/bin/python. Otherwise, use /usr/bin/env python3. Fixes bug 29913; bugfix on 0.2.5.3-alpha.
2018-10-10Fix the missing unpack function in mmdb-convert.pyJay Bitron
2016-07-25three typo fixes i found in my sandboxRoger Dingledine
2014-02-25Merge remote-tracking branch 'karsten/geoip2regcountry'Nick Mathewson
2014-02-25Fall back to registered country if necessary.Karsten Loesing
When extracting geoip and geoip6 files from MaxMind's GeoLite2 Country database, we only look at country->iso_code which is the two-character ISO 3166-1 country code of the country where MaxMind believes the end user is located. But if MaxMind thinks a range belongs to anonymous proxies, they don't put anything there. Hence, we omit those ranges and resolve them all to '??'. That's not what we want. What we should do is first try country->iso_code, and if there's no such key, try registered_country->iso_code which is the country in which the ISP has registered the IP address. In short: let's fill all A1 entries with what ARIN et. al think.
2014-02-25Download MaxMind's geoip file over https.Karsten Loesing
If the cert turns out to be invalid or if wget is otherwise unable to verify it, it's going to return an error and not download the file for us. Spotted by nickm.
2014-02-21Include instructions on generating geoip files.Karsten Loesing
Implements #10924.
2014-02-13Exclude Teredo IPv6 prefix from geoip6.Karsten Loesing
The latest GeoLite2 database includes a pointer from 2001::/32 to the root node of the IPv4 address space in the tree. We need to exclude this whole address space from geoip6, similar to how we exclude IPv4-mapped IPv6 addresses and the 6to4 mapping subnet.
2014-02-08Don't zero-pad day of the month.Karsten Loesing
2014-02-08Add script to convert GeoLite2 country databases.Karsten Loesing
Copied over from https://github.com/nmathewson/mmdb-convert, commit 52f0d43408ed3a0fe7c3b2fa7099da7f6b7c4502.