This should be fairly straight forward. There are plenty of python libraries for parsing pcap files, you can the extract the individual payloads. If there's sequence information in the headers is reliable then reassembly is trivial, otherwise you can use some heuristics given it's a known file format.
Best
Gareth
PS - this sounds like a student coursework!
PPS - if we're talking a small number of packets <20 then it is probably quicker to do by hand using wireshark.
↧