Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Or what am I doing wrong?

Assuming that a raw blob of data is a valid capture file.

There are a number of capture file formats that Wireshark can read.

Its native formats are pcap and pcapng; you should probably consider using a library such as Pcapy to write a file in pcap format.

Or what am I doing wrong?

Assuming that a raw blob of data is a valid capture file.

There are a number of capture file formats that Wireshark can read.

Its native formats are pcap and pcapng; you should probably consider using a library such as Pcapy to write a file in pcap format.

Or you could write the TShark output as a pcap or pcapng file (with -w rather than -x), read it with Pcapy, process it in your Python program, and write it using Pcapy.