From 8088394bd5f60e3fecef256846177478678dcd36 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 9 Dec 2022 01:39:47 +0100 Subject: [PATCH] VISA --- 12345.sh | 3 ++- tools/Connect_PLAYER_To_Gchange.sh | 10 +++++----- tools/VISA.new.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/12345.sh b/12345.sh index 57798bbb..25c34f14 100755 --- a/12345.sh +++ b/12345.sh @@ -480,7 +480,8 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh echo "# ASTRONAUT NEW VISA Create VISA.new.sh in background (~/.zen/tmp/email.${EMAIL}.${MOATS}.txt)" ( startvisa=`date +%s` - $MY_PATH/tools/VISA.new.sh "$SALT" "$PEPPER" "${EMAIL}" "$PSEUDO" "${WHAT}" > ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt + echo "VISA.new : \"$SALT\" \"$PEPPER\" \"${EMAIL}\" \"$PSEUDO\" \"${WHAT}\"" > ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt + $MY_PATH/tools/VISA.new.sh "$SALT" "$PEPPER" "${EMAIL}" "$PSEUDO" "${WHAT}" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt $MY_PATH/tools/mailjet.sh "${EMAIL}" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL end=`date +%s` diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh index a6825e42..01cdc5c1 100755 --- a/tools/Connect_PLAYER_To_Gchange.sh +++ b/tools/Connect_PLAYER_To_Gchange.sh @@ -37,20 +37,20 @@ if [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ]]; then $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" get > ~/.zen/game/players/${PLAYER}/ipfs/gchange.json ## KEEPING ALREADY EXISTING PROFILE DATA - NAME=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.title') + NAME=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.title' 2>/dev/null) [[ ! $NAME || $NAME == "null" ]] && NAME="Astronaute ${PSEUDO}" - DESCR=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.description') + DESCR=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.description' 2>/dev/null) [[ ! $DESCR || $DESCR == "null" ]] && DESCR="ASTROPORT Ŋ1 https://g1jeu.ml" - VILLE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.city') + VILLE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.city' 2>/dev/null) [[ ! $VILLE || $VILLE == "null" ]] && VILLE="Paris, 75012" - ADRESSE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.address') + ADRESSE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.address' 2>/dev/null) [[ ! $ADRESSE || $ADRESSE == "null" ]] && ADRESSE="Elysée" # POSITION=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.geoPoint') - SITE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.socials') + # SITE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.socials' 2>/dev/null) ######################################################################## echo "${PLAYER} GCHANGE+ PROFILE https://gchange.fr" diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index 7caa2dfc..079f7133 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -231,7 +231,7 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) $MY_PATH/natools.py decrypt -f pubsec -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -i $HOME/.zen/tmp/myIP.$G1PUB.enc.2 -o $HOME/.zen/tmp/myIP.2 # ## CRYPTO PROCESS VALIDATED - [[ -s ~/.zen/tmp/myIP.2 ]] && echo "NATOOLS ENCODED secret LAODED" \ + [[ -s ~/.zen/tmp/myIP.2 ]] && echo "NATOOLS ENCODED secret LOADED" \ || sed -i "s~$ENCODING~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # Revert to plaintext _SECRET_ myIP rm -f ~/.zen/tmp/myIP.2