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

A strange bug when using this module #127

Closed Bl1nnnk closed 6 years ago

Bl1nnnk commented 6 years ago

I have successfully installed scapy and scapy-ssl_tls by pip.But I found a strange bug when I tried to use it.As following:

Python 2.7.13 (5.8.0+dfsg-2~ppa2~ubuntu14.04, Jun 17 2017, 18:51:40)
[PyPy 5.8.0 with GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> from scapy_ssl_tls.ssl_tls import TLS
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/pypy2.7/dist-packages/scapy_ssl_tls/ssl_tls.py", line 691, in <module>
    class TLSHelloRetryRequest(Packet):
  File "/usr/local/lib/pypy2.7/dist-packages/scapy_ssl_tls/ssl_tls.py", line 695, in TLSHelloRetryRequest
    TypedPacketListField("extensions", None, TLSExtension, length_from=lambda x:x.length, type_="TLSHelloRetryRequest")]
  File "/usr/local/lib/pypy2.7/dist-packages/scapy_ssl_tls/ssl_tls.py", line 228, in __init__
    self.type_ = type_
AttributeError: 'TypedPacketListField' object has no attribute 'type_'

And I couldn't find any problems from source code, is it reproducible in your environment?

tintinweb commented 6 years ago

Hi @Dazdin9o,

that really looks odd. Just tested it with python 2.7.12+ on ubuntu 16.10 with scapy_ssl_tls 2.0.0 via pip. Also the code looks sane around ssl_tls.py:228. Can you reproduce this? Do you always see this exception or did it work already?

cheers tin

Bl1nnnk commented 6 years ago

Thanks for responding! But that's awkward that this module works well today morning ;) Thanks again for your efforts on this module,it will tremendously promote my work。

tintinweb commented 6 years ago

Always happy to help :+1: