forked from sputnicyes/hackapk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·84 lines (66 loc) · 1.45 KB
/
setup
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
#!/data/data/com.termux/files/usr/bin/bash
## Colors
C='\033[1;36m'
G='\033[1;32m'
R='\033[1;31m'
Y='\033[1;33m'
B='\033[1;34m'
P='\033[1;35m'
RE='\033[0m'
DIR=$HOME/hackapk
MSFPATH="$HOME/metasploit-framework"
mv $MSFPATH/lib/msf/core/payload/apk.rb $MSFPATH/lib/msf/core/payload/apk.rb.original
cp $DIR/.data/apk.rb $MSFPATH/lib/msf/core/payload/apk.rb
clear
echo
echo -e $Y" [*] Setting Up Program ..."$C
echo
chmod 777 $DIR/.data/binaries/lib/libld.so
chmod +x $DIR/.data/apktool
chmod +x $DIR/hackapk
chmod +x $DIR/.data/signapk
chmod 777 $DIR/.data/binaries/java
chmod 777 $DIR/.data/binaries/bin/java
chmod 777 $DIR/.data/binaries/bin/keytool
if [ ! -d $DIR/decompiler ]; then
mkdir $DIR/decompiler
fi
if [ ! -d $DIR/frameworks ]; then
mkdir $DIR/frameworks
fi
if [ ! -d $DIR/recompiler ]; then
mkdir $DIR/recompiler
fi
if [ ! -d $DIR/signed ]; then
mkdir $DIR/signed
fi
if [ ! -d $DIR/unsigned ]; then
mkdir $DIR/unsigned
fi
if [ ! -d $DIR/zipalign ]; then
mkdir $DIR/zipalign
fi
if [ ! -d $DIR/final ]; then
mkdir $DIR/final
fi
if [ ! -d $DIR/script ]; then
mkdir $DIR/script
fi
if [ ! -d $DIR/payload ]; then
mkdir $DIR/payload
fi
if [ -L $PREFIX/bin/hackapk ]; then
rm $PREFIX/bin/hackapk
fi
if [ -L $PREFIX/bin/apktool ]; then
rm $PREFIX/bin/apktool
fi
ln -s $DIR/hackapk $PREFIX/bin/
ln -s $DIR/.data/apktool $PREFIX/bin/
ln -s $DIR/.data/binaries/java $PREFIX/bin/
echo
echo -e $G" [*] DONE!"
sleep 1
echo
echo -e $R" [*] Now You Can Run HackApk."
echo