This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Batch file to read pcap file ? how

0
1

i am making batch file that read pcap file here is my batch file code

 tshark -r C:\Program Files\Wireshark\sample.pcap -q -z conv,ip

-E separator=, -e ip.src -e ip.dst > "d:\logcapture.txt"

that creates an empty output file in d directory i have tested my command con tshark here is command

   tshark -r sample.pcap -q -z conv,ip

that works sucessfully can you please tell me how to read and save text of pcap file using batch file?

asked 21 Mar ‘16, 01:38

Engr%20Nouman's gravatar image

Engr Nouman
1121
accept rate: 0%

What kind of text are you trying to add to the pcap ? Have you researched “editcap” and “mergecap” ? I believe editcap should allow you to do what you need. I’d have to research it more to give you exact options, but both are powerful when it comes to editing pcap files.

(21 Mar ‘16, 10:06) msmorten


One Answer:

0

If you post is exactly what you have in your batch file, then you'll need to quote the pcap filename. You may also need to quote the other parameters. Test by executing exactly the same command at the command prompt.

answered 21 Mar '16, 10:17

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%