aboutsummaryrefslogtreecommitdiffstats
path: root/gg_sniff/localviz.sh
blob: 39d8a440d4b2199bf39c8c68886c5057f9800c9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# Wrapper script to visualize network activity on local machine

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