- COCODING : Astroport.ONE - BunkedBOX edition -
+ COCODING TWITCH TW
+ Astroport.ONE - ♥BOX Edition - Olympe.Network
Recopiez les vidéos que vous aimez dans les capsules multimédia de votre TW!
Une fois votre G1Visa obtenu, direction https://gchange.fr !
diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh
index 827c3988..45cc61ec 100755
--- a/tools/VISA.new.sh
+++ b/tools/VISA.new.sh
@@ -192,6 +192,9 @@ NID="${myIPFSGW}" && WID="$NID/api"
cp ~/.zen/game/players/$PLAYER/QR.png ~/.zen/game/players/$PLAYER/ipfs/QR.png
echo "$G1PUB" > ~/.zen/game/players/$PLAYER/ipfs/G1SSB/_g1.pubkey # G1SSB NOTATION (astrXbian compatible)
+ qrencode -s 12 -o ~/.zen/game/players/$PLAYER/QR.ASTRONAUTENS.png "https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"
+
+
## SEC PASS PROTECTED QRCODE
secFromDunikey=$(cat ~/.zen/game/players/$PLAYER/secret.dunikey | grep "sec" | cut -d ' ' -f2)
echo "$secFromDunikey" > ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
@@ -282,14 +285,20 @@ NID="${myIPFSGW}" && WID="$NID/api"
## ID CARD & QRCODE
convert ~/.zen/game/players/$PLAYER/QR.png -resize 300 ~/.zen/tmp/${MOATS}/QR.png
- convert ${MY_PATH}/../images/astroport.jpg -resize 300 ~/.zen/tmp/${MOATS}/ASTROPORT.png
+ convert ~/.zen/game/players/$PLAYER/QR.ASTRONAUTENS.png -resize 240 ~/.zen/tmp/${MOATS}/TW.png
+ convert ${MY_PATH}/../images/astroport.jpg -resize 240 ~/.zen/tmp/${MOATS}/ASTROPORT.png
+
composite -compose Over -gravity SouthWest -geometry +280+20 ~/.zen/tmp/${MOATS}/ASTROPORT.png ${MY_PATH}/../images/Brother_600x400.png ~/.zen/tmp/${MOATS}/astroport.png
- composite -compose Over -gravity NorthWest -geometry +0+0 ~/.zen/tmp/${MOATS}/QR.png ~/.zen/tmp/${MOATS}/astroport.png ~/.zen/tmp/${MOATS}/one.png
+ composite -compose Over -gravity East -geometry +0+0 ~/.zen/tmp/${MOATS}/TW.png ~/.zen/tmp/${MOATS}/astroport.png ~/.zen/tmp/${MOATS}/astroport2.png
+ composite -compose Over -gravity NorthWest -geometry +0+0 ~/.zen/tmp/${MOATS}/QR.png ~/.zen/tmp/${MOATS}/astroport2.png ~/.zen/tmp/${MOATS}/one.png
# composite -compose Over -gravity NorthWest -geometry +280+280 ~/.zen/game/players/.current/QRsec.png ~/.zen/tmp/${MOATS}/one.png ~/.zen/tmp/${MOATS}/image.png
convert -gravity northwest -pointsize 35 -fill black -draw "text 50,300 \"$PSEUDO\"" ~/.zen/tmp/${MOATS}/one.png ~/.zen/tmp/${MOATS}/image.png
convert -gravity northwest -pointsize 25 -fill black -draw "text 300,40 \"$PLAYER\"" ~/.zen/tmp/${MOATS}/image.png ~/.zen/tmp/${MOATS}/pseudo.png
+
+
+
convert -gravity northeast -pointsize 25 -fill black -draw "text 20,180 \"$PASS\"" ~/.zen/tmp/${MOATS}/pseudo.png ~/.zen/tmp/${MOATS}/pass.png
convert -gravity northwest -pointsize 25 -fill black -draw "text 300,100 \"$SALT\"" ~/.zen/tmp/${MOATS}/pass.png ~/.zen/tmp/${MOATS}/salt.png
convert -gravity northwest -pointsize 25 -fill black -draw "text 300,140 \"$PEPPER\"" ~/.zen/tmp/${MOATS}/salt.png ~/.zen/game/players/$PLAYER/ID.png
@@ -326,8 +335,6 @@ NID="${myIPFSGW}" && WID="$NID/api"
echo "$SALT" > ~/.zen/game/players/$PLAYER/secret.june
echo "$PEPPER" >> ~/.zen/game/players/$PLAYER/secret.june
-qrencode -s 12 -o "$HOME/.zen/game/players/$PLAYER/QR.ASTRONAUTENS.png" "https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"
-
echo; echo "Création Clefs et QR codes pour accès au niveau Astroport Ŋ1"; sleep 1
echo "--- PLAYER : $PLAYER";
diff --git a/tools/myhash.sh b/tools/myhash.sh
new file mode 100644
index 00000000..e40877df
--- /dev/null
+++ b/tools/myhash.sh
@@ -0,0 +1,51 @@
+#shellcheck shell=sh
+
+myHash() {
+ [ -f ~/.zen/game/players/localhost/latest ] \
+ && myHash=$(cat ~/.zen/game/players/localhost/latest) \
+ || myHash=$(template_register |ipfs add -q)
+ [ ! -f ~/.zen/game/players/localhost/latest ] \
+ && echo "$myHash" > ~/.zen/game/players/localhost/latest
+ [ -n "$myHash" ] \
+ && echo "$myHash"
+}
+
+myHttp() {
+ echo "$(myHttpHeader)"
+ echo
+ echo "$(myHttpContent)"
+}
+
+myIpfs() {
+ myIpfs=${myIPFS}/ipfs/$(myHash)
+ echo "$myIpfs"
+}
+
+myIpns() {
+ myIpns=${myIPFS}/ipns/$(myKey)
+ echo "$myIpns"
+}
+
+myKey() {
+ myKey=$(ipfs key list -l | awk '$2 == "self" {print $1}')
+ [ -n "$myKey" ] && echo "$myKey"
+}
+
+myHttpContent() {
+ myHash=$(myHash)
+ myHttpContent="Found
+The document has moved here.
" + echo "$myHttpContent" +} + +myHttpHeader() { + myHttpContent=$(myHttpContent) + myHttpHeader="HTTP/1.0 302 Found +Content-Type: text/html; charset=UTF-8 +Content-Length: $(myHttpContent |wc -c) +Date: $(date -R) +Location: ipfs/$myHash +set-cookie: AND=$myKey; expires=$(date -R -d "+1 month"); path=/; domain=.$myDomainName; Secure; SameSite=lax +Server: and" + echo "$myHttpHeader" +} diff --git a/tools/template.sh b/tools/template.sh index a39f6ba6..268a1bc0 100755 --- a/tools/template.sh +++ b/tools/template.sh @@ -1,16 +1,16 @@ #shellcheck shell=sh -template_register_localhost() { - template_register | sed -e "s~~~g" \ - -e "s~~~g" -} - template_register() { - sed -e "s~http://127.0.0.1:1234~${myASTROPORT}~g" \ - -e "s~http://127.0.0.1:8080~${myIPFS}~g" \ - -e "s~_IPFSNODEID_~${IPFSNODEID}~g" \ - -e "s~_HOSTNAME_~$(hostname)~g" \ - -e "s~.000.~.$(printf '%03d' $(seq 0 17 |shuf -n 1)).~g" \ - ~/.zen/Astroport.ONE/templates/register.html + [ -n "$isLAN" ] \ + && SED_SCRIPT='sed -e "s~~~g" + -e "s~~~g"' \ + || SED_SCRIPT='tee' + $RUN sed -e "s~http://127.0.0.1:1234~${myASTROPORT}~g" \ + -e "s~http://127.0.0.1:8080~${myIPFS}~g" \ + -e "s~_IPFSNODEID_~${IPFSNODEID}~g" \ + -e "s~_HOSTNAME_~$(hostname)~g" \ + -e "s~.000.~.$(printf '%03d' $(seq 0 17 |shuf -n 1)).~g" \ + ~/.zen/Astroport.ONE/templates/register.html | \ + eval ${SED_SCRIPT:-tee} }