tintinweb / scapy-ssl_tls

SSL/TLS layers for scapy the interactive packet manipulation tool
GNU General Public License v2.0
419 stars 156 forks source link

ImportError TLSHandshake #4

Closed exploide closed 9 years ago

exploide commented 9 years ago

I installed scapy-ssl_tls as stated in the README and in general it seems to work well.

But when I write

from scapy.all import *

I get

Import Error - most likely due to missing pycrypto libraries - disabling crypto functionality
ImportError('cannot import name TLSHandshake',)

It says it's probably due to missing pycrypto library but I already installed this dependency.

# pip freeze
NetfilterQueue==0.3
pycrypto==2.6.1
scapy==2.3.1

Is something else missing? Maybe it would be a good idea to include a requirements.txt or at least name all dependencies in the README.

Apart of that: Thank you very much for this extension! It's really missing in scapy.

eipiminus1 commented 9 years ago

I struggled with the same problem until I realized that its not affecting my usage. The error seems to result from a circular import and a fix is suggested here: https://github.com/alexmgr/scapy-ssl_tls/commit/e34b74d32e34736a6e7b5b7c9a3192fa4eeb22e5

As said, it does not seem to affect usage apart from getting the error message.

tintinweb commented 9 years ago

The import logic is a bit dirty as it is a quick-hack to make sure that you're still able to work with ssl_tls without having pycrypto installed. Apart from that I got a few requests to package the code and I'm about to restructure the codebase in order to make it more natural to navigate, make pip happy and to get rid of the current path magic. This should fix a lot of usability problems and help you quickstart scapy-ssl_tls.

@eipiminus1 feel free to contribute bugfixes :)

tintinweb commented 9 years ago

merged https://github.com/tintinweb/scapy-ssl_tls/pull/7 fixing this issue - thx alexmgr. also added a requirements.txt