forked from STI/Astroport.ONE
WAHT THE FUC
This commit is contained in:
parent
fdd1509b99
commit
c05683eaaa
7
12345.sh
7
12345.sh
|
@ -467,7 +467,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
|||
|
||||
SALT=$(urldecode ${arr[1]} | xargs)
|
||||
PEPPER=$(urldecode ${arr[3]} | xargs)
|
||||
${WHAT}=$(urldecode ${arr[7]} | xargs)
|
||||
WHAT=$(urldecode ${arr[7]} | xargs)
|
||||
PSEUDO=$(urldecode ${arr[9]} | xargs)
|
||||
|
||||
[[ ! ${WHAT} ]] && (echo "$HTTPCORS ERROR - MISSING ${WHAT} FOR ${WHAT} CONTACT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && continue
|
||||
|
@ -487,8 +487,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
|||
# PASS CRYPTING KEY
|
||||
PASS=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-7)
|
||||
|
||||
echo "$SALT"
|
||||
echo "$PEPPER"
|
||||
echo "$SALT / $PEPPER ($PASS)"
|
||||
|
||||
if [[ ! -d ~/.zen/game/players/${WHAT} ]]; then
|
||||
# ASTRONAUT NEW VISA Create VISA.new.sh in background
|
||||
|
@ -540,7 +539,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
|||
## Astroport.ONE local use QRCODE Contains ${WHAT} G1PUB
|
||||
QRCODE=$(echo $URL | cut -d ' ' -f2 | cut -d '=' -f 2 | cut -d '&' -f 1) && echo "QRCODE : $QRCODE"
|
||||
g1pubpath=$(grep $QRCODE ~/.zen/game/players/*/.g1pub | cut -d ':' -f 1 2>/dev/null)
|
||||
${WHAT}=$(echo "$g1pubpath" | rev | cut -d '/' -f 2 | rev 2>/dev/null)
|
||||
WHAT=$(echo "$g1pubpath" | rev | cut -d '/' -f 2 | rev 2>/dev/null)
|
||||
|
||||
## FORCE LOCAL USE ONLY. Remove to open 1234 API
|
||||
[[ ! -d ~/.zen/game/players/${WHAT} || ${WHAT} == "" ]] && (echo "$HTTPCORS ERROR - QRCODE - NO ${WHAT} ON BOARD !!" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && continue
|
||||
|
|
|
@ -36,10 +36,15 @@ if [[ ! -d ~/.zen/game/players/${PLAYER}/FRIENDS/ ]]; then
|
|||
## GET GCHANGE
|
||||
$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}"
|
||||
DESCR=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.description')
|
||||
[[ ! $DESCR ]] && DESCR="Astronaute explorateur Ŋ1"
|
||||
VILLE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.city')
|
||||
ADRESSE,=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.address')
|
||||
POSITION=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.geoPoint')
|
||||
[[ ! $VILLE ]] && VILLE="Paris, 75012"
|
||||
ADRESSE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.address')
|
||||
[[ ! $ADRESSE ]] && 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')
|
||||
|
||||
########################################################################
|
||||
|
|
|
@ -172,7 +172,7 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
|||
echo "***** Gestion du Canal TW Astronaute $PLAYER *****"
|
||||
mkdir -p ~/.zen/game/players/$PLAYER/ipfs/moa/
|
||||
|
||||
[[ -f ~/.zen/tmp/TW.html ]] && cp ~/.zen/tmp/TW.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \
|
||||
[[ -f ~/.zen/tmp/TW.html ]] && cp ~/.zen/tmp/TW.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html && echo "Restoring TW...." \
|
||||
|| cp ~/.zen/Astroport.ONE/templates/twdefault.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||
|
||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||
|
@ -203,18 +203,18 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
|||
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or 127.0.1.1)
|
||||
|
||||
#
|
||||
# CRYPTO ENCODING myIP -> CRYPTIP
|
||||
echo "# CRYPTO ENCODING myIP -> CRYPTIP"
|
||||
echo $myIP > ~/.zen/tmp/myIP
|
||||
$MY_PATH/natools.py encrypt -p $G1PUB -i ~/.zen/tmp/myIP -o ~/.zen/tmp/myIP.$G1PUB.enc
|
||||
$MY_PATH/natools.py encrypt -p $G1PUB -i $HOME/.zen/tmp/myIP -o $HOME/.zen/tmp/myIP.$G1PUB.enc
|
||||
CRYPTIP=$(cat ~/.zen/tmp/myIP.$G1PUB.enc | base64)
|
||||
sed -i "s~_SECRET_~$CRYPTIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||
#
|
||||
# CRYPTO DECODING CRYPTIP -> myIP
|
||||
echo "# CRYPTO DECODING CRYPTIP -> myIP"
|
||||
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp --render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
|
||||
CRYPTIP=$(cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret)
|
||||
echo "$CRYPTIP" | base64 -d > ~/.zen/tmp/myIP.$G1PUB.enc.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 ~/.zen/game/players/$PLAYER/secret.dunikey -i ~/.zen/tmp/myIP.$G1PUB.enc.2 -o ~/.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" \
|
||||
|
|
Loading…
Reference in New Issue