Closed bambenek closed 9 years ago
Can you paste the output of pip freeze
?
Is this still an issue? I suspect you have the wrong module for magic
.
Oof, let me get back to this and test... got distracted on other projects.
On 2/5/2015 4:28 PM, Kyle Maxwell wrote:
Is this still an issue? I suspect you have the wrong module for |magic|.
— Reply to this email directly or view it on GitHub https://github.com/technoskald/maltrieve/issues/74#issuecomment-73143586.
I'm getting the same error on my end. I'm hoping to get some help. Here's the pip freeze output on my host. thanks in advance.
Magic-file-extensions==0.2 PAM==0.4.2 Pillow==2.3.0 Twisted-Core==13.2.0 Twisted-Web==13.2.0 adium-theme-ubuntu==0.3.4 apt-xapian-index==0.45 argparse==1.2.1 beautifulsoup4==4.2.1 chardet==2.0.1 colorama==0.2.5 command-not-found==0.3 debtagshw==0.1 defer==1.0.6 dirspec==13.10 duplicity==0.6.23 feedparser==5.1.3 gevent==1.0 greenlet==0.4.2 html5lib==0.999 httplib2==0.8 lockfile==0.8 lxml==3.3.3 oauthlib==0.6.1 oneconf==0.3.7 pexpect==3.1 piston-mini-client==0.7.5 pyOpenSSL==0.13 pycrypto==2.6.1 pycups==1.9.66 pycurl==7.19.3 pygobject==3.12.0 pyserial==2.6 pysmbc==1.0.14.1 python-apt==0.9.3.5 python-debian==0.1.21-nmu2ubuntu2 pyxdg==0.25 reportlab==3.0 requests==2.2.1 sessioninstaller==0.0.0 six==1.5.2 software-center-aptd-plugins==0.0.0 ssh-import-id==3.21 system-service==0.1.6 unity-lens-photos==1.0 urllib3==1.7.1 wsgiref==0.1.2 xdiagnose==3.6.3build2 zope.interface==4.0.5
Yup, definitely the wrong module for magic
. You want python-magic (virtual environments will help a lot with this BTW).
Thanks Kyle!
From command line:
python maltrieve.py Processing source URLs Completed source processing Downloading samples, check log for details Traceback (most recent call last): File "maltrieve.py", line 336, in
main()
File "maltrieve.py", line 317, in main
md5 = save_malware(each, cfg['dumpdir'], black_list, white_list)
File "maltrieve.py", line 98, in save_malware
mime_type = magic.from_buffer(data, mime=True)
AttributeError: 'module' object has no attribute 'from_buffer'
From log file:
2014-12-26 16:24:32 -1219590400 "GET /freebsd/mail/ssl-tls-v-postfix-dovecot-i-apache HTTP/1.1" 200 None 2014-12-26 16:24:32 -1219590400 Setting read timeout to None 2014-12-26 16:24:32 -1219590400 "GET /Product/ThePowerSupply/471305 HTTP/1.1" 301 178 2014-12-26 16:24:32 -1219590400 "GET /v20046?affiliate_id=1104227505&product_name=PromptDownloader&filesize=1mb&product_title=PromptDownloader&installer_file_name=PromptDownloader&product_file_name=PromptDownloader.exe&produ= HTTP/1.1" 200 1261432 2014-12-26 16:24:33 -1219590400 Setting read timeout to None 2014-12-26 16:24:33 -1219590400 Setting read timeout to None 2014-12-26 16:24:33 -1219590400 "GET /05sun/DTS%E5%85%89%E7%9B%98%E5%88%B6%E4%BD%9C%E5%99%A8v2.8%E5%85%8D%E8%B4%B9%E7%89%88_91768507.exe HTTP/1.1" 200 3191296 2014-12-26 16:24:33 -1219590400 "GET /1.exe HTTP/1.1" 200 533504 2014-12-26 16:24:33 -1219590400 Setting read timeout to None 2014-12-26 16:24:33 -1219590400 "GET /xfplayer117359_110_12201.exe HTTP/1.1" 302 None 2014-12-26 16:24:33 -1219590400 Starting new HTTP connection (1): shadu.baidu.com 2014-12-26 16:24:34 -1219590400 Setting read timeout to None 2014-12-26 16:24:34 -1219590400 "GET /index/mini_2to1_download/90000214 HTTP/1.1" 302 20 2014-12-26 16:24:34 -1219590400 Starting new HTTP connection (1): dl1sw.baidu.com 2014-12-26 16:24:34 -1219590400 Setting read timeout to None 2014-12-26 16:24:35 -1219590400 "GET /client/20141029/2in1/Baidu_Com_90000214.exe HTTP/1.1" 404 321 2014-12-26 16:24:39 -1219590400 Setting read timeout to None 2014-12-26 16:24:39 -1219590400 "GET /Product/ThePowerSupply/471305/ HTTP/1.1" 200 125217 2014-12-26 16:24:46 -1219590400 "GET /clients/1201310141839549320.exe HTTP/1.1" 522 None