From 41bb53223249190ae53355c124978c425c11c12d Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 17 Nov 2022 18:37:11 +0100 Subject: [PATCH] SALT & APPNAME needed --- 12345.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/12345.sh b/12345.sh index 694a28a2..98ea2eef 100755 --- a/12345.sh +++ b/12345.sh @@ -150,12 +150,13 @@ sed -i "s~.000.~.$(printf '%03d' $(echo ${RANDOM} % 18 | bc)).~g" ~/.zen/tmp/cou ################### KEY GEN ################################### echo ">>>>>>>>>>>>>> Application LaBureautique >><< APPNAME = $APPNAME <<<<<<<<<<<<<<<<<<<<" - SALT=$(urldecode ${arr[1]} | xargs); + SALT=$(urldecode ${arr[1]} | xargs) [[ ! $SALT ]] && (echo "$HTTPCORS ERROR - SALT MISSING" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && continue PEPPER=$(urldecode ${arr[3]} | xargs) [[ ! $PEPPER ]] && (echo "$HTTPCORS ERROR - PEPPER MISSING" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && continue - APPNAME=$(urldecode ${arr[4]} | xargs) + [[ ! $APPNAME ]] && (echo "$HTTPCORS ERROR - APPNAME MISSING" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && continue + WHAT=$(urldecode ${arr[5]} | xargs) ## SAVE "salt" "pepper" DEBUG REMOVE OR PASS ENCRYPT FOR SECURITY REASON @@ -199,7 +200,7 @@ sed -i "s~.000.~.$(printf '%03d' $(echo ${RANDOM} % 18 | bc)).~g" ~/.zen/tmp/cou ## APPNAME SLECTION ######################## # MESSAGING - if [[ $APPNAME == "messaging" ]]; then + if [[ $APPNAME == "messaging" || $APPNAME == "email" ]]; then ( ## SUB PROCESS echo "Extracting ${G1PUB} messages..." ~/.zen/Astroport.ONE/tools/timeout.sh -t 12 \ @@ -444,6 +445,8 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh else echo "NO TW FOUND - LAUNCHING CENTRAL" ## 302 REDIRECT CENTRAL GW + TUBE=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 3) + cat ~/.zen/Astroport.ONE/templates/index.302 >> ~/.zen/tmp/coucou/${MOATS}.index.redirect sed -i "s~_TWLINK_~$LIBRA/ipns/${ASTRONAUTENS}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect (cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(0‿‿0) Execution time was "`expr $(date +%s) - $start` seconds. && continue