-
Notifications
You must be signed in to change notification settings - Fork 156
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
AttributeError: 'TypedPacketListField' object has no attribute 'type_' #128
Comments
Hi @HarunGlec, this is a dup #127. Can you provide information on how to reproduce this? I wasn't able to do so in #127. regards, |
I just opened interactive python shell and try to import like this "from scapy_ssl_tls.ssl_tls import * " that is only what i did. |
I think it happens because there is no class BLenField(LenField):
__slots__ = LenField.__slots__ + [
'adjust_i2m', 'adjust_m2i', 'numbytes',
'length_of', 'count_of'
] class BEnumField(EnumField):
__slots__ = EnumField.__slots__ + ['numbytes'] class StackedLenPacket(Packet):
__slots__ = Packet.__slots__ + ['tls_ctx'] class TypedPacketListField(PacketListField):
__slots__ = PacketListField.__slots__ + ['type_'] class TLSRecord(StackedLenPacket):
__slots__ = StackedLenPacket.__slots__ + ['fragments'] class TLSExtension(PacketLengthFieldPayload):
__slots__ = PacketLengthFieldPayload.__slots__ + ['type_'] class TLSKeyExchange(Packet):
__slots__ = Packet.__slots__ + ['tls_ctx'] class TLSDecryptablePacket(PacketLengthFieldPayload):
__slots__ = PacketLengthFieldPayload.__slots__ + ['tls_ctx'] class TLSHandshake(PacketLengthFieldPayload):
__slots__ = PacketLengthFieldPayload.__slots__ + ['tls_ctx'] class SSL(Packet):
__slots__ = Packet.__slots__ + [
'tls_ctx', '_origin', 'guessed_next_layer', '__dict__'
] But this is not the only issue I faced with when I tried to make it work with the latest version of scapy . |
Steps to reproduce: Install manually from branch py3compat e0f3be0. Open scapy. I use Python Applying the mentioned changes (slots.diff.txt) seems indeed to be a fix. |
Hi, There's an open issue #117 ( we currently do not support scapy >=2.3.3 due to api changes since we wanted to avoid constantly fixing incompatibilities). But since acc. to a comment in #117 the api should be stable now I could have a 2nd look. Haven't worked with slots before but is slots of a subclass supposed to include all slots of the parent? see usage of slots on SO Happy to merge the changes if this fixes problems. cheers, |
Applying the changes in the above diff file worked for me but I am having am still having an issue sending a DTLSRecord:
This worked fine in python 2.7 but in 3.7 i get the error:
I tried altering it to:
which does get me past the error but the resulting packet that gets sent is not recognized by wireshark as a DTLS Hello like it was in python 2.7 so that is apparently not working like I hoped. Any suggestions? Thanks! |
It looks like the issue is not with the encoding. There is a length field that is incorrect in the DTLS portion of the packet so somewhere a calculation went haywire. I haven't dug into where that is yet. |
I am getting error while I was trying to import
scapy_ssl_tls.ssl_tls
. What is the problem? Who can help me?The text was updated successfully, but these errors were encountered: