OSQA is unmaintained. Help us figure out where to go from here.

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

hhw
10259
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 ♦
11.4k16100
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×822

question asked: 14 Jul, 23:47

question was seen: 76 times

last updated: 15 Jul, 00:57

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