20 lines
276 B
Bash
Executable file
20 lines
276 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "$0 host name"
|
|
exit 1
|
|
fi
|
|
|
|
set -x
|
|
|
|
host=$1
|
|
name=$2
|
|
|
|
now=$(date +%F-%H%M)
|
|
filename=${name}-${now}-${host}.pcap
|
|
intf=${host}-eth0
|
|
|
|
mx "$host" tcpdump -ni ${intf} -w "${filename}"
|
|
git add .
|
|
git commit -m "+pcap: ${filename}"
|
|
git push
|