-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup
92 lines (86 loc) · 1.84 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
#DEVELOPED BY DEVIL MASTER
#github.com/isuruwa
# Colors
re='\e[1;31m'
wh='\e[1;37m'
bl='\e[1;34m'
Escape="\033";
ref="${Escape}[31m";
gf="${Escape}[32m";
lgf="${Escape}[92m"
yf="${Escape}[33m";
bf="${Escape}[34m";
cf="${Escape}[36m";
ee="${Escape}[0m";
pu='\033[1;35m'
cy='\033[1;36m'
lg='\e[1;32m'
ye='\e[1;33m'
pink='\033[1;35m'
# Detect System
function sys() {
cat /etc/os-release > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
sysname=linux
else
sysname=termux
fi
}
#Download Ngrok
function fixngrok() {
echo -e $lgf "[+] Downloading ngrok..."
case `dpkg --print-architecture` in
aarch64)
architectureURL="arm64" ;;
arm)
architectureURL="arm" ;;
armhf)
architectureURL="arm" ;;
amd64)
architectureURL="amd64" ;;
i*86)
architectureURL="386" ;;
x86_64)
architectureURL="amd64" ;;
*)
echo "unknown or unsupported architecture"
esac
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-${architectureURL}.zip -O ngrok.zip
unzip ngrok.zip
chmod 777 ngrok
}
#Check For Dependancies
function dependencies() {
if [ $sysname = "termux" ]; then
pkg update
pkg upgrade
pkg install wget
chmod +x *
fixngrok
mv ngrok $PREFIX/bin
echo -e $lgf "\nInstallation Sucessed . Run './phoenix' command to start tool . \n"
else
chmod +x *
fixngrok
mv ngrok /usr/bin
echo -e $lgf "\nInstallation Sucessed . Run './phoenix' command to start tool . \n"
fi
}
# Configure Ngrok Authtoken
function ngrokauth() {
file=$PREFIX/bin/ngrok
if [ ! -e "$file" ]; then
echo "Ngrok doesn't exist"
echo "Jumping to ngrok installation"
sleep 5
fixngrok
else
echo -n -e $pink "\n[+] Enter Ngrok Authtoken only (ex -xxxxxxxxxxxxxxxxxxx) : "
read token
ngrok authtoken $token
fi
}
sys
dependencies
ngrokauth