We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0022dfd commit 56de4f4Copy full SHA for 56de4f4
2 files changed
scapy/contrib/automotive/bmw/hsfz.py
@@ -65,7 +65,7 @@ class HSFZ(Packet):
65
ConditionalField(
66
StrFixedLenField("identification_string",
67
None, None, lambda p: p.length),
68
- lambda p: p.control == 0x11)
+ lambda p: p.control == 0x11 and p.length != 0)
69
]
70
71
def _hasaddrs(self):
test/contrib/automotive/bmw/hsfz.uts
@@ -106,6 +106,11 @@ assert pkt.length == 50
106
assert pkt.control == 0x11
107
assert b"BMW" in pkt.identification_string
108
109
+pkt = UDP(hex_bytes("e9811a9b000ea98f000000000011"))
110
+assert pkt.length == 0
111
+assert pkt.control == 0x11
112
+
113
114
= Test HSFZSocket
115
116
0 commit comments