This is our old Q&A Site. Please post any new questions and answers at

hi, i use tshark to convert a pcap file to txt file. i use this command: tshark -r input.pcap -x > output.txt How can i convert this text file (output.txt) to a pcap file? packets start by IP.

asked 14 Jul, 23:47

hhw's gravatar image

accept rate: 100%

edited 14 Jul, 23:49

You can if you have the original packet bytes in the text output as well. There's the command line tool text2pcap, or you can use the 'Import from hex dump' feature from Wireshark. Make sure that the text file matches the required input, so some preprocessing of the text file may be required.

permanent link

answered 15 Jul, 00:57

Jaap's gravatar image

Jaap ♦
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Jul, 23:47

question was seen: 267 times

last updated: 15 Jul, 00:57

p​o​w​e​r​e​d by O​S​Q​A