I am trying to extract the data from 6LoWPAN support device type. Able to retrieve raw data only.
I tried using Scapy and pypcapkit. Both are providing src, dst, type and raw data only.
>>from scapy.all import *
>>pcap = rdpcap("/content/sample.pcap")
>>pcap
output as: <sample.pcap: TCP:0 UDP:0 ICMP:0 Other:252>
>>pcap[0]
output as:<Ether dst=xx:xx:xx:xx:xx:xx src=xx:xx:xx:xx:xx:xx type=0x809a |<Raw load='A\xd8\xbdxV\xff\xff\x8bRk\x02ece.......
expecting extracted data as Wireshark data
Update 1:
I tried jNetPcap, pcap4j. But nothing helped out. When i tried pyshark. It is able to project the data. But there is problem i am facing now packet.6lowpan is not allowing by python parser, variable should not start with integer.
Ex: pcap = pyshark.FileCapture("xxxx//xx//xxxx.pcapng")
for pkt in pcap:
print(pkt.6lowpan)
syntax error...
Update 2:
pkt.6lowpan issue resolved by using pkt["6lowpan"]... Ref solution by pyshark Team
Updating the content, may help some other.