From f4cccc2343cb30fadd0436b534a05ed91fd5207e Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 26 Mar 2023 00:24:25 +0100 Subject: [PATCH] =?UTF-8?q?DISCO=20PGP=20QRCODE=20to=20MAKE=20Contact=20Fr?= =?UTF-8?q?ee=20=C4=9E1=20PAYMENTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API/QRCODE.sh | 16 +++++++- ASTROBOT/VOEUX.refresh.sh | 2 +- command.sh | 4 +- templates/twdefault.html | 2 +- tools/VISA.new.sh | 7 ++-- www/AESBox/index.htm | 78 +++++++++++++++++++++++++++++++++++++-- www/G1PalPay/index.html | 19 +++++++++- 7 files changed, 114 insertions(+), 14 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index e0e399a2..4d0d6f34 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -60,6 +60,20 @@ if [[ ${QRCODE} == "station" ]]; then exit 0 fi +################################################################################ +## MODE PGP ENCRYPTED QRCODE +################################################################################ +if [[ ${QRCODE:0:5} == "-----" ]]; then + echo "## THIS IS A PGP ENCRYPTED QRCODE ASK FOR PASSWORD" + echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}/index.redirect + sed "s~encrypted pgp data here~${QRCODE}~g" $MY_PATH/../www/AESBox/index.htm >> ~/.zen/tmp/${MOATS}/index.redirect + ( + cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 + echo "BLURP $PORT" && rm -Rf ~/.zen/tmp/${MOATS} + ) & + exit 0 +fi + ################################################################################ ## MODE G1VOEU : RETURN WISHNS - image carousel links - ################################################################################ @@ -85,7 +99,7 @@ fi ################################################################################ ## QRCODE can be ASTRONAUTENS or G1PUB format ################################################################################ -## ACCOUNT IPNS FORMAT : CHANGE .current +## QRCODE IS IPNS FORMAT : CHANGE .current AND MAKE G1BILLETS ASTROPATH=$(grep $QRCODE ~/.zen/game/players/*/.playerns | cut -d ':' -f 1 | rev | cut -d '/' -f 2- | rev 2>/dev/null) if [[ $ASTROPATH != "" && $APPNAME == "" ]]; then diff --git a/ASTROBOT/VOEUX.refresh.sh b/ASTROBOT/VOEUX.refresh.sh index 46b26412..7d5314b8 100755 --- a/ASTROBOT/VOEUX.refresh.sh +++ b/ASTROBOT/VOEUX.refresh.sh @@ -67,7 +67,7 @@ do else VCOINS=$($MY_PATH/../tools/COINScheck.sh $VOEUKEY | tail -n 1) [[ $VCOINS == "" || $VCOINS == "null" ]] \ - && echo "ERROR G1WALLET" \ + && echo "ERROR G1WALLET NOT EXISTING" && continue \ || echo "WISH G1WALLET = $VCOINS G1" fi diff --git a/command.sh b/command.sh index 5b4645a8..dc20c33d 100755 --- a/command.sh +++ b/command.sh @@ -46,9 +46,9 @@ echo 'PRESS ENTER... '; read exit ;; "IMPORT PLAYER") - echo "'Identifiant'" + echo "'Secret 1'" read SALT - echo "'Mot de passe'" + echo "'Secret 2'" read PEPPER echo "'Adresse Email'" read EMAIL diff --git a/templates/twdefault.html b/templates/twdefault.html index 93fbb66e..37d77b4d 100644 --- a/templates/twdefault.html +++ b/templates/twdefault.html @@ -575,7 +575,7 @@ Error message and password prompt {"created":"20220424042238781","title":"$:/UserPanelTitle","modified":"20220504003019519","type":"text/vnd.tiddlywiki","text":"Astroport.ONE","revision":"0","bag":"default"}, {"title":"$:/view","created":"20220403091112476","modified":"20220428183149011","type":"text/vnd.tiddlywiki","text":"multi-column","revision":"0","bag":"default"}, {"created":"20221028140644690","text":"Il s'agit du code situé dans le répertoire ASTROBOT de la distribution Astroport.ONE que vous utilisez.\n\nCelui-ci contient les script de traitement de réplication Ŋ1 de vos G1Voeux.\n\nhttps://git.p2p.legal/qo-op/Astroport.ONE/src/branch/master/ASTROBOT\n","title":"AstroBot","modified":"20221028150232387","tags":"$:/isAttachment $:/isEmbedded"}, -{"created":"20230227185225098","creator":"_PSEUDO_","text":"","title":"AstroID","type":"image/png","modified":"20230302231933802","modifier":"_PSEUDO_","tags":"$:/isAttachment _PLAYER_ $:/isIpfs G1AstroID","_canonical_uri":"/ipfs/bafybeifbebc3ewnzrzbm44arddedbralegnxklhua5d5ymzaqtf2kaub7i"}, +{"created":"20230227185225098","creator":"_PSEUDO_","text":"","title":"AstroID","type":"image/png","modified":"20230325214405391","modifier":"_PSEUDO_","tags":"$:/isAttachment _PLAYER_ $:/isIpfs G1AstroID","_canonical_uri":"/ipfs/bafybeifbebc3ewnzrzbm44arddedbralegnxklhua5d5ymzaqtf2kaub7i","PASS":"_PASS_"}, {"created":"20210804081616558","creator":"_PSEUDO_","text":"!! Participez au développement d'un meilleur Internet !\n\n!! Applications collaboratives pour collectifs en réseau\n\nDans le réseau p2p propulsé par [[Astroport|https://astroport.com]], vous échangez des biens, des services, selon la confiance exprimée par un échange d'étoiles sur [[GChange|https://gchange.fr]].\n\nTissez vos toiles Ŋ1 dans un réseau humain de confiance qui utilise [[Ğ1 (la \"June\")|https://monnaie-libre.fr/]] \n\nA 20H12 ''le protocole de réplication Ŋ1'' active les échanges en fonction des toiles de confiances établies : étoiles Gchange, Transactions G1, etc\n\n!! Comment aider ?\n\nPropagez l'expérience du monde numérique Libre. Révélez. Tissez vos toiles de confiance Ŋ1.\nReliez vos clefs aux nôtres, faites vos voeux. Nos voeux les plus chers, révèlent et gratifient les talents et les ressources près de chez vous.\n\nHébergez votre [[♥BOX|https://opencollective.com/monnaie-libre/projects/coeurbox]]\n\ninstallez IPFS\n\u003C\u003C\u003C\n\n* Installez '[[IPFS kubo|https://docs.ipfs.tech/install/command-line/#official-distributions]]' sur votre ordinateur\n* Ajoutez [[ipfs-companion|https://docs.ipfs.tech/install/ipfs-companion/]] à votre navigateur (ou utilisez \"[[Brave|https://brave.com/fr/]]\")\n\n''Agissez collectif ''\n\n* [[Devenez généreux donateur|https://opencollective.com/monnaie-libre]] aidez à notre développement.\n* [[Rejoignez notre Constellation de ♥BOX|https://opencollective.com/monnaie-libre/projects/coeurbox]] et faite grossir les \"To Utiles\" de notre disque et hébergement collectif.\n* Activez votre Station. Installez [[Astroport.ONE|https://git.p2p.legal/qo-op/Astroport.ONE]] sur votre ordinateur, hébergez vos amis en laissant votre machine allumée.\n\n\n* [[Améliorer, diversifier les modèles de TiddlyWiki|https://tiddlywiki.com/languages/fr-FR/index.html]]\n* [[Enrichissez notre application avec des plugins TW|https://tw-cpl.netlify.app/#Index:Index]] \n\n\u003C\u003C\u003C\n\nTW MODEL REBASE : {{{ [[https://ipfs.copylaradio.com/ipfs/]addsuffix{!!twmodel}] }}}\n\n''{{Astroport!!pseudo}}'' (Astronaute : ''{{MadeInZion!!player}}'')\n\n> NE SUPPRIMEZ PAS CE \"TIDDLER\"\n","title":"Astroport","modified":"20230302203956490","tags":"","g1pub":"_G1PUB_","qrsec":"_QRSEC_","astroport":"_ASTROPORT_","birthdate":"_BIRTHDATE_","pseudo":"_PSEUDO_","modifier":"_PSEUDO_","chain":"_CHAIN_","moats":"_MOATS_","twmodel":"_TWMODEL_"}, {"created":"20230302231451591","creator":"_PSEUDO_","text":"\u003Ciframe src=\"https://carte.monnaie-libre.fr\" height=\"480\" width=\"100%\">\u003C/iframe>","tags":"_PLAYER_ G1App poka@p2p.legal","title":"Carte de la Monnaie Libre : Ğ1","modified":"20230302232007403","type":"text/vnd.tiddlywiki","modifier":"_PSEUDO_"}, {"created":"20230325190916105","creator":"_PSEUDO_","text":"","tags":"_PLAYER_ voeu","title":"CopierYoutube","modified":"20230325191253057","modifier":"_PSEUDO_"}, diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index 90804665..02fb5298 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -94,7 +94,7 @@ fi ################################################################################ -TWMODEL="/ipfs/bafybeihoaournzr4v5jzswbeefa223su5l2g347j4grr3y4mou3qho55ee" +TWMODEL="/ipfs/bafybeifd6ktudt4fvalr7jjbyt2ezv3jgaoqe6ik6wey4auty3tgo3q2za" TWLINK="/ipfs/bafybeigyfttjvabeeoa4hbsvtegsqkw3riuquhbil55qhwe3s3q4tesyxi" # ipfs cat $TWMODEL > templates/twdefault.html ##################################################### # NEW PLAYER ############### @@ -170,11 +170,10 @@ WID="https://ipfs.$(myHostName)/api" # WID="http://ipfs.$(myHostName):5001" USALT=$(echo "$SALT" | jq -Rr @uri) UPEPPER=$(echo "$PEPPER" | jq -Rr @uri) -DISCO="https://astroport.$(myHostName)/?salt=${USALT}&pepper=${UPEPPER}" +DISCO="/?salt=${USALT}&pepper=${UPEPPER}" [[ $isLAN ]] && NID="http://ipfs.localhost:8080" \ - && WID="http://ipfs.localhost:5001" \ - && DISCO="http://astroport.localhost:1234/?salt=${USALT}&pepper=${UPEPPER}" + && WID="http://ipfs.localhost:5001" #### diff --git a/www/AESBox/index.htm b/www/AESBox/index.htm index e915bbc4..a79e7e6b 100644 --- a/www/AESBox/index.htm +++ b/www/AESBox/index.htm @@ -1,6 +1,11 @@ + - - + + + + + + -
+ +
+ +
+ + + -
+ diff --git a/www/G1PalPay/index.html b/www/G1PalPay/index.html index 13d07126..1bfe0cf9 100644 --- a/www/G1PalPay/index.html +++ b/www/G1PalPay/index.html @@ -6,6 +6,8 @@ ♥Box Station - Astroport Ŋ1 - + + @@ -155,7 +157,22 @@ a { scanner.addListener('scan', function (content) { alert(content); - var myU = 'http://astroport.localhost:1234/?qrcode=' + content; + if (content.startsWith('-----')) { + // Try to decrypt PGP + var pass = prompt("Saisir votre PASS:"); + const decrypted = openpgp.decrypt({ + message: openpgp.message.readArmored(content), + passwords: [pass] + }); + //print the decrypted url + console.log(decrypted.data); + var amount = prompt("Saisir MONTANT Ğ1:"); + var myU = 'http://astroport.localhost:1234' + decrypted.data +'&pay=' + amount + '&g1pub=' + document.getElementById("countdown").innerHTML.value ; + } else { + var myU = 'http://astroport.localhost:1234/?qrcode=' + content; + document.getElementById("countdown").innerHTML = content; + } + fetchAstroport(myU) // homeAstroportStation(myU, 'aframe', 15123) });