c'est beau !!!

This commit is contained in:
fred 2022-12-25 18:11:26 +01:00
parent 8e7fbfc9c2
commit 3bfc1ad67a
5 changed files with 19 additions and 4 deletions

View File

@ -99,7 +99,9 @@ while true; do
############### ############### ############### ############### templates/index.http
# REPLACE myHOST in http response template (fixing next API meeting point)
echo "$HTTPCORS" > ~/.zen/tmp/coucou/${MOATS}.myHOST.http
template_register >> ~/.zen/tmp/coucou/${MOATS}.myHOST.http
[[ $isLAN ]] \
&& template_register_localhost >> ~/.zen/tmp/coucou/${MOATS}.myHOST.http \
|| template_register >> ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~:12345~:${PORT}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~_SESSIONLNK_~${myIPFS}/ipns/${SESSIONNS}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http

View File

@ -50,7 +50,7 @@ CHOICE="$3"
[[ ${PLAYER} == "" ]] \
&& ${MY_PATH}/start.sh \
&& espeak "Astroport Empty. Enter your magic email" \
&& xdg-open "http://astroport.localhost:1234" \
&& xdg-open "https://qo-op.com" \
&& exit 1
PSEUDO=$(cat ~/.zen/game/players/${PLAYER}/.pseudo 2>/dev/null)

View File

@ -39,5 +39,12 @@ Describe 'Astroport'
The status should be success
The stderr should equal ""
End
It 'does localhost html register page'
When call template_register_localhost
The stdout should include "input name='salt' value=''"
The stdout should include "input name='pepper' value=''"
The status should be success
The stderr should equal ""
End
End
End

View File

@ -51,8 +51,8 @@ html {
<form id="formlink" action = "http://127.0.0.1:1234" method = "GET" enctype="application/x-www-form-urlencoded">
<br>
<b>Activez votre BunkedBOX</b></br></br>
<input type='hidden' name=salt value='0'></br>
<input type='hidden' name=pepper value='0'></br></br>
<input type='hidden' name='salt' value='0'></br>
<input type='hidden' name='pepper' value='0'></br></br>
<h1>ENREGISTREZ VOS VIDEOS FAVORITES DANS IPFS</h1><input type="hidden" name=g1pub value='https://www.youtube.com/playlist?list=LL'></br>
Email : <input name=email value=''></br></br>
<input type='submit' value='(☼‿‿☼)'>

View File

@ -1,5 +1,10 @@
#shellcheck shell=sh
template_register_localhost() {
template_register | sed -e "s~<input type='hidden' name='salt' value='0'>~<input name='salt' value=''>~g" \
-e "s~<input type='hidden' name='pepper' value='0'>~<input name='pepper' value=''>~g"
}
template_register() {
sed -e "s~http://127.0.0.1:1234~${myASTROPORT}~g" \
-e "s~http://127.0.0.1:8080~${myIPFS}~g" \
@ -8,3 +13,4 @@ template_register() {
-e "s~.000.~.$(printf '%03d' $(seq 0 17 |shuf -n 1)).~g" \
~/.zen/Astroport.ONE/templates/register.html
}