-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
222 lines (208 loc) · 6.15 KB
/
install
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
#!/bin/sh
# Name : WhatsAppGhost
# Date : April 2022
# Description : WhatsAppGhost is a WhatsAppGhost tools installer and package manager for hacker's.
# |
nc="\033[00m"
white="\033[1;37m"
grey="\033[0;37m"
purple="\033[0;35m"
red="\033[1;31m"
green="\033[32m"
yellow="\033[33m"
purple="\033[0;35m"
cyan="\033[1;36m"
cafe="\033[1;33m"
fiuscha="\033[0;35m"
blue="\033[34m"
orange="\033[38;5;122m"
# |
RED="$(printf '\033[31m')"
GREEN="$(printf '\033[32m')"
ORANGE="$(printf '\033[33m')"
BLUE="$(printf '\033[34m')"
MAGENTA="$(printf '\033[35m')"
CYAN="$(printf '\033[36m')"
WHITE="$(printf '\033[37m')"
BLACK="$(printf '\033[30m')"
REDBG="$(printf '\033[41m')"
GREENBG="$(printf '\033[42m')"
ORANGEBG="$(printf '\033[43m')"
BLUEBG="$(printf '\033[44m')"
MAGENTABG="$(printf '\033[45m')"
CYANBG="$(printf '\033[46m')"
WHITEBG="$(printf '\033[47m')"
BLACKBG="$(printf '\033[40m')"
RESETBG="$(printf '\e[0m')"
BLINK="$(printf '\033[5;31m')"
# |
Banner(){
echo "$BLUE
██████ █████ ████
░░██████ ░░███ ░░███
░███░███ ░███ ██████ █████ ░███ ██████
░███░░███░███ ███░░███ ███░░ ░███ ███░░███
░███ ░░██████ ░███████ ░░█████ ░███ ░███████
░███ ░░█████ ░███░░░ ░░░░███ ░███ ░███░░░
█████ ░░█████░░██████ ██████ █████░░██████$RED
░░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░░░
░ _ _ _ ___ ░
░ | | | | __ _ ___| |/ (_)_ __ __ _ ░
░ | |_| |/ _' |/ __| ' /| | '_ \ / _' | ░
░ | _ | (_| | (__| . \| | | | | (_| | ░
░ |_| |_|\__,_|\___|_|\_\_|_| |_|\__, | ░
░ |___/ ░
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒ ▀▀█▀▀ █▀▀█ █▀▀█ █ █▀▀ ▒
▒ █ █ █ █ █ █ ▀▀█ ▒
▒ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀$ORANGE v0.0.0.1 ▒
▒ https://www.github.com/Anlominus/WhatsAppGhost▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
"
}
logo="$(Banner)"
# checking for system home dir
if [ -d $HOME ]; then
home=$HOME
else
home="~/"
fi
# checking for system bin dir
if [ -d /data/data/com.termux/files/usr/bin ]; then
bin="/data/data/com.termux/files/usr/bin"
elif [ -d /usr/local/bin ]; then
bin="/usr/local/bin"
elif [ -d /bin ]; then
bin="/bin"
elif [ -d /sbin ]; then
bin="/sbin"
fi
# checking for configuration dir
if [ -d /data/data/com.termux/files/usr/etc ]; then
conf_dir="/data/data/com.termux/files/usr/etc"
elif [ -d /etc ]; then
conf_dir="/etc"
fi
# configuration files
if [ -d $conf_dir/WhatsAppGhost ]; then
if [ -e $conf_dir/WhatsAppGhost/data/tools.dat ]; then
tools_data="$conf_dir/WhatsAppGhost/data/tools.dat"
fi
if [ -e $conf_dir/WhatsAppGhost/data/category.dat ]; then
category_data="$conf_dir/WhatsAppGhost/data/category.dat"
fi
else
if [ -e data/tools.dat ]; then
tools_data="data/tools.dat"
fi
if [ -e data/category.dat ]; then
category_data="data/category.dat"
fi
fi
# checking for system root access
if [ `command -v sudo` ]; then
sudo="sudo"
else
sudo=""
fi
# checking for system package manager
if [ -e /data/data/com.termux/files/usr/bin/pkg ]; then
pac="pkg"
system="termux"
elif [ `command -v apt` ]; then
pac="apt"
system="linux"
elif [ `command -v apt-get` ]; then
pac="apt-get"
system="linux"
elif [ `command -v apk` ]; then
pac="apk"
system="linux"
elif [ `command -v yum` ]; then
pac="yum"
system="fedora"
elif [ `command -v brew` ]; then
pac="brew"
system="mac"
sudo=""
fi
# setup process
clear
echo "$logo"
echo "${green} Installing .... ${nc}"
sleep 1
echo "${yellow} Running setup .... ${nc}"
sleep 1
# installing dependency
for each_pac in "wget" "curl" "git"; do
if [ ! `command -v $each_pac` ]; then
if [ $sudo ]; then
$sudo $pac install $each_pac -y
else
$pac install $each_pac -y
fi
fi
done
# removing old one
if [ -e $bin/WhatsAppGhost ]; then
if [ -d $conf_dir/WhatsAppGhost ]; then
if [ $sudo ]; then
$sudo rm -rf $bin/WhatsAppGhost
$sudo rm -rf $conf_dir/WhatsAppGhost
else
rm -rf $bin/WhatsAppGhost
rm -rf $conf_dir/WhatsAppGhost
fi
fi
fi
# install WhatsAppGhost
if [ $0 = "install" -o $0 = "./install" ]; then
if [ -e WhatsAppGhost ]; then
if [ $sudo ]; then
$sudo mv -v WhatsAppGhost $bin
$sudo chmod +x $bin/WhatsAppGhost
else
mv -v WhatsAppGhost $bin
chmod +x $bin/WhatsAppGhost
fi
fi
cd ..
if [ -d WhatsAppGhost ]; then
if [ $sudo ]; then
$sudo mv -v WhatsAppGhost $conf_dir
else
mv -v WhatsAppGhost $conf_dir
fi
fi
else
if [ -e WhatsAppGhost/WhatsAppGhost ]; then
if [ $sudo ]; then
$sudo mv -v WhatsAppGhost/WhatsAppGhost $bin
$sudo chmod +x $bin/WhatsAppGhost
else
mv -v WhatsAppGhost/WhatsAppGhost $bin
chmod +x $bin/WhatsAppGhost
fi
fi
if [ -d WhatsAppGhost ]; then
if [ $sudo ]; then
$sudo mv -v WhatsAppGhost $conf_dir
else
mv -v WhatsAppGhost $conf_dir
fi
fi
fi
# check WhatsAppGhost is installed or not
if [ -e $bin/WhatsAppGhost ]; then
if [ -d $conf_dir/WhatsAppGhost ]; then
clear
echo "$logo"
echo " ${purple}WhatsAppGhost ${green}installed successfully !!"
echo " ${green}type ${nc}'WhatsAppGhost -h'${green} for more.${nc}"
else
clear
echo "$logo"
echo " ${red}Sorry ${cyan}: WhatsAppGhost ${red}is not installed !!"
echo " ${green}Please try again${nc}"
fi
fi