-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlaunch_iccta.sh
More file actions
executable file
·51 lines (41 loc) · 1.2 KB
/
Copy pathlaunch_iccta.sh
File metadata and controls
executable file
·51 lines (41 loc) · 1.2 KB
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
#!/bin/bash
print_info () {
echo "[*] $1"
}
while getopts a:p: option
do
case "${option}"
in
a) APP_PATH=${OPTARG};;
p) ANDROID_JAR=${OPTARG};;
esac
done
echo "IccTA launcher"
echo
if [ -z "$APP_PATH" ]
then
read -p "Path of APK: " APP_PATH
fi
if [ -z "$ANDROID_JAR" ]
then
read -p "Path to android.jar: " ANDROID_JAR
fi
cp $APP_PATH ./soot-infoflow-android-iccta &> /dev/null
cd soot-infoflow-android-iccta
APP_BASENAME_APK=$(basename $APP_PATH .apk)
APP_BASENAME=$(basename $APP_PATH)
DARE_RESULTS=dareResults
RETARGETED_PATH=$DARE_RESULTS/retargeted
PATH_LOGS=logs
if [ ! -d $PATH_LOGS ]
then
mkdir $PATH_LOGS
fi
print_info "Retargeting $APP_BASENAME"
./dare/dare -d ../$DARE_RESULTS ../$APP_BASENAME &> $PATH_LOGS/$APP_BASENAME-dare.txt
print_info "Resolving ICC model"
java -jar ic3.jar -input $RETARGETED_PATH/$APP_BASENAME_APK -apkormanifest $APP_BASENAME -cp $ANDROID_JAR -db cc.properties &> $PATH_LOGS/$APP_BASENAME-ic3.txt
print_info "Executing IccTA"
java -jar iccta.jar $APP_BASENAME $ANDROID_JAR &> $PATH_LOGS/$APP_BASENAME-iccta.txt
print_info "$APP_BASENAME successfully analyzed."
print_info "Check results in soot-infoflow-android-iccta/$PATH_LOGS/"