convert cap to csv keeping field's leading zeros

Hi everybody, I'm converting a cap file to csv file using the following line

"C:\Program Files\Wireshark\tshark.exe" -r "C:\Users\User\Desktop\test.cap" -T fields  -e tcap.tid -E header=y -E separator=; >  "C:\Users\User\Desktop\test2.csv"

The csv file is generated, but the tcap.tid values don't have the leading zeros as in the cap file. How can I fix this issue?

Pierfrancesco's avatar
1
Pierfrancesco
asked 2022-02-02 17:22:04 +0000
grahamb's avatar
23.8k
grahamb
updated 2022-02-02 17:30:11 +0000
edit flag offensive 0 remove flag close merge delete

Comments

Can you share a pcap file that shows the issue?
If so put the file(s) you would like to share on a public file share - Dropbox, Google, Microsoft, ... - then update your question with a link to them.

Chuckc's avatar Chuckc (2022-02-02 22:23:15 +0000) edit

Just how did you check the CSV file? Excel will hapily remove leading zero's.

hugo.vanderkooij's avatar hugo.vanderkooij (2022-02-03 08:08:28 +0000) edit
add a comment see more comments