Allow the interface to be specified.

This commit is contained in:
Andrew McMillan 2007-11-05 22:58:01 +13:00
parent e12139c636
commit 0732c60bb2

View File

@ -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)"