From 8b59816876b419cd8f015578ce9a771de3cd9d0c Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 27 Dec 2022 15:12:32 +0100 Subject: [PATCH] iframe one --- 12345.sh | 43 ++++++++++++++++++++++++++++++------------- www/iframe.html | 2 +- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/12345.sh b/12345.sh index a9b27d3f..80294b8a 100755 --- a/12345.sh +++ b/12345.sh @@ -223,19 +223,6 @@ while true; do ## APPNAME SELECTION ######################## ######################################## -############################################## -# PAY -############################################## - if [[ $APPNAME == "pay" ]]; then - echo "$APPNAME : $WHAT $OBJ $VAL" - echo "${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key -a ${WHAT} -p ${VAL} -c 'Bro'" - echo "$HTTPCORS $(${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key -a ${WHAT} -p ${VAL} -c 'Bro')" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & - end=`date +%s` - echo "(G_G ) PAYING Execution time was "`expr $end - $start` seconds. - continue - fi - - ############################################## # MESSAGING ############################################## @@ -521,8 +508,38 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh fi ## END IF SALT +############################################## +# /?player=PLAYER&APPNAME=WHAT&OBJ=VAL +############################################## + if [[ ${arr[0]} == "player" ]]; then + PLAYER=$(urldecode ${arr[1]} | xargs) + APPNAME=$(urldecode ${arr[2]} | xargs) + WHAT=$(urldecode ${arr[3]} | xargs) + OBJ=$(urldecode ${arr[4]} | xargs) + VAL=$(urldecode ${arr[5]} | xargs) + + echo "- $PLAYER - $APPNAME : $WHAT $OBJ $VAL" + + ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1) + [[ ! $ASTRONAUTENS ]] && (echo "$HTTPCORS UNKNOWN PLAYER $PLAYER - EXIT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && continue + +############################################## +# PAY : /?player=PLAYER&pay=1&dest=G1PUB +############################################## + if [[ $APPNAME == "pay" ]]; then + echo "${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro'" + echo "$HTTPCORS $(${MY_PATH}/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro')" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & + end=`date +%s` + echo "(G_G ) PAYING Execution time was "`expr $end - $start` seconds. + continue + fi + +fi +############################################## +# /?player=PLAYER&APPNAME=WHAT&OBJ=VAL +############################################## ################################################################################################### ################################################################################################### diff --git a/www/iframe.html b/www/iframe.html index a4db66d7..fee0d290 100644 --- a/www/iframe.html +++ b/www/iframe.html @@ -127,7 +127,7 @@ h1, p {

Astroport.ONE

- ME : _IFRIENDHEAD_ + MOA : _IFRIENDHEAD_