ngrep v1.26 is a program that mimics as much functionality in GNU grep as possible, applied at the network layer. ngrep stands for network grep, and is a pcap-aware tool that will allow you to specify extended regular expressions to match against the data payloads of packets, and currently recognizes TCP and UDP, and works on ethernet, ppp and slip interfaces. Excellent tool. Check it out!
1395cb55eba6e279a9a17a5f8e0e36a733d0ea2db27ee726f851390e6d4b07c5