From 0732c60bb286c24dd3db567f80a4515ad0a0dcea Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 5 Nov 2007 22:58:01 +1300 Subject: [PATCH] Allow the interface to be specified. --- testing/watch-port-80.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/watch-port-80.sh b/testing/watch-port-80.sh index a479496c..f57925f6 100755 --- a/testing/watch-port-80.sh +++ b/testing/watch-port-80.sh @@ -1,5 +1,6 @@ #!/bin/sh PORT=${1:-"80"} +IFACE=${2:-"any"} -sudo tcpdump -i any -s0 -l -n -q -A "tcp port ${PORT} and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" +sudo tcpdump -i $IFACE -s0 -l -n -q -A "tcp port ${PORT} and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)"