views:

50

answers:

2

Hi ppl =)

I have following file: test_network.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 65535)
I know that in this file are few video streams and i need to extract them. How can i do this?
The biggest problem is that size of file ~180 GB ))

A: 

You can check following link for understad pcap specification: PCAP especification

This website could be useful for you: tcpdump.org

Also you can use c++ library: libpcap++

isola009
+1  A: 
  1. Use a Pcap library (libpcap, WinPcap, Pcap.Net)
  2. Extract the TCP over IP over Ethernet.
  3. Reconstruct the TCP stream (see http://stackoverflow.com/questions/2916612/reconstructing-data-from-pcap-sniff).
  4. Save the TCP stream data to a file.

Try some Pcap TCP reconstruction tools:

http://www.codeproject.com/KB/IP/TcpRecon.aspx

http://code.google.com/p/pcap-reconst/

brickner
So, i used `tshark` to see how many streams are in that pcap file and addresses of src/dst.Next, i use `tshark` to capture packets only for specific src/dst address and write them to another pcap file.Finally, i wrote program using `libpcap` to extract payload of every packet and write it to `some.mpg`Now i need to check this `mpg` file to be sure that it is not corrupted. But i don't know how to do this.
dscTobi
If you only extract the payload this may not be enough. You need to reconstruct the data according to the sequence numbers. If you check the TCP sequence numbers and other parameters this should be a a valid file (as if you've downloaded it using TCP). I don't know how to validate an mpg file, but I'm sure there a lot of software that does that. Any MPG player can let you know...
brickner