aboutsummaryrefslogtreecommitdiffstats
path: root/gg_map/glouglou_localsniff.sh
blob: 75d9cdd12e4b04c015651c6c105b2091dc5ef248 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# Wrapper script to visualize network activity on local machine

PATH="./:$PATH" # for pkg

glougloud=`which glougloud`
gg_sniff=`which gg_sniff`
gg_map=`which gg_map`
iface=${1-"eth0"}

if [ -z "$glougloud" -o -z "$gg_sniff" -o -z "$gg_map" ]; then
    echo "instalation incomplete (glougloud, gg_sniff, gg_map)"
    exit 1
fi

tmux start                                                 \;\
        new-session -d -s glouglou                         \;\
        neww -n "glougloud" "sudo $glougloud -v; bash"     \;\
        neww -n "gg_sniff"  "sudo $gg_sniff -v -i $iface"  \;\
        neww -n "gg_map"    "gg_map"                       \;\
        attach-session -t glouglou