Text2pcap: it gives the original unedited pcap in output

asked 2023-03-29 14:00:10 +0000

Hello!

I am doing the following:

  1. I select the stream to follow in Wireshark, I go to File -> Export packet Dissections -> As Plain Text.
  2. Then, I select Bytes only in Packet format and save it in a text file.
  3. I then edit the text file to update the hex and corresponding text (4 Bytes) and save it.
  4. I then run text2pcap mytexttfile.txt output.pcap and for some reason output.pcap still has the original unedited content.

I checked the text file multiple times to make sure the edits were made and did the entire process multiple times to be sure that I was writing to the correct file.

What am I doing incorrectly? Thank You!

If it helps, I'm using Text2pcap (Wireshark) 3.6.2 (Git v3.6.2 packaged as 3.6.2-2).

edit retag flag offensive close merge delete

Comments

I just tested with 3.6.2 (v3.6.2-0-g626020d9b3c3) on Windows. Did the export, modification, text2pcap, verify output pcap - all good.
The only time it didn't work is when I modified the text at the end of the line instead of the appropriate hex digits.

Chuckc gravatar imageChuckc ( 2023-03-29 14:45:24 +0000 )edit

I then edit the text file to update the hex and corresponding text (4 Bytes) and save it.

If, instead, you make a copy of the file, edit that file to update the hex and corresponding text, save it, and then use diff on UN*X or fc on Windows (or diff if you have some UN*Xy environment such as Cygwin or WSL) to compare the original and the copy, what is the output of the comparison?

I then run text2pcap mytexttfile.txt output.pcap and for some reason output.pcap still has the original unedited content.

What if you run text2pcap copy-of-mytextfile.txt modified-output.pcap, where copy-of-mytextfile.txt is the modified version of the copy of the file, and check whether modified-output.pcap still has the original unedited content?

Guy Harris gravatar imageGuy Harris ( 2023-04-06 07:05:27 +0000 )edit