Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't start snare.py #83

Closed
perl2php opened this issue Jan 21, 2018 · 6 comments
Closed

can't start snare.py #83

perl2php opened this issue Jan 21, 2018 · 6 comments

Comments

@perl2php
Copy link

hello
i'm really new to python
installed snare as described
system is ubuntu 16.04, python3 3.5.2
when trying to start:

ubuntu@test:~/snare$ sudo python3 snare.py --port 8080 --page-dir example.com
Traceback (most recent call last):
File "snare.py", line 37, in
from aiohttp.web import StaticResource as StaticRoute
File "/home/ubuntu/.local/lib/python3.5/site-packages/aiohttp/web.py", line 10, in
from . import (hdrs, web_exceptions, web_middlewares, web_reqrep, web_server,
File "/home/ubuntu/.local/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 5, in
from aiohttp.web_urldispatcher import SystemRoute
File "/home/ubuntu/.local/lib/python3.5/site-packages/aiohttp/web_urldispatcher.py", line 17, in
from yarl import URL, unquote
ImportError: cannot import name 'unquote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "snare.py", line 39, in
from aiohttp.web import StaticResource
File "/home/ubuntu/.local/lib/python3.5/site-packages/aiohttp/web.py", line 10, in
from . import (hdrs, web_exceptions, web_middlewares, web_reqrep, web_server,
File "/home/ubuntu/.local/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 5, in
from aiohttp.web_urldispatcher import SystemRoute
File "/home/ubuntu/.local/lib/python3.5/site-packages/aiohttp/web_urldispatcher.py", line 17, in
from yarl import URL, unquote
ImportError: cannot import name 'unquote'

what should i do?

@afeena
Copy link
Collaborator

afeena commented Jan 21, 2018

Hi, please run
pip3 freeze
and show the output

Seems like you have problems with yarl version
aio-libs/aiohttp#2662

@perl2php
Copy link
Author

ubuntu@test:~$ pip3 freeze
aiohttp==1.3.5
async-timeout==2.0.0
beautifulsoup4==4.6.0
blinker==1.3
chardet==3.0.4
cloud-init==17.1
command-not-found==0.3
configobj==5.0.6
cryptography==1.2.3
cssutils==1.0.2
gitdb2==2.0.3
GitPython==2.1.8
idna==2.6
Jinja2==2.8
jsonpatch==1.10
jsonpointer==1.9
language-selector==0.1
MarkupSafe==0.23
multidict==4.0.0
netifaces==0.10.6
oauthlib==1.0.3
prettytable==0.7.2
pyasn1==0.1.9
pycurl==7.43.0
pygobject==3.20.0
PyJWT==1.3.0
pyserial==3.0.1
python-apt==1.1.0b1
python-debian==0.1.27
python-magic==0.4.15
python-systemd==231
PyYAML==3.11
requests==2.9.1
six==1.10.0
smmap2==2.0.3
ssh-import-id==5.5
ufw==0.35
unattended-upgrades==0.1
urllib3==1.13.1
virtualenv==15.0.1
yarl==1.1.0

@afeena
Copy link
Collaborator

afeena commented Jan 21, 2018

Yeah, you have yarl==1.1.0, try to install yarl==0.9.8 (I have this version and snare starts without any problem)

@perl2php
Copy link
Author

ok, i've run
pip3 install yarl==0.9.8
and all is started up:
ubuntu@test:~/snare$ sudo python3 snare.py --port 8080 --page-dir example.com
....
privileges dropped, running as "nobody:nogroup"
serving on ('0.0.0.0', 8080) with uuid 417046f6-c096-4baa-bdf8-467021158d2f
you are running the latest version

thank you

should yarl==0.9.8 be in requirements.txt then?

@afeena
Copy link
Collaborator

afeena commented Jan 21, 2018

Yeah, you can make a pr :)

@afeena
Copy link
Collaborator

afeena commented Jan 30, 2018

#85

@afeena afeena closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants