PORT 1234 has HOMEPAGE NOW
This commit is contained in:
parent
5b8698ffec
commit
2e0e8af73d
12
12345.sh
12
12345.sh
|
@ -30,11 +30,16 @@ echo "Register and Connect Astronaut with http://$myIP:1234/?email=&ph1=&ph2="
|
||||||
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||||
|
|
||||||
PORT=12345
|
PORT=12345
|
||||||
|
HOMEPAGE="$HOME/.zen/Astroport.ONE/templates/instascan.html"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
# REPLACE myIP in http response template
|
if [[ $HOMEPAGE ]]; then
|
||||||
sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS}
|
cp $HOMEPAGE $HOME/.zen/tmp/myIP.http.${MOATS}
|
||||||
|
else
|
||||||
|
# REPLACE myIP in http response template
|
||||||
|
sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS}
|
||||||
|
fi
|
||||||
## LAUNCHING
|
## LAUNCHING
|
||||||
URL=$(cat $HOME/.zen/tmp/myIP.http.${MOATS} | nc -l -p 1234 -q 1 | grep '^GET' | cut -d ' ' -f2 | cut -d '?' -f2)
|
URL=$(cat $HOME/.zen/tmp/myIP.http.${MOATS} | nc -l -p 1234 -q 1 | grep '^GET' | cut -d ' ' -f2 | cut -d '?' -f2)
|
||||||
|
|
||||||
|
@ -180,6 +185,9 @@ while [[ ! -f ~/.zen/tmp/index.redirect.${MOATS} && ! $(ps auxf --sort=+utime |
|
||||||
|
|
||||||
## CHANGE NEXT PORT (HERE YOU CREATE A SOCKET QUEUE)
|
## CHANGE NEXT PORT (HERE YOU CREATE A SOCKET QUEUE)
|
||||||
[ $PORT -lt 12399 ] && PORT=$((PORT+1)) || PORT=12345
|
[ $PORT -lt 12399 ] && PORT=$((PORT+1)) || PORT=12345
|
||||||
|
## TODO : RANDOM PORT SWAPPINESS
|
||||||
|
|
||||||
|
HOMEPAGE=""
|
||||||
|
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,7 +9,7 @@ Content-Type: text/html; charset=UTF-8
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>ASTROPORT</h1>
|
<h1>ASTROPORT</h1>
|
||||||
<h2>Astronaute nous recherchons votre TW .... </h2>
|
<h2>Astronaute nous créons votre TW .... </h2>
|
||||||
<form action = "http://127.0.0.1:12345" method = "GET">
|
<form action = "http://127.0.0.1:12345" method = "GET">
|
||||||
<input type='submit' value='PATIENTEZ SVP'>
|
<input type='submit' value='PATIENTEZ SVP'>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue