File: make_web.sh

package info (click to toggle)
tcpflow 1.6.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,732 kB
  • sloc: cpp: 18,138; sh: 780; ansic: 347; makefile: 226; python: 55
file content (34 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# Create the files for the tcpflow website
CORP=/corp/
DEST=/var/www/digitalcorpora/tcpflow/demo
TCPFLOW=../src/tcpflow
TMP=/tmp/out$$

if [ ! -d $DEST ]; then mkdir -p $DEST ; fi

if [ ! -x $TCPFLOW ]; then (cd .. ; make ) ; fi

run()
{
  DPDF=$DEST/$2
  DPNG=${DPDF%pdf}png
  echo DPDF=$DPDF
  echo DPNG=$DPNG
  echo $TCPFLOW -o $TMP -x tcpdemux -E netviz $1  
  $TCPFLOW -o $TMP -x tcpdemux -E netviz $1  
  if [ ! -r $TMP/report.pdf ]; then
    echo tcpflow failed
    exit 1
  fi
  mv $TMP/report.pdf $DPDF
  /bin/rm -rf $TMP
  convert -scale 300 $DPDF $DPNG
  ls -l $DPDF $DPNG
}

run "-r $CORP/nps/packets/2008-nitroba/nitroba.pcap"      nitroba.pdf
run "-l $CORP/nps/packets/2009-m57-patents/net-2009*.gz"  m57-net.pdf
run "-l $CORP/mitll/packets/ideval99/week?/*/outside*gz"  id99-outside.pdf