I want to access data in pap packets, currently i'm using pyshark with the following code
import pyshark,sys
cap = pyshark.FileCapture('test.pcap',display_filter='ppp && not ppp.length')
for packet in cap:
if packet.pap.get_field_value('peer_id'):
print ('user: '+packet.pap.peer_id+" logged in")
and it works fine on my pc and raspberrypi unfortunately i want to use this code on openwrt/lede router on which pyshark can't be installed due to ccache error:
unable to execute 'ccache_cc': no such file or directory
which i assumed that openwrt lacks some compiler features so I tried to install other pcap parsing libraries and could install scapy, dpkt and pypcapfile and they all installed fine so how can I convert my code to use one of these libraries