6
|
1 #!/bin/bash
|
|
2
|
|
3 g++ -c scanner.cpp
|
|
4 if [ $? -ne 0 ]; then
|
|
5 echo "compiler errors"
|
|
6 exit
|
|
7 fi
|
|
8 g++ -o scanner scanner.o /usr/lib/libresolv.a
|
|
9 if [ $? -ne 0 ]; then
|
|
10 echo "linker errors"
|
|
11 exit
|
|
12 fi
|
|
13
|
|
14 if [ "$1" == "comp" ]; then
|
|
15 exit
|
|
16 fi
|
|
17
|
|
18 #./scanner test.file
|
|
19 #./scanner /var/dcc/log/msg.1Q2cNc #mime test
|
|
20 #./scanner /var/dcc/log/msg.1Q2cYs #base64 test
|
|
21 #./scanner /var/dcc/log/msg.1Q2bD7 #html entity test
|
|
22
|
8
|
23 #for i in /var/dcc/log/*; do
|
|
24 for i in /tmp/dcc/msg*; do
|
6
|
25 echo '**********************'
|
|
26 echo $i
|
8
|
27 ./scanner $i
|
6
|
28 done
|