MadeInZion.json

This commit is contained in:
fred 2022-11-21 21:39:18 +01:00
parent e533fb40bc
commit 3fd2a5d51b
2 changed files with 4 additions and 5 deletions

View File

@ -420,8 +420,8 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
if [[ -s ~/.zen/tmp/coucou/${MOATS}.astroindex.html ]]; then
echo "GOT TW CACHE !!"
tiddlywiki --load ~/.zen/tmp/coucou/${MOATS}.astroindex.html --output ~/.zen/tmp --render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
[[ ! -s ~/.zen/tmp/MadeInZion.json ]] && (echo "$HTTPCORS SECRET ERROR - SORRY - CANNOT CONTINUE " | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "BAD SECRET (☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && continue
SECRET=$(cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret)
[[ ! $SECRET ]] && (echo "$HTTPCORS SECRET ERROR - SORRY - CANNOT CONTINUE " | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "BAD SECRET (☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && continue
#
# CRYPTO DECODING CRYPTIP -> myIP
cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret | base16 -d > ~/.zen/tmp/myIP.$G1PUB.enc.2

View File

@ -82,9 +82,8 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
#############################################################
## CHECK IF myIP IS ACTUAL OFFICIAL GATEWAY
tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html --output ~/.zen/tmp --render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
SECRET=$(cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret)
[[ ! $SECRET ]] && echo "$HTTPCORS SECRET ERROR - CONTINUE " && continue
#
[[ ! -s ~/.zen/tmp/MadeInZion.json ]] && echo "MadeInZion ERROR - DROPPING " && continue
# CRYPTO DECODING CRYPTIP -> myIP
cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret | base16 -d > ~/.zen/tmp/myIP.$G1PUB.enc.2
$MY_PATH/../tools/natools.py decrypt -f pubsec -k ~/.zen/game/players/$PLAYER/secret.dunikey -i ~/.zen/tmp/myIP.$G1PUB.enc.2 -o ~/.zen/tmp/myIP.$G1PUB > /dev/null 2>&1
@ -92,7 +91,7 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
[[ ! $GWIP ]] && GWIP=$myIP ## CLEAR
echo "TW is on $GWIP"
echo "THIS TW is on $GWIP"
# WHO IS OFFICIAL TW GATEWAY.
if [[ ! -s ~/.zen/game/players/$PLAYER/ipfs/G1SSB/_g1.pubkey ]]; then