Closed njzy closed 6 years ago
Can you try with maxminddb 1.3.0 ? That's what I have on my system and it works. What is you geoip2 version ?
geoip version?
maxminddb 1.3.0 has same issue too.
Can you give pip list
and python --version
? I have no clue what it can be tbh. What is your system ?
Linux yeti 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@yeti:~# cat /etc/issue
Ubuntu 18.04 LTS \n \l
root@yeti:~# pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
archiveis (0.0.4)
asn1crypto (0.24.0)
attrs (17.4.0)
Automat (0.6.0)
beautifulsoup4 (4.6.0)
blinker (1.4)
censys (0.0.8)
certifi (2018.1.18)
chardet (3.0.4)
click (6.7)
click-plugins (1.0.3)
cloud-init (18.2)
colorama (0.3.7)
command-not-found (0.3)
CommonMark (0.7.5)
configobj (5.0.6)
configparser (3.5.0)
consolemd (0.4.0)
constantly (15.1.0)
cryptography (2.1.4)
distro-info (0.18)
dnspython (1.15.0)
ez-setup (0.9)
FullContact.py (0.0.6)
future (0.16.0)
geoip2 (2.8.0)
harpoon (0.1.1)
httplib2 (0.9.2)
hyperlink (17.3.1)
idna (2.6)
incremental (16.10.1)
IPy (0.83)
Jinja2 (2.10)
jsonpatch (1.16)
jsonpointer (1.10)
jsonschema (2.6.0)
keyring (10.6.0)
keyrings.alt (3.0)
language-selector (0.1)
lxml (4.2.1)
MarkupSafe (1.0)
maxminddb (1.2.1)
mispy (0.2)
netaddr (0.7.19)
oauthlib (2.0.6)
OTXv2 (1.2)
PAM (0.4.2)
passivetotal (1.0.30)
pip (9.0.1)
pyaes (1.6.1)
pyasn (1.6.0b1)
pyasn1 (0.4.2)
pyasn1-modules (0.2.1)
pycrtsh (0.1)
pycrypto (2.6.1)
PyGithub (1.39)
Pygments (2.2.0)
pygobject (3.26.1)
pygreynoise (0.1)
pyhunter (0.3)
PyJWT (1.5.3)
pyOpenSSL (17.5.0)
pypermacc (0.1.1)
pysafe (0.1)
pyserial (3.4)
PySocks (1.6.8)
python-apt (1.6.0)
python-dateutil (2.7.3)
python-debian (0.1.32)
pythreatgrid (0.1.1)
pyxdg (0.25)
PyYAML (3.12)
requests (2.18.4)
requests-oauthlib (0.8.0)
requests-unixsocket (0.1.5)
rsa (3.4.2)
SecretStorage (2.3.1)
selenium (3.12.0)
service-identity (16.0.0)
setproctitle (1.1.10)
setuptools (39.0.1)
shodan (1.7.7)
simplejson (3.15.0)
six (1.11.0)
spyonweb (0.1)
ssh-import-id (5.7)
systemd-python (234)
Telethon (0.19.0.1)
tweepy (3.6.0)
Twisted (17.9.0)
ufw (0.35)
unattended-upgrades (0.1)
urllib3 (1.22)
virtualenv (15.1.0)
virustotal-api (1.1.10)
wheel (0.30.0)
XlsxWriter (1.0.5)
zope.interface (4.3.2)
root@yeti:~# python --version
Python 3.6.5
Indeed, it seems to be a problem with maxmindd < 1.4.0. With 1.3.0 and below :
>>> from maxminddb import (MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE, MODE_MEMORY, MODE_FD)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'MODE_FD'
>>>
With 1.4.0 :
>>> from maxminddb import (MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE, MODE_MEMORY, MODE_FD)
>>>
Can you update maxminddb (pip install maxminddb -U
) and see if it is fixed ?
If yes, I will update the requirements.txt
Hi Tek maxminddb 1.4.0 is work
Cool, I updated requirements.txt and added a line in the known bug wiki page. I close the issue then.
My installation steps are as follows: git clone https://github.com/Te-k/harpoon.git cd harpoon pip3 install -r requirements.txt pip3 install .