Very comfortable with Wireshark and understand filters, etc... It seems that a lot of people ask this question and the answers always involve saving a massive .pcap file and doing some post processing on it to isolate only what's needed. Trouble is I need to run Wireshark for many hours and capture activity only to a specific port. I set the filter to isolate the port activity in the display window but can't watch the screen for 8 hours. The basic question is how can I simply write only the filtered result to a file. What I see in the display need to be saved in a file for later review. Thanks asked 15 Dec '15, 06:36 King Of Crab |
2 Answers:
The simple answer is "use Or you may want to use command-line tshark instead of the GUI Wireshark and use A hint which I haven't found at the wiki: if you need to specify more complex display filter conditions, use "" to delimit the condition, and use \" where you need to use " as part of the filter. Example: answered 15 Dec '15, 07:21 sindy |
If all you want is activity to a specific TCP or UDP port, and will never have any interest in anything else (as in "you won't, after reading the traffic, realize that you really need to see something other than traffic to that port"), you can use a capture filter such as If you want packets both to and from that port, remove the Capture filters are handled by a much simpler engine (in the libpcap/WinPcap library and in the OS kernel), won't handle arbitrary forms of tunneling/encapsulation of IP traffic, and require extra care if you're using VLANs (the filter expression in question won't handle VLAN traffic; you'd need something like
(with answered 15 Dec '15, 19:39 Guy Harris ♦♦ |
Thanks sindy. I ran tshark with a few filter options and got what's needed on the screen output but didn't have the same filter option for writing to a file. Just redirected stdio to a file did the trick. Yay for me. Thanks again