appliedsec / pygeoip

DEPRECATED: Pure Python API for Maxmind's binary GeoIP databases
https://github.com/appliedsec/pygeoip
GNU Lesser General Public License v3.0
482 stars 111 forks source link

Mo netspeeds, mo problems #71

Closed Ironholds closed 10 years ago

Ironholds commented 10 years ago

The netspeeds databases /should/ now be integrated (thanks for that!) but are bugging out on IPs:

ip4_geo = pygeoip.GeoIP(filename = "/usr/share/GeoIP/GeoIPNetSpeed.dat", flags = 1) ip6_geo = pygeoip.GeoIP(filename = "/usr/share/GeoIP/GeoIPNetSpeedCell.dat", flags = 1)

ip6_geo.netspeed_by_addr("‎42.201.247.243") Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-x86_64/egg/pygeoip/init.py", line 464, in netspeed_by_addr File "build/bdist.linux-x86_64/egg/pygeoip/util.py", line 39, in ip2long socket.error: illegal IP address string passed to inet_pton ip4_geo.netspeed_by_addr("‎42.201.247.243") Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-x86_64/egg/pygeoip/init.py", line 461, in netspeed_by_addr File "build/bdist.linux-x86_64/egg/pygeoip/init.py", line 421, in id_by_addr File "build/bdist.linux-x86_64/egg/pygeoip/util.py", line 39, in ip2long socket.error: illegal IP address string passed to inet_pton

Am I missing something crucial, or...?

Ironholds commented 10 years ago

...and now it's started working. That is the WEIRDEST DAMN THING.