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

Detect all conversation with a FIN packet

0

How can I detect/print all conversation that (will) have a FIN packet within an existing capture file.
I'm aiming at tshark usage.

asked 06 Dec '11, 07:18

Trevor's gravatar image

Trevor
41448
accept rate: 0%


One Answer:

1

One way would be to actually filter for tcp.flags.fin==1 and then look for unique identifiers for that particular session. This could be tcp.port (if unique), tcp.stream (which I think is the easiest) or maybe even initial sequence number...

You'll need a proper identifier to later filter those sessions if you want to see them complete and not only the FIN-packets.

tshark -r testtrace.pcap -R "tcp.flags.fin==1" -n -Tfields -e tcp.stream

can give you a list of those tcp.stream numbers. You can append | sort -u or whatever to go ahead with script building e.g.

answered 06 Dec '11, 07:33

Landi's gravatar image

Landi
2.3k51442
accept rate: 28%

10x. That seems like a good way to start

(08 Dec '11, 03:03) Trevor