This commit is contained in:
fred 2023-03-04 20:20:44 +01:00
parent 716fc91737
commit cc88d690df
2 changed files with 6 additions and 7 deletions

View File

@ -77,7 +77,6 @@ mkdir -p ~/.zen/tmp/$MOATS
&& exit 1 && exit 1
echo "# UPGRADING WORLD WHISHKEY DATABASE" echo "# UPGRADING WORLD WHISHKEY DATABASE"
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
mkdir -p ~/.zen/game/world/$PEPPER/$WISHKEY/ mkdir -p ~/.zen/game/world/$PEPPER/$WISHKEY/
## A la fois Titre du tag et Pepper construction de clef ## A la fois Titre du tag et Pepper construction de clef
@ -95,7 +94,7 @@ mkdir -p ~/.zen/tmp/$MOATS
## SEC PASS PROTECTED QRCODE : base58 secFromDunikey.openssl(pass) ## SEC PASS PROTECTED QRCODE : base58 secFromDunikey.openssl(pass)
secFromDunikey=$(cat ~/.zen/tmp/qrtw.dunikey | grep "sec" | cut -d ' ' -f2) secFromDunikey=$(cat ~/.zen/tmp/qrtw.dunikey | grep "sec" | cut -d ' ' -f2)
echo "$secFromDunikey" > ~/.zen/tmp/${MOATS}/${PSEUDO}.sec echo "$secFromDunikey" > ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
openssl enc -aes-256-cbc -salt -in ~/.zen/tmp/${MOATS}/${PSEUDO}.sec -out "$HOME/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec" -k "$SALT" 2>/dev/null openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in ~/.zen/tmp/${MOATS}/${PSEUDO}.sec -out "$HOME/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec" -k "$SALT" 2>/dev/null
PASsec=$(cat ~/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec | base58) PASsec=$(cat ~/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec | base58)
HPass=$(echo "$SALT" | sha512sum) HPass=$(echo "$SALT" | sha512sum)
qrencode -s 12 -o $HOME/.zen/game/players/${PLAYER}/QRsec.png $PASsec qrencode -s 12 -o $HOME/.zen/game/players/${PLAYER}/QRsec.png $PASsec

View File

@ -200,11 +200,11 @@ DISCO="https://astroport.$(myHostName)/?salt=${USALT}&pepper=${UPEPPER}&logout=$
amzqr "$myASTROPORT/?qrcode=$G1PUB&sslpassdunikeysec=$PASsec&askpass=$HPass&tw=$ASTRONAUTENS" \ amzqr "$myASTROPORT/?qrcode=$G1PUB&sslpassdunikeysec=$PASsec&askpass=$HPass&tw=$ASTRONAUTENS" \
-d $HOME/.zen/game/players/${PLAYER} \ -d $HOME/.zen/game/players/${PLAYER} \
-l H \ -l H \
-p ${MY_PATH}/../images/plain.png -p ${MY_PATH}/../images/moa_net.png
rm -f ~/.zen/tmp/${MOATS}/${PSEUDO}.sec rm -f ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
ASTROQR=$(ipfs add -q $HOME/.zen/game/players/${PLAYER}/plain_qrcode.png | tail -n 1) ASTROQR=$(ipfs add -q $HOME/.zen/game/players/${PLAYER}/moa_net_qrcode.png | tail -n 1)
############################################################################ TW ############################################################################ TW
### INITALISATION WIKI dans leurs répertoires de publication IPFS ### INITALISATION WIKI dans leurs répertoires de publication IPFS
@ -411,9 +411,9 @@ ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current
# PASS CRYPTING KEY # PASS CRYPTING KEY
#~ echo; echo "Sécurisation de vos clefs... "; sleep 1 #~ echo; echo "Sécurisation de vos clefs... "; sleep 1
#~ openssl enc -aes-256-cbc -salt -in "$HOME/.zen/game/players/${PLAYER}/secret.june" -out "$HOME/.zen/game/players/${PLAYER}/enc.secret.june" -k $PASS 2>/dev/null openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in "$HOME/.zen/game/players/${PLAYER}/secret.june" -out "$HOME/.zen/game/players/${PLAYER}/enc.secret.june" -k $PASS 2>/dev/null
#~ openssl enc -aes-256-cbc -salt -in "$HOME/.zen/game/players/${PLAYER}/secret.dunikey" -out "$HOME/.zen/game/players/${PLAYER}/enc.secret.dunikey" -k $PASS 2>/dev/null #~ openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in "$HOME/.zen/game/players/${PLAYER}/secret.dunikey" -out "$HOME/.zen/game/players/${PLAYER}/enc.secret.dunikey" -k $PASS 2>/dev/null
#~ openssl enc -aes-256-cbc -salt -in "$HOME/.zen/game/players/${PLAYER}/$KEYFILE -out" "$HOME/.zen/game/players/${PLAYER}/enc.$KEYFILE" -k $PASS 2>/dev/null #~ openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in "$HOME/.zen/game/players/${PLAYER}/$KEYFILE -out" "$HOME/.zen/game/players/${PLAYER}/enc.$KEYFILE" -k $PASS 2>/dev/null
## TODO MORE SECURE ?! USE opengpg, natools, etc ... ## TODO MORE SECURE ?! USE opengpg, natools, etc ...
# ${MY_PATH}/natools.py encrypt -p $G1PUB -i ~/.zen/game/players/${PLAYER}/secret.dunikey -o "$HOME/.zen/game/players/${PLAYER}/enc.secret.dunikey" # ${MY_PATH}/natools.py encrypt -p $G1PUB -i ~/.zen/game/players/${PLAYER}/secret.dunikey -o "$HOME/.zen/game/players/${PLAYER}/enc.secret.dunikey"
echo echo