-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup
149 lines (138 loc) · 4.31 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/bash
spin () {
local pid=$!
local delay=0.25
local spinner=( '█■■■■' '■█■■■' '■■█■■' '■■■█■' '■■■■█' )
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
for i in "${spinner[@]}"
do
tput civis
echo -ne "\033[34m\r[*] \e[35mDownloading..please wait.........\e[33m[\033[32m$i\033[33m]\033[0m ";
sleep $delay
printf "\b\b\b\b\b\b\b\b";
done
done
printf " \b\b\b\b\b"
tput cnorm
printf "\e[1;33m [Done]\e[0m";
echo "";
}
package() {
`base64 -d <<< "YXB0IGluc3RhbGwgZmlnbGV0IHB2IG5jdXJzZXMtdXRpbHMgYmludXRpbHMgY29yZXV0aWxzIHdn
ZXQgZ2l0IHRlcm11eC1hcGkgb3BlbnNzbC10b29sIHByb290IC15Cg=="`
}
tsetup() {
if [ -e $PREFIX/bin/bind-apk ]; then
rm $PREFIX/bin/bind-apk
cp bind-apk $PREFIX/bin/
chmod 700 $PREFIX/bin/bind-apk
else
cp bind-apk $PREFIX/bin/
chmod 700 $PREFIX/bin/bind-apk
fi
cp .ubuntu.sh ~/ubuntu.sh
if [ -d $HOME/metasploit-framework ]; then
if [ -e $HOME/metasploit-framework/lib/msf/core/payload/apk.rb.old ]; then
rm $HOME/metasploit-framework/lib/msf/core/payload/apk.rb
cp apk.rb $HOME/metasploit-framework/lib/msf/core/payload/
(patch $HOME/metasploit-framework/lib/msf/core/payload/apk.rb < patch_file/apk.rb.patch) &> /dev/null;
else
cp $HOME/metasploit-framework/lib/msf/core/payload/apk.rb $HOME/metasploit-framework/lib/msf/core/payload/apk.rb.old
cp apk.rb $HOME/metasploit-framework/lib/msf/core/payload/
(patch $HOME/metasploit-framework/lib/msf/core/payload/apk.rb < patch_file/apk.rb.patch) &> /dev/null;
fi
fi
if [ -e $PREFIX/opt/metasploit-framework ]; then
if [ -e $PREFIX/opt/metasploit-framework/lib/msf/core/payload/apk.rb.old ]; then
rm $PREFIX/opt/metasploit-framework/lib/msf/core/payload/apk.rb
cp apk.rb $PREFIX/opt/metasploit-framework/lib/msf/core/payload/
(patch $PREFIX/opt/metasploit-framework/lib/msf/core/payload/apk.rb < patch_file/apk.rb.patch) &> /dev/null;
else
cp $PREFIX/opt/metasploit-framework/lib/msf/core/payload/apk.rb $PREFIX/opt/metasploit-framework/lib/msf/core/payload/apk.rb.old
cp apk.rb $PREFIX/opt/metasploit-framework/lib/msf/core/payload/
(patch $PREFIX/opt/metasploit-framework/lib/msf/core/payload/apk.rb < patch_file/apk.rb.patch) &> /dev/null;
fi
fi
cp patch_file/uapktool $PREFIX/bin/
cp patch_file/usignapk $PREFIX/bin/
chmod 700 $PREFIX/bin/uapktool $PREFIX/bin/usignapk
}
uinstall() {
cd ~/
bash ubuntu.sh
sleep 1
rm ubuntu.sh
#sed commad add soon..
cp ~/start-ubuntu.sh ~/.ubuntu
if [ -e $PREFIX/bin/ubuntu ]; then
rm $PREFIX/bin/ubuntu
echo "#! /usr/bin/env bash" >> $PREFIX/bin/ubuntu
echo >> /data/data/com.termux/files/usr/bin/ubuntu
echo >> /data/data/com.termux/files/usr/bin/ubuntu
echo bash $HOME/.ubuntu >> $PREFIX/bin/ubuntu
chmod 700 $PREFIX/bin/ubuntu
else
echo "#! /usr/bin/env bash" >> $PREFIX/bin/ubuntu
echo >> $PREFIX/bin/ubuntu
echo >> $PREFIX/bin/ubuntu
echo bash $HOME/.ubuntu >> $PREFIX/bin/ubuntu
chmod 700 $PREFIX/bin/ubuntu
fi
cd -
if [ -d $HOME/ubuntu-fs/root/u-setup ]; then
rm -rf $HOME/ubuntu-fs/root/u-setup
fi
cp u-setup -r $HOME/ubuntu-fs/root/
cp u-setup/setup $HOME/ubuntu-fs/root/
}
upackage() {
cat << EOF | ubuntu
chmod 777 ./setup
bash ./setup
EOF
}
clear;
echo "";
echo -e "\e[1;34m[*] \e[32minstall packages....\e[0m";
echo "";
apt update -y &> /dev/null;
(
package
) &> /dev/null;
termux-wake-lock;
if [ -e $PREFIX/share/figlet/Remo773.flf ]; then
echo -e "\e[1;34m[*] \033[32mRemo773.flf figlet font is present\033[0m";
sleep 4
else
wget https://raw.githubusercontent.com/remo7777/REMO773/master/Remo773.flf &> /dev/null;
sleep 3
cat Remo773.flf >> $PREFIX/share/figlet/Remo773.flf
sleep 3
rm Remo773.fif
fi
clear;
echo "";
echo -e "\033[33m$(figlet -f Remo773 "Bind-Apk")\e[0m"
echo -e "\e[1;32m
+----------------------------------*/
Remo773 : (\e[33m15.6.2019\e[32m)
1. Bind-apk (\e[35mV1.4\e[32m)
+----------------------------------*/
\033[0m";
tput setaf 3;
read -p "Do you want to setup this ? (y/n) " PROC33
tput sgr 0
if [ "$PROC33" = "y" ]; then
echo -e "\e[1;34m[*] \e[32mPlease wait.. setup termux bind-apk\e[0m";
tsetup &> /dev/null & spin
sleep 1
echo -e "\e[1;34m[*] \e[32mPlease wait.. installing ubuntu on termux..\e[0m";
uinstall &> /dev/null & spin
sleep 1
echo -e "\e[1;34m[*] \e[32mPlease wait.. installing ubuntu packages..\e[0m";
upackage &> /dev/null & spin
sleep 1
echo -e "\e[1;34m[*] \e[32mSetup Finished..\e[0m"
fi
termux-wake-unlock;
exit 0