This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.
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

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.

permanent link

answered 21 Mar '16, 10:17

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

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:

×832
×238
×97
×12

question asked: 21 Mar '16, 01:38

question was seen: 1,639 times

last updated: 21 Mar '16, 10:17

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