master-thesis/bin/sniff-intf.sh

18 lines
222 B
Bash
Raw Permalink Normal View History

2019-07-28 10:05:23 +00:00
#!/bin/sh
if [ $# -ne 2 ]; then
echo "$0 intf name"
exit 1
fi
set -x
cd ~/master-thesis/pcap
intf=$1
name=$2
now=$(date +%F-%H%M)
filename=${name}-${now}-${intf}.pcap
sudo tcpdump -ni ${intf} -w "${filename}"