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

Capturing based on a packet content

0

Hi,

I'd like to logs all packets that containg a specific pattern (a string in my case). I want to log only thoses packets 24h/7.

Right now, I can log all packets that comes to a specified port and apply a filter, but this generate tons of data on the disk, generating too much data to be usefull.

So I'd like to be able to log using a filter (not logging everything that comes in and then applying a filter).

Is that possible with wireshark?

Thx!

asked 11 Sep '14, 07:55

Snalibe's gravatar image

Snalibe
11112
accept rate: 0%


One Answer:

1

Please use this String-Matching Capture Filter Generator:

https://www.wireshark.org/tools/string-cf.html

As an alternative you could use ngrep.

answered 13 Sep '14, 09:27

Roland's gravatar image

Roland
7642415
accept rate: 13%