forked from abdoxfox/HTTP-CUSTOM-HEADERS-VPN
-
Notifications
You must be signed in to change notification settings - Fork 2
/
hi
101 lines (79 loc) · 2.17 KB
/
hi
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
93
94
95
96
97
#!/bin/bash
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
SCOLOR='\033[0m'
echo -e "${GREEN}Choose Connection Method:"
echo "0 - SSH Direct "
echo "1 - PAYLOAD "
echo "2 - SSL "
echo -e "3 - SSL+PAYLOAD "
read -p "Enter choice number : " mode
find=`cat settings.ini | grep "connection_mode = " |awk '{print $3}'`
sed -i "s/connection_mode = $find/connection_mode = $mode/g" settings.ini
sleep 1
killprocess() {
echo -e "${RED}VPN service stopped"
kill -9 $(lsof -t -i:9092) 2> /dev/null
python pidkill.py >> /dev/null &
rm logs.txt 2> /dev/null
echo -e " ${SCOLOR}"
}
function connect() {
screen -AmdS nohub python3 tunnel.py
sleep 1
if [ "$mode" = '0' ] || [ "$mode" = '1' ]
then
screen -AmdS nohub python3 ssh.py 1
elif [ "$mode" = '2' ] || [ "$mode" = '3' ]
then
screen -AmdS nohub python3 ssh.py 2
else
echo -e "${RED}wrong choice\ntry again${SCOLOR}"
python3 pidkill.py
exit
fi
echo -e "${YELLOW}===========[STARTED]===========${SCOLOR}"
sleep 10
cat logs.txt
var=`cat logs.txt | grep "CONNECTED SUCCESSFULLY"|awk '{print $4}'`
if [ "$var" = "SUCCESSFULLY" ];then
echo -e "${YELLOW}==========[CONNECTED]=========="
echo -e "${SCOLOR}"
screen -AmdS nohub ./pinger
chmod +x proxification
iptables --flush
echo -e "${GREEN}"
./proxification 2> /dev/null
else
echo -e "${RED}failed! ${SCOLOR}"
fi
}
kill -9 $(lsof -t -i:9092) 2> /dev/null
rm logs.txt 2> /dev/null
connect
for i in {1..5}
do
killprocess 2> /dev/null
echo -e "${GREEN}"
read -p "reconnect ? [y\n] " reconnect
if [ "$reconnect" = 'y' ] || [ "$reconnect" = 'Y' ]
then
read -p "do yo want changing auto replace value [y\n]" auto_replace
if [ "$auto_replace" = 'y' ] || [ "$auto_replace" = 'Y' ]
then
value=`cat settings.ini | grep "auto_replace ="| awk '{print $3}'`
echo "0 - for payload that doesn't send HTTP RESPONSE"
echo "1 - for payload that send one HTTP RESPONSE"
echo "2 - for payload that send double HTTP RESPONSE"
read -p "Enter your sutable choice : " choice
sed -i "s/auto_replace = $value/auto_replace = $choice/g" settings.ini
else
echo ''
fi
echo -e "reconnecting ${SCOLOR}"
connect
else
exit
fi
done