THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.

Revision history  [back]

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.

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.