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

Filter tshark command

0

Hi, I'm trying to use the following command from java application: tshark -l -T pdml -ieth0 -f "host 192.168.186.128 or host 192.1.1.1" -Y"http"

When i'm executing this command line from the shell it works fine, but when i'm trying to run this command from the application i get this message: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="pdml2html.xsl"?> <pdml version="0" creator="wireshark/1.12.0" time="Tue Jan 6 18:17:43 2015" capture_file=""> </pdml>

Any help welcome Thanks Ilan

asked 06 Jan '15, 08:20

Ilan's gravatar image

Ilan
11112
accept rate: 0%


One Answer:

0

Looks like your capturing process did not start. One possible reason: Your Java application does not have enough privileges to run tshark (actually dumpcap) on Linux/Unix/*BSD. If so, you will get an error message on STDERR. So, please check STDERR while you run tshark from Java to see the error message.

To fix the privilege issue, please read the following Wiki:

http://wiki.wireshark.org/CaptureSetup/CapturePrivileges

See also my answers (and comments) to the following questions.

https://ask.wireshark.org/questions/19675/error-when-running-wireshark-on-ubuntu-as-non-root-user
https://ask.wireshark.org/questions/25242/wireshark-and-linux

Regards
Kurt

answered 07 Jan '15, 01:33

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%