crypto commons Umap
This commit is contained in:
parent
779df0d09e
commit
f4371a1375
|
@ -44,26 +44,41 @@ mkdir -p ~/.zen/tmp/${MOATS}/
|
|||
|
||||
## DIRECT VISA.print.sh
|
||||
PLAYER=${THAT}
|
||||
SALT=${AND}
|
||||
LAT=${AND}
|
||||
PEPPER=${THIS}
|
||||
LON=${THIS}
|
||||
|
||||
[[ ${AND} == "lat" ]] && SALT=${THIS}
|
||||
|
||||
input_number=${SALT}
|
||||
if [[ ! $input_number =~ ^[0-9]{1,3}\.[0-9]{2}$ ]]; then
|
||||
(echo "$HTTPCORS ERROR - BAD LAT $LAT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && exit 0
|
||||
else
|
||||
LAT=${input_number}
|
||||
fi
|
||||
|
||||
[[ ${APPNAME} == "lon" ]] && PEPPER=${WHAT}
|
||||
|
||||
input_number=${PEPPER}
|
||||
if [[ ! $input_number =~ ^[0-9]{1,3}\.[0-9]{2}$ ]]; then
|
||||
(echo "$HTTPCORS ERROR - BAD LON $LON" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && exit 0
|
||||
else
|
||||
LON=${input_number}
|
||||
fi
|
||||
|
||||
PASS=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-7)
|
||||
|
||||
### CHECK PLAYER EMAIL
|
||||
EMAIL="${PLAYER,,}" # lowercase
|
||||
|
||||
EMAIL="${PLAYER,,}" # lowercase
|
||||
[[ ! ${EMAIL} ]] && (echo "$HTTPCORS ERROR - MISSING ${EMAIL} FOR ${WHAT} CONTACT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && exit 0
|
||||
|
||||
[[ ! ${EMAIL} ]] && (echo "$HTTPCORS ERROR - MISSING ${EMAIL} FOR ${WHAT} CONTACT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $(date +%s) - $start` seconds. && exit 0
|
||||
|
||||
## CHECK WHAT IS EMAIL
|
||||
if [[ "${EMAIL}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
|
||||
## CHECK WHAT IS EMAIL
|
||||
if [[ "${EMAIL}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
|
||||
echo "VALID ${EMAIL} EMAIL OK"
|
||||
else
|
||||
else
|
||||
echo "BAD EMAIL"
|
||||
(echo "$HTTPCORS KO ${EMAIL} : bad '" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 0
|
||||
fi
|
||||
|
||||
(echo "$HTTPCORS PLEASE PROVIDE A VALID EMAIL ${EMAIL} '" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 0
|
||||
fi
|
||||
|
||||
### CREATE G1VISA & G1Card
|
||||
echo "${MY_PATH}/../tools/VISA.print.sh" "${EMAIL}" "'"$SALT"'" "'"$PEPPER"'" "'"$PASS"'" "'"$MOATS"'"
|
||||
${MY_PATH}/../tools/VISA.print.sh "${EMAIL}" "$SALT" "$PEPPER" "$PASS" "${MOATS}"##
|
||||
[[ ${EMAIL} != "" && ${EMAIL} != $(cat ~/.zen/game/players/.current/.player 2>/dev/null) ]] && rm -Rf ~/.zen/game/players/${EMAIL}/
|
||||
|
@ -74,8 +89,8 @@ ${MY_PATH}/../tools/VISA.print.sh "${EMAIL}" "$SALT" "$PEPPER" "$PASS" "${MOATS
|
|||
######################################################
|
||||
echo "UMAP = $LAT:$LON"
|
||||
echo "# CALCULATING MAP G1PUB WALLET"
|
||||
${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/secret.key "$LAT" "$LON"
|
||||
G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.key | grep 'pub:' | cut -d ' ' -f 2)
|
||||
${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/cesium.key "$LAT" "$LON"
|
||||
G1PUB=$(cat ~/.zen/tmp/${MOATS}/cesium.key | grep 'pub:' | cut -d ' ' -f 2)
|
||||
[[ ! ${G1PUB} ]] && (echo "$HTTPCORS ERROR - (╥☁╥ ) - KEYGEN COMPUTATION DISFUNCTON" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1
|
||||
echo "MAPG1PUB : ${G1PUB}"
|
||||
|
||||
|
@ -87,8 +102,8 @@ UMAPNS=$(ipfs key import ${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${G
|
|||
[[ ! ${UMAPNS} ]] && (echo "$HTTPCORS ERROR - (╥☁╥ ) - UMAPNS COMPUTATION DISFUNCTON" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1
|
||||
|
||||
echo "# OSM2IPFS ~/.zen/tmp/${MOATS}/Umap.png"
|
||||
chromium --headless --disable-gpu --screenshot=~/.zen/tmp/${MOATS}/Umap.png --window-size=600x600 https://ipfs.copylaradio.com/ipfs/QmSgeT3bo5GZMAfY1yPDHDPpt9tg1EwWYAKom9pb4Gyfeq/Umap.html?southWestLat=$SALT&southWestLon=$PEPPER°=0.01
|
||||
|
||||
chromium --headless --disable-gpu --screenshot=/tmp/Umap.png --window-size=600x600 "https://ipfs.copylaradio.com/ipfs/QmSgeT3bo5GZMAfY1yPDHDPpt9tg1EwWYAKom9pb4Gyfeq/Umap.html?southWestLat=$SALT&southWestLon=$PEPPER°=0.01"
|
||||
cp /tmp/Umap.png ~/.zen/tmp/${MOATS}/Umap.png
|
||||
ls ~/.zen/tmp/${MOATS}/
|
||||
|
||||
IPFSROOT=$(ipfs add -rwHq ~/.zen/tmp/${MOATS}/* | tail -n 1)
|
||||
|
|
|
@ -31,9 +31,9 @@ header {
|
|||
#yellow {
|
||||
background: yellow;
|
||||
position: absolute;
|
||||
top: 12%;
|
||||
left: 66%;
|
||||
width: 18%;
|
||||
top: 2%;
|
||||
left: 56%;
|
||||
width: 180;
|
||||
visibility: hidden;
|
||||
}
|
||||
#login {
|
||||
|
@ -54,7 +54,7 @@ header {
|
|||
<div id="login"><button onclick="promptUser('login')">LOGIN</button><button onclick="promptUser('logout')">LOGOUT</button></div>
|
||||
-->
|
||||
<div>
|
||||
<button onclick="homeAstroportStation('/?qrcode=station', '', 21654)">Ğ1Station</button>
|
||||
<button onclick="homeAstroportStation('/?qrcode=station', 'tab', 21654)">Ğ1Station</button>
|
||||
</div>
|
||||
<span><div id="ainfo"></div></span>
|
||||
<div id="debug"></div>
|
||||
|
@ -69,21 +69,19 @@ header {
|
|||
|
||||
<form id="formlink" action = "http://127.0.0.1:1234" method = "GET" enctype="application/x-www-form-urlencoded">
|
||||
|
||||
<h1><span>Astroport</span> <a href="https://pad.p2p.legal/s/Astroport.ONE">Ŋ1</a></h1>
|
||||
<h1></h1>
|
||||
<span>Email : </span><input name=uplanet value=''></br></br>
|
||||
|
||||
<div id="yellow">
|
||||
<input type=hidden name='salt' value='0'>
|
||||
<h3><a title="SERVE YOURSELF" href="http://127.0.0.1:12345"> >>> (◕‿‿◕) <<< </a></h3>
|
||||
<input type=hidden name='pepper' value='0'>
|
||||
<input name='lat' value='0.00'>
|
||||
<h3><a title="CHECK BY YOURSELF" href="http://127.0.0.1:12345"> >>> (◕‿‿◕) <<< </a></h3>
|
||||
<input name='lon' value='0.00'>
|
||||
</div>
|
||||
|
||||
<input name=g1pub value='any youtube link to feed your TW with ?'></br>
|
||||
<span>Email : </span><input name=email value=''></br></br>
|
||||
<input type=hidden name='lat' value='0.00'>
|
||||
<input type=hidden name='lon' value='0.00'>
|
||||
<input type='submit' value='[(♥‿‿♥)]'>
|
||||
|
||||
</form>
|
||||
<span>Astroport <a href="https://pad.p2p.legal/s/Astroport.ONE">Ŋ1</a> - Crypto Commons for a United Planet -</span>
|
||||
<h6>
|
||||
<p id="station"><div id='countdown'></div></span></p>
|
||||
</h6>
|
||||
|
@ -91,21 +89,24 @@ header {
|
|||
</body>
|
||||
<script>
|
||||
// Extract latitude and longitude from URL parameters
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const lat = urlParams.get('lat').toFixed(2);
|
||||
const lon = urlParams.get('lon').toFixed(2);
|
||||
const lat = urlParams.get('lat');
|
||||
const lon = urlParams.get('lon');
|
||||
const uplanet = urlParams.get('uplanet');
|
||||
|
||||
// Set latitude and longitude values to hidden inputs
|
||||
document.getElementById('salt').value = lat;
|
||||
document.getElementById('pepper').value = lon;
|
||||
const latElement = document.querySelector('input[name="lat"]');
|
||||
const lonElement = document.querySelector('input[name="lon"]');
|
||||
const uplanetElement = document.querySelector('input[name="uplanet"]');
|
||||
|
||||
if (latElement && lonElement) {
|
||||
latElement.value = lat || '0.00'; // Default to '0.00' if lat is missing
|
||||
lonElement.value = lon || '0.00'; // Default to '0.00' if lon is missing
|
||||
uplanetnElement.value = uplanet || '@'; // Default to '0.00' if lon is missing
|
||||
}
|
||||
});
|
||||
|
||||
var typed = new Typed('#typed', {
|
||||
stringsElement: '#typed-strings',
|
||||
smartBackspace: true,
|
||||
backDelay: 700,
|
||||
loop: true,
|
||||
typeSpeed: 40
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
@ -166,7 +167,7 @@ function testLatency(cb) {
|
|||
function countdown() {
|
||||
if (timeLeft == -1) {
|
||||
clearTimeout(timerId);
|
||||
document.getElementById("countdown").innerHTML = "<form method='get' action='http://g1billet.localhost:33101' target='aframe'><input type='hidden' name='montant' value='0' ><label for='type'>Type :</label><select name='type'><option value=''>G1BILLET+ ( x 6 )</option><option value='jeu'>G1CARD</option><option value='xastro' selected>G1CARD+TW</option><option value='@astroport'>G1CARD+@</option></select><input type='hidden' name='dice' value='4' > <button type='submit'>Extra</button></form>";
|
||||
document.getElementById("countdown").innerHTML = "<form method='get' action='http://g1billet.localhost:33101' target='aframe'><input type='hidden' name='montant' value='0' ><label for='type'>Type :</label><select name='type'><option value=''>G1BILLET+ ( x 6 )</option><option value='jeu'>G1CARD</option><option value='xastro' selected>G1CARD+TW</option><option value='@astroport'>G1CARD+@</option></select><input type='hidden' name='dice' value='4' > <button type='submit'>Make Extra</button></form>";
|
||||
} else {
|
||||
// elem.innerHTML = timeLeft + " s";
|
||||
timeLeft--;
|
||||
|
|
Loading…
Reference in New Issue