Pyshark - data from TCP packet
2 answers
If you are using a .pcap file, once you read the file using
cap = pyshark.FileCapture('vox.pcap')
and say that you want to read the data of the second packet and you are sure that such a field exists, try:
pkt = cap[1]
print pkt.tcp.data
To view the options available for pkt.tcp use:
dir(pkt.tcp)
It will return all available options for pkt.tcp
0
source to share