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

Get list of application layer protocols only

0

I'm currently using this to get a list of protocols found in a pcap file.

tshark -r ~/Downloads/smallFlows.pcap -Tfields -eframe.protocols | sort | uniq

I would like to narrow this down to application layer protocols only. Can I do this without filtering the output with a script (ie: Tshark and terminal commands only?)

EDIT

I managed to get it doing this:

tshark -r ~/Downloads/smallFlows.pcap -Tfields -eframe.protocols -R "tcp && ip.addr==192.168.3.131" -2 | sort | uniq | cut -d ':' -f 5

I'm curious to know if there's a better way of doing this though!

asked 15 Jun '15, 02:32

Alexandre%20Kaskasoli's gravatar image

Alexandre Ka...
1223
accept rate: 0%

edited 15 Jun '15, 02:47


One Answer:

0

How about this one?

tshark -nr input.pcap -T fields -e frame.protocols | tr ":" "\n" | egrep -v "(eth|ip|tcp|udp)" | sort -u

Regards
Kurt

answered 15 Jun '15, 09:51

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%