raldi
raldi

Reputation: 22170

What's a tcpdump one-liner to dump a TCP stream that matches a given substring?

Is there a quick tcpdump one-liner to print out a TCP stream that matches a particular substring -- or, if that's not easy, how about printing out just the single TCP packet that matches the substring?

Upvotes: 2

Views: 3403

Answers (1)

Andrew Edgecombe
Andrew Edgecombe

Reputation: 40382

The best option is to use ngrep rather than tcpdump. Ngrep is designed to do exactly what you're after.

Upvotes: 6

Related Questions