From 4f0d1bd85dda1b394ed6ebb23019518d91b8dd4a Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 16 Nov 2022 18:53:07 +0100 Subject: [PATCH] WHo is President.? --- tools/Connect_PLAYER_To_Gchange.sh | 15 +++++++++------ tools/VISA.new.sh | 3 ++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh index cd4230b6..6fcea696 100755 --- a/tools/Connect_PLAYER_To_Gchange.sh +++ b/tools/Connect_PLAYER_To_Gchange.sh @@ -33,16 +33,20 @@ mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/ ## Directory is created, So this script already run once. if [[ ! -d ~/.zen/game/players/${PLAYER}/FRIENDS/ ]]; then - ## GET GCHANGE + ## GET GCHANGE PROFIL $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 + NAME=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.title') - [[ ! $NAME ]] && NAME="${PSEUDO}" + [[ ! $NAME || $NAME == "null" ]] && NAME="Astronaute ${PSEUDO}" + DESCR=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.description') - [[ ! $DESCR ]] && DESCR="Astronaute explorateur Ŋ1" + [[ ! $DESCR || $DESCR == "null" ]] && DESCR="Astronaute explorateur Ŋ1" + VILLE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.city') - [[ ! $VILLE ]] && VILLE="Paris, 75012" + [[ ! $VILLE || $VILLE == "null" ]] && VILLE="Paris, 75012" + ADRESSE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.address') - [[ ! $ADRESSE ]] && ADRESSE="Elysée" + [[ ! $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') @@ -53,7 +57,6 @@ if [[ ! -d ~/.zen/game/players/${PLAYER}/FRIENDS/ ]]; then echo $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" -s "http://tube.copylaradio.com:8080/ipns/$ASTRONAUTENS" #GCHANGE+ [[ ! $? == 0 ]] && echo "GCHANGE PROFILE CREATION FAILED" - ## GET CESIUM $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.presles.fr" get > ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ######################################################################## diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index 3d4bbc8f..5e420005 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -214,7 +214,8 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) CRYPTIP2=$(cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret) echo "$CRYPTIP2" | base64 -d > ~/.zen/tmp/myIP.$G1PUB.enc.2 rm -f ~/.zen/tmp/myIP.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 + echo "$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" + $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 "$myIP _SECRET_ CRYPTIP SECURED" \