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
|
|
23 for i in /var/dcc/log/*; do
|
|
24 echo '**********************'
|
|
25 echo $i
|
|
26 sleep 2
|
|
27 ./scanner $i | less
|
|
28 done
|