I'm trying to play with ZigBee protocol using scapy, but captured traffic is not properly recognized. I have created following script:
import sys
from scapy.sendrecv import sniff
def pkt_hnd(pkt):
print(pkt.summary())
sniff(offline=sys.stdin.buffer, prn=pkt_hnd, store=0)
I'm feeding it with data from https://github.com/homewsn/whsniff. But packets seem incorrectly classified in scapy as SixLoWPAN / LoWPANFragmentationFirst / Raw
:
Dot15d4FCS / 802.15.4 Data ( None:0x0 -> 0x2c2b:0xffff ) / SixLoWPAN / LoWPANFragmentationFirst / Raw
For comparison this is how it gets parsed by wireshark:
Can I tell scapy somehow that it should assume ZigBee traffic in these packets?
I found an answer: https://github.com/secdev/scapy/blob/cfe00d5c952e9048a40150390e0025b5ceff7228/scapy/layers/zigbee.py#L1175
Current solution: