No PASS, just visit

PASS = create PLAYER (EMAIL/PASS)
This commit is contained in:
fred 2023-09-03 00:03:05 +02:00
parent 8914fde3eb
commit a532345130
3 changed files with 28 additions and 12 deletions

View File

@ -67,8 +67,8 @@ else
fi
PASS=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-7)
## CHOOSEN PASS
[[ ${OBJ} == "PASS" ]] && PASS=${VAL}
## RECEIVED PASS
[[ ${OBJ} == "g1pub" && ${VAL} != "" ]] && PASS=${VAL}
### CHECK PLAYER EMAIL
EMAIL="${PLAYER,,}" # lowercase
@ -178,10 +178,16 @@ else
) &
fi
### CREATE A G1VISA FOR PLAYER
${MY_PATH}/../tools/VISA.new.sh "${EMAIL}" "${PASS}" "${EMAIL}" "UPlanet" "ADD YOUTUBE VIDEO CHANNEL URL" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt
## SEND EMAIL
${MY_PATH}/../tools/mailjet.sh "${EMAIL}" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL
### CREATE A G1VISA FOR PLAYER (IF PASS WAS GIVEN AND NO TW EXISTS YET)
if [[ ! -f ~/.zen/tmp/${MOATS}/${EMAIL}/index.html ]]; then
## Create a redirection to PLAYER (EMAIL/PASS) TW
[[ ${OBJ} == "g1pub" && ${VAL} != "" ]] \
&& mkdir -p ~/.zen/tmp/${MOATS}/${EMAIL} \
&& TWADD=$(${MY_PATH}/../tools/keygen -t ipfs "$EMAIL" "$PASS") \
&& echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipns/${TWADD}'\" />" > ~/.zen/tmp/${MOATS}/${EMAIL}/index.html \
&& ${MY_PATH}/../tools/VISA.new.sh "${EMAIL}" "${PASS}" "${EMAIL}" "UPlanet" "ADD YOUTUBE VIDEO CHANNEL URL" "${LAT}" "${LON}" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt \
&& ${MY_PATH}/../tools/mailjet.sh "${EMAIL}" ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt ## Send VISA.new log to EMAIL
fi
## HTTP nc ON PORT RESPONSE
echo "$HTTPCORS
@ -197,7 +203,7 @@ echo "$HTTPCORS
<br> Download files containing in their name
<br> Use G1Station and compatible G1Card QRCode scanner to operate...
<br>
$(cat ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt)
$(cat ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt 2>/dev/null)
<br><br>${EMAIL} REGISTERED : ${MOATS} : $(date)
</body></html>" > ~/.zen/tmp/${MOATS}/http.rep
cat ~/.zen/tmp/${MOATS}/http.rep | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &

View File

@ -84,7 +84,7 @@ header {
</form>
registre
<br>
<span>Astroport <a href="https://pad.p2p.legal/s/Astroport.ONE">Ŋ1</a> - Crypto Commons Defender -</span>
<span>Astroport <a href="https://pad.p2p.legal/s/Astroport.ONE">Ŋ1</a> - Crypto Commons Playground -</span>
<h2>
<form method='get' action='http://g1billet.localhost:33101' target='aframe'>
@ -120,10 +120,10 @@ document.addEventListener('DOMContentLoaded', function() {
const passElement = document.querySelector('input[name="g1pub"]');
// Generate a random 6-digit number and set it as the default value for "PASS"
if (passElement) {
const randomPass = Math.floor(100000 + Math.random() * 900000); // Generates a random 6-digit number
passElement.value = randomPass.toString();
}
//~ if (passElement) {
//~ const randomPass = Math.floor(100000 + Math.random() * 900000); // Generates a random 6-digit number
//~ passElement.value = randomPass.toString();
//~ }
if (latElement && lonElement) {
latElement.value = salt || '0.00'; // Default to '0.00' if lat is missing

View File

@ -20,6 +20,11 @@ PSEUDO="$4"
## Fill UP TW with VIDEO URL
URL="$5"
## UPLANET PLAYER
LAT="$6"
LON="$7"
################################################################################
YOU=$(myIpfsApi);
LIBRA=$(head -n 2 ${MY_PATH}/../A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
@ -283,6 +288,11 @@ DISCO="/?salt=${USALT}&pepper=${UPEPPER}"
sed -i "s~tube.copylaradio.com~$myTUBE~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
sed -i "s~ipfs.copylaradio.com~$myTUBE~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
## template 44.2301, 1.6518 UMAP LAT LON replacement
if [[ ${LAT} && ${LON} ]]; then
sed -i "s~44.2301~${LAT}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
sed -i "s~1.6518~${LON}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
fi
## Change myIP
#~ sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost)