We had a / problem
parent
21ca95fe0f
commit
278255feb4
|
@ -34,7 +34,7 @@ function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
|||
mkdir -p ~/.zen/tmp/${MOATS}/
|
||||
|
||||
################################################################################
|
||||
## QRCODE IS HTTP LINK
|
||||
## QRCODE IS HTTP LINK REDIRECT TO
|
||||
###############################################################################
|
||||
if [[ ${QRCODE:0:4} == "http" ]]; then
|
||||
## THIS IS A WEB LINK
|
||||
|
@ -401,7 +401,7 @@ fi
|
|||
# DETECT TO REWARD IN REGARD TO WALLET EVOLUTION
|
||||
########################################### G1 PRICE : null 1 + gchange 10 + cesium 50
|
||||
if [[ ${CURG1} == ${QRCODE} ]]; then
|
||||
|
||||
## SCANNED G1PUB IS CURRENT STATION PLAYER : RETURN BALANCE
|
||||
echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "<h1>$CURPLAYER WALLET : $CURCOINS Ǧ1</h1>" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
(
|
||||
|
|
|
@ -124,7 +124,7 @@ while true; do
|
|||
## LOOKING IF ITS SWARM MAP COULD COMPLETE MINE
|
||||
echo "ANALYSING BOOTSTRAP SWARM MAP"
|
||||
itipnswarmap=$(cat ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json | jq -r '.myswarm' | rev | cut -d '/' -f 1 | rev )
|
||||
ipfs ls /ipns/${itipnswarmap} | rev | cut -d ' ' -f 1 | rev > ~/.zen/tmp/_swarm.${ipfsnodeid}
|
||||
ipfs ls /ipns/${itipnswarmap} | rev | cut -d ' ' -f 1 | rev | cut -d '/' -f 1 > ~/.zen/tmp/_swarm.${ipfsnodeid}
|
||||
|
||||
echo "ZNODS LIST"
|
||||
cat ~/.zen/tmp/_swarm.${ipfsnodeid}
|
||||
|
@ -231,7 +231,7 @@ Content-Type: application/json; charset=UTF-8
|
|||
&& T2WAIT=$((3600-${RANDOM:0:3})) \
|
||||
|| T2WAIT=$(cat ~/.zen/tmp/random.sleep)
|
||||
|
||||
if [[ $T2WAIT == 0 || $T2WAIT != $(cat ~/.zen/tmp/random.sleep) ]]; then
|
||||
if [[ $T2WAIT == 0 || $T2WAIT != $(cat ~/.zen/tmp/random.sleep 2>/dev/null) ]]; then
|
||||
(
|
||||
echo $T2WAIT > ~/.zen/tmp/random.sleep
|
||||
sleep $T2WAIT && rm ~/.zen/tmp/random.sleep
|
||||
|
@ -262,7 +262,7 @@ Content-Type: application/json; charset=UTF-8
|
|||
GPUB=${arr[0]}
|
||||
ASTROTOIPFS=$(${MY_PATH}/tools/g1_to_ipfs.py ${arr[0]} 2>/dev/null)
|
||||
|
||||
if [[ "${ASTROTOIPFS}" == "${arr[1]}" ]]; then
|
||||
if [[ "${ASTROTOIPFS}" == "${arr[1]}" && ${ASTROTOIPFS} != "" && ${arr[1]} != "" ]]; then
|
||||
## WE SPEAK THE SAME PROTOCOL
|
||||
echo "MAJOR TOM TO GROUD CONTROL"
|
||||
echo "WE HAVE A STATION ${GPUB} CONTACT"
|
||||
|
|
|
@ -48,9 +48,9 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w "${G1PUB}" | cut -d ' ' -f 1)
|
|||
-p ~/.zen/tmp/${MOATS}/result.png -c
|
||||
|
||||
convert -gravity northwest -pointsize 25 -fill black -draw "text 5,5 \"${PLAYER} - ${UPASS} \"" ~/.zen/tmp/${MOATS}/result_qrcode.png ~/.zen/tmp/${MOATS}/layer1.png
|
||||
convert -gravity southeast -pointsize 25 -fill black -draw "text 5,5 \"${VoeuName}\"" ~/.zen/tmp/${MOATS}/layer1.png ~/.zen/tmp/${MOATS}/final.png
|
||||
convert -gravity southeast -pointsize 25 -fill black -draw "text 5,5 \"${VoeuName}\"" ~/.zen/tmp/${MOATS}/layer1.png ~/.zen/tmp/${MOATS}/START.png
|
||||
|
||||
IMAGIC=$(ipfs add -Hq ~/.zen/tmp/${MOATS}/final.png | tail -n 1)
|
||||
IMAGIC=$(ipfs add -Hq ~/.zen/tmp/${MOATS}/START.png | tail -n 1)
|
||||
echo ${IMAGIC}
|
||||
exit 0
|
||||
|
||||
|
@ -119,7 +119,7 @@ select zwish in "${vlist[@]}"; do
|
|||
;;
|
||||
|
||||
"Ğ1Milgram")
|
||||
|
||||
GW="https://qo-op.com"
|
||||
# CREATE G1Milgram
|
||||
IMAGIC=$(${MY_PATH}/VOEUX.print.sh "${PLAYER}" "${TITLE}" "${MOATS}" | tail -n 1)
|
||||
|
||||
|
@ -156,7 +156,7 @@ select zwish in "${vlist[@]}"; do
|
|||
done
|
||||
|
||||
convert -gravity northwest -pointsize 40 -fill black -draw "text 50,2 \"${TITLE} ($typ)\"" ~/.zen/tmp/${MOATS}/START.png ~/.zen/tmp/${MOATS}/g1voeu1.png
|
||||
convert -gravity southeast -pointsize 30 -fill black -draw "text 50,2 \"${GW}\"" ~/.zen/tmp/${MOATS}/g1voeu1.png ~/.zen/tmp/${MOATS}/g1voeu.png
|
||||
convert -gravity southeast -pointsize 30 -fill black -draw "text 100,2 \"${GW}\"" ~/.zen/tmp/${MOATS}/g1voeu1.png ~/.zen/tmp/${MOATS}/g1voeu.png
|
||||
|
||||
#~ echo "~/.zen/tmp/${MOATS}/g1voeu.png READY ?"
|
||||
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open ~/.zen/tmp/${MOATS}/g1voeu.png
|
||||
|
|
|
@ -1,209 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link rel="icon" type="image/x-icon" href="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/favicon.ico">
|
||||
<title>♥Box - G1PASS PAY2ACCESS - </title>
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/demo.css">
|
||||
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmYD4y1pXHVnGxxFcn2LWo84ytwmWdNbkyUeFnPCbrpUQy/openpgp.min.js"></script>
|
||||
|
||||
<script src="http://127.0.0.1:8080/ipfs/Qmae5v9zydax9u6C9ceDijURu5PYdd5avmv4NkenCw7RFv/astro.js"></script>
|
||||
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/jquery-3.6.3.min.js"></script>
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/instascan.min.js"></script>
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type="text/css" />
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type="text/css" />
|
||||
<style>
|
||||
|
||||
body {
|
||||
background-image:url("http://127.0.0.1:8080/ipfs/QmPjA3g1ZK45VGGLSudZJ5VVtsGpbmyaokuj17HuPffVHY");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
html {
|
||||
height: 100%
|
||||
}
|
||||
header {
|
||||
opacity: 0.8;
|
||||
}
|
||||
input[type=submit] {
|
||||
width: 12em; height: 4em;
|
||||
}
|
||||
input[type=checkbox] {
|
||||
width: 2em; height: 2em;
|
||||
}
|
||||
input {
|
||||
width: 26em; height: 2em;
|
||||
}
|
||||
#aframe {
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
#yellow {
|
||||
background: black;
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 2%;
|
||||
left: 2%;
|
||||
width: 800px;
|
||||
visibility: hidden;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 10px;
|
||||
font-size: 40px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 20px;
|
||||
margin-bottom: 20px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#demo {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#description {
|
||||
text-align: left;
|
||||
float: left;
|
||||
width: 49%;
|
||||
max-width: 500px;
|
||||
padding-top: 15px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
#showoff {
|
||||
float: right;
|
||||
width: 30%;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#container {
|
||||
top: 120px;
|
||||
right: 0px;
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="demo">
|
||||
<div id="description">
|
||||
<header>
|
||||
<h1><a href="http://astroport.localhost:1234"><span>♥Box</span> Ğ1Station</a></h1><br>
|
||||
|
||||
<h3>Scannez votre G1PASS !</h3>
|
||||
<h2>Versez _PRICE_ Ğ1</h2>
|
||||
<h3>pour accéder à _TITTLE_</h3>
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
<div id="showoff">
|
||||
<div id="container">
|
||||
|
||||
<video id="preview" style="transform: scaleX(-1);width: 240px;height: 240px;" autoplay="autoplay" class="active"></video>
|
||||
|
||||
<p><input type="hidden" id="g1pub" value="DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech"/></p>
|
||||
<p><input type="text" id="who" value=""/></p>
|
||||
|
||||
<div id="appname">
|
||||
|
||||
<input type="radio" id="r0" name="appname" value="pay" checked="checked"><p><b>G1PASS</b></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<strong><div id="countdown"></div></strong>
|
||||
<strong><div id="resu"></div></strong>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
|
||||
|
||||
scanner.addListener('scan', function (content) {
|
||||
alert(content);
|
||||
if (content.startsWith('~~~~~')) {
|
||||
// GET APPNAME
|
||||
var appname = document.querySelector('input[name="appname"]:checked').value;
|
||||
// GET PASS THAT DECODE PGP
|
||||
var pass = prompt("Saisir PASS:");
|
||||
|
||||
// GET DESTINATION
|
||||
// FROM PREVIOUS G1PUB SCAN
|
||||
var g1pub = document.getElementById("g1pub").value;
|
||||
|
||||
alert('PAY TO ' + g1pub + ' = ' + _PRICE_);
|
||||
|
||||
var myU = 'http://astroport.localhost:1234/?qrcode=' + content +'&pass=' + pass + '&palpay=_PRICE_&g1pub=' + g1pub + '&who=' + document.getElementById("who").value ;
|
||||
console.log(myU);
|
||||
homeAstroportStation(myU, 'aframe', 10000)
|
||||
|
||||
} else {
|
||||
|
||||
// COPY QRCODE IN g1pub input
|
||||
document.getElementById("who").value = content;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Instascan.Camera.getCameras().then(function (cameras) {
|
||||
|
||||
if (cameras.length > 0) {
|
||||
|
||||
scanner.start(cameras[0]);
|
||||
|
||||
} else {
|
||||
|
||||
console.error('No cameras found.');
|
||||
|
||||
}
|
||||
|
||||
}).catch(function (e) {
|
||||
|
||||
console.error(e);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<h1><button id="ainfo" onclick="javascript:var x = document.getElementById('yellow'); if (x.style.visibility === 'hidden') {x.style.visibility = 'visible';} else {x.style.visibility = 'hidden';}">0/1</button></h1>
|
||||
<div id="yellow" ><a href="_STATION_" target="aframe">MENU</a>
|
||||
<iframe name="aframe" id="aframe" src="_STATION_" width="100%" height="320px"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
let cookies = document.cookie;
|
||||
console.log(cookies);
|
||||
|
||||
const el = document.getElementById('yellow');
|
||||
|
||||
setTimeout(() => {
|
||||
el.style.visibility = 'visible';
|
||||
}, 2000); // 👈️ delay in milliseconds
|
||||
|
||||
</script>
|
||||
|
||||
</body></html>
|
Loading…
Reference in New Issue