File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ len(dpl_ether) == 1 and Ether in dpl_ether[0]
1818s = raw(Dot11())
1919s == b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2020
21+ pkt = Dot11(ID=0x1205)
22+ raw_data = raw(pkt)
23+ expected = b'\x05\x12'
24+ assert raw_data[2:4] == b'\x05\x12', f"Encoded Dot11 ID field is {raw_data[2:4]}, expected {repr(expected)}."
25+
2126= Dot11 - dissection
2227p = Dot11(s)
2328Dot11 in p and p.addr3 == "00:00:00:00:00:00"
@@ -26,6 +31,10 @@ assert "DA" in p.address_meaning(1)
2631assert "SA" in p.address_meaning(2)
2732assert "BSSID" in p.address_meaning(3)
2833
34+ pkt = b'\x00\x00\x05\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
35+ decoded_pkt = Dot11(pkt)
36+ assert decoded_pkt.ID == 0x1205, f"Decoded Dot11 ID field is {hex(decoded_pkt.ID)}, expected 0x1205."
37+
2938= Dot11QoS - build
3039s = raw(Dot11()/Dot11QoS(Ack_Policy=1))
3140assert s == b'\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00'
You can’t perform that action at this time.
0 commit comments