-
Notifications
You must be signed in to change notification settings - Fork 314
/
Copy pathcheck_jpg.sh
executable file
·113 lines (89 loc) · 2.46 KB
/
check_jpg.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/bash
FILE=$1
TMP_FILE=/tmp/out
RED='\033[0;31m'
NO_COLOR='\033[0m'
check_result_file() {
RESULT_FILE=$1
HINT=${2:""}
if [ ! -f "$RESULT_FILE" ]; then
echo "Nothing found..."
return
fi
SIZE=`stat -c %s "$RESULT_FILE"`
if [ ! "`file $RESULT_FILE`" = "$RESULT_FILE: data" ] && [ $SIZE -ge 1 ]; then
echo ""
echo -e "${RED}Found something!!!${NO_COLOR}"
echo "Result size: $SIZE (type: '`file $RESULT_FILE`')"
echo "--------------"
head -n 20 $RESULT_FILE
echo "--------------"
else
echo "Probably no result..."
echo "Result size: $SIZE (type: '`file $RESULT_FILE`')"
fi
rm $RESULT_FILE
}
echo
echo "#################################"
echo "########## JPG CHECKER ##########"
echo "#################################"
echo "Checking file $FILE"
echo
echo "file $FILE:"
file $FILE
echo "identify $FILE:"
identify -verbose $FILE
echo
echo "##############################"
echo "########## exiftool ##########"
echo "##############################"
exiftool $FILE
echo
echo "#############################"
echo "########## binwalk ##########"
echo "#############################"
binwalk $FILE
echo
echo "################################"
echo "########## stegdetect ##########"
echo "################################"
stegdetect $FILE
echo
echo "#############################"
echo "########## strings ##########"
echo "#############################"
strings $FILE | head -n 20
echo "..."
strings $FILE | tail -n 20
echo
echo "##############################"
echo "########## steghide ##########"
echo "##############################"
steghide extract -sf $FILE -p ""
echo
echo "##############################"
echo "########## outguess ##########"
echo "##############################"
outguess -r $FILE $TMP_FILE
check_result_file $TMP_FILE
echo
echo "###################################"
echo "########## outguess-0.13 ##########"
echo "###################################"
outguess-0.13 -r $FILE $TMP_FILE
check_result_file $TMP_FILE
echo
echo "###########################"
echo "########## jsteg ##########"
echo "###########################"
jsteg reveal $FILE $TMP_FILE
check_result_file $TMP_FILE
echo
echo "##################################"
echo "########## stegoVeritas ##########"
echo "##################################"
UUID=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`
TMP_DIR=/data/stegoVeritas/$UUID
mkdir -p $TMP_DIR
stegoveritas $FILE -out $TMP_DIR -meta -imageTransform -colorMap -trailing