I have the following data I'd like to convert to a pcap with
I attempt to do this by executing the following:
But I receive the following error and conversion fails:
What is wrong with the syntax of the previous file? It's indicated that Thanks, Matt [update] Thanks guys. I think I also tried asked 02 Jul '13, 13:10 mbrownnyc edited 02 Jul '13, 19:19 |
One Answer:
text2pcap needs a defined format as input, which is described here: In your input, text2pcap does not understand the date stamp. If you reformat the input like shown below, it will accept it.
Regards answered 02 Jul '13, 14:04 Kurt Knochner ♦ edited 02 Jul '13, 14:05 |
Thanks Kurt. I'll give this a shot tomorrow. It's stated in the docs that if no timestamp is provided, then each packet is stamped a second apart. How do I properly supply the timstamp? Thanks.
Ah, it was your intention to have the time stamp in the packets. So, then please use the following command:
with this input.txt
Or you can use the shorter form:
Refer to strptime for more details on the various time field descriptors.
Incidentally, Wireshark also supports importing a text file in this format to a pcap file. Use "
File -> Import from Hex Dump
" (or "File -> Import
" for Wireshark 1.8).