From 0ca11ef03bcb85684d8eb14256f482b5be364c15 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 7 Oct 2022 02:50:28 +0200 Subject: [PATCH] WAITING 12345 WITH SELF REDIRECT --- 12345.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/12345.sh b/12345.sh index f7810301..82bb5c7f 100755 --- a/12345.sh +++ b/12345.sh @@ -40,16 +40,16 @@ while true; do arr=(${URL//[=&]/ }) echo "PARAM : ${arr[0]} = ${arr[1]} & ${arr[2]} = ${arr[3]} & ${arr[4]} = ${arr[5]}" + if [[ ${arr[0]} == "email" ]]; then + start=`date +%s` + ####################################### -### WAITING WITH SELF REDIRECT +### WAITING 12345 WITH SELF REDIRECT rm ~/.zen/tmp/index.redirect ################################################################################################### while [[ ! -f ~/.zen/tmp/index.redirect && ! $(ps auxf --sort=+utime | grep -w 'nc -l -p 12345' | grep -v -E 'color=auto|grep') ]]; do cat $HOME/.zen/tmp/myIP.http | nc -l -p 12345 -q 1; done & ################################################################################################### - if [[ ${arr[0]} == "email" ]]; then - start=`date +%s` - EMAIL=$(urldecode ${arr[1]}) SALT=$(urldecode ${arr[3]}) PEPPER=$(urldecode ${arr[5]}) @@ -222,6 +222,16 @@ while [[ ! -f ~/.zen/tmp/index.redirect && ! $(ps auxf --sort=+utime | grep -w ' cp ~/.zen/game/players/$PLAYER/ipfs/moa/index.html ~/.zen/tmp/TW/index.html + ################################################################################################### + echo "## PUBLISHING ${PLAYER} /ipns/$GNS " + IPUSH=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ipfs/moa/index.html | tail -n 1) + echo $IPUSH > ~/.zen/game/players/$PLAYER/ipfs/moa/.chain # Contains last IPFS backup PLAYER KEY + echo "/ipfs/$IPUSH" + echo $MOATS > ~/.zen/game/players/$PLAYER/ipfs/moa/.moats + ipfs name publish --key=${PLAYER} /ipfs/$IPUSH 2>/dev/null + + + ################################################################################################### else @@ -243,16 +253,7 @@ while [[ ! -f ~/.zen/tmp/index.redirect && ! $(ps auxf --sort=+utime | grep -w ' fi - - ################################################################################################### - echo "## PUBLISHING ${PLAYER} /ipns/$GNS " - IPUSH=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ipfs/moa/index.html | tail -n 1) - echo $IPUSH > ~/.zen/game/players/$PLAYER/ipfs/moa/.chain # Contains last IPFS backup PLAYER KEY - echo "/ipfs/$IPUSH" - echo $MOATS > ~/.zen/game/players/$PLAYER/ipfs/moa/.moats - ipfs name publish --key=${PLAYER} /ipfs/$IPUSH 2>/dev/null - - ################################################################################################### + ################################################################################################### # EXTRACTION MOA rm -f ~/.zen/tmp/tiddlers.json tiddlywiki --load ~/.zen/tmp/TW/index.html --output ~/.zen/tmp --render '.' 'tiddlers.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[moa]]'