This commit is contained in:
qo-op 2020-06-06 02:47:37 +02:00
parent fcede9de86
commit 22ab82c9fc
4 changed files with 31 additions and 17 deletions

View File

@ -63,14 +63,20 @@ $MY_PATH/g1sms/sms_ASTROPORT.sh
####### OPEN PORT TO FORWARD ####### ADMIN ANY NODE (placer à 5 + 1mn)
### ADAPT TO ANY IPFSNODEID and TCP port
#if [[ "$timebar" == "17:36" ]]; then
# [[ "$IPFSNODEID" == "QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA" ]] && ipfs p2p listen /x/g1pub-ssh /ip4/127.0.0.1/tcp/22 # or CLOSE ipfs p2p close /x/g1pub-ssh
# echo "G1smsPub FORWARD: ipfs p2p forward /x/g1pub-ssh /ip4/127.0.0.1/tcp/2021 /p2p/QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA"
#fi
if [[ "$timebar" == "18:01" ]]; then
[[ "$IPFSNODEID" == "QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA" ]] && ipfs p2p listen /x/g1pub-http /ip4/127.0.0.1/tcp/80
echo "G1smsPub FORWARD: ipfs p2p forward /x/g1pub-http /ip4/127.0.0.1/tcp/8021 /p2p/QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA"
if [[ "$timebar" == "08:26" ]]; then
if [[ "$IPFSNODEID" == "QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA" ]]; then
ipfs p2p close --all
ipfs p2p listen /x/g1pub-ssh /ip4/127.0.0.1/tcp/22 # CLOSE WITH ipfs p2p close /x/g1pub-ssh
echo "G1smsPub FORWARD: ipfs p2p forward /x/g1pub-ssh /ip4/127.0.0.1/tcp/2021 /p2p/QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA"
ipfs p2p listen /x/g1pub-http /ip4/127.0.0.1/tcp/80
echo "G1smsPub FORWARD: ipfs p2p forward /x/g1pub-http /ip4/127.0.0.1/tcp/8021 /p2p/QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA"
fi
fi
#if [[ "$timebar" == "18:01" ]]; then
#[[ "$IPFSNODEID" == "QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA" ]] && ipfs p2p listen /x/g1pub-http /ip4/127.0.0.1/tcp/80
#echo "G1smsPub FORWARD: ipfs p2p forward /x/g1pub-http /ip4/127.0.0.1/tcp/8021 /p2p/QmVywXoBSz7JZ5vunYYVwi72SdTizvFt7k7qd3ooyYHvHA"
#fi
# TIME NTP SYNC: TODO: Problem being root (stickybit INSTALL?)
# G1Tx. G1sms. G1Dab Zen economy needs precise time sync (RpiZero !!)
# Tx rates is limited by Station time synchronisation.
@ -143,10 +149,18 @@ randh=$((1 + RANDOM % 24))
############ ASTROPORT LAUNCHING DATE REACHED (HOUR is UTC)
if [[ "$timebar" == "10:12" ]]; then
TODAY=$(date '+%Y%m%d')
if [[ "$timebar" == "10:12" && "$TODAY" == "20200606" ]]; then
echo '
_____ ___ ___ __ __ _
|__ / |__ \ < / / /___ ___ ______ _____/ /_ (_)___ ____ _
/_ < __/ / / / / / __ `/ / / / __ \/ ___/ __ \/ / __ \/ __ `/
___/ / / __/ / /_ _ _ / / /_/ / /_/ / / / / /__/ / / / / / / / /_/ /
/____/ /____/ /_/(_|_|_) /_/\__,_/\__,_/_/ /_/\___/_/ /_/_/_/ /_/\__, /
/____/
ASTROPORT NOW... automate cellulaire - blob à rétrocontrole humain -
'
fi
##################################################################
@ -192,7 +206,7 @@ echo '
/ /_/ // / (__ ) / / / / (__ )
\____//_/ /____/_/ /_/ /_/____/
forwarding to http://127.0.0.1:10099
HTTP API forwarding to http://127.0.0.1:10099
'
ipfs p2p close --all
./zen/ipfs_OPEN_ports.sh

View File

@ -59,10 +59,10 @@ for hashfile in /tmp/loveland_entrance/*; do
if [[ ! -f /home/$YOU/.zen/g1sms/$PHONE/_pub ]]; then
# PHONE IS UNKNOWN !
sms_SEND "$PHONE" "COUCOU"
## TODO AKE DOUBLE AUTH.... !!! before creating account.
sms_SEND "$PHONE" "COUCOU. RDV le 6 juin à 12h12. a très vite..."
## TODO ADD DOUBLE AUTH....?
log "$(date): $PHONE : $PARRAIN : $NAISSANCE"
# CHECK for Associated PARRAIN. GET PubKey?
PARRAIN=$(echo "$PARRAIN" | grep -E "([A-Za-z0-9\-\_]+$)")

View File

@ -38,7 +38,7 @@ UNIT=${countvalues[2]}
[[ -f "${PINFILE}.crypt" ]] && /home/$YOU/.zen/astroport/zen/tools/natools.py decrypt -f pubsec -k "$NODE_PUBSECFILE" -i "${PINFILE}.crypt" -o "$PINFILE" && PIN=$(cat "$PINFILE");
[[ "$PIN" != "" ]] && echo "" > "$PINFILE" || PIN="PIN EMPTY !!! Contacter $ADMINPHONE SVP"
mess="[Astroport] Clefs
mess="Voici vos clefs
$UIDNA
$PIN

View File

@ -2,9 +2,9 @@
header("Access-Control-Allow-Origin: *");
if ( ! isset($_REQUEST['phone']) ) {
// DEBUG
$_REQUEST['phone'] = "0647683646";
$_REQUEST['parrain'] = "Fred";
$_REQUEST['naissance'] = "21-03-1972_18:04";
$_REQUEST['phone'] = "0612345678";
$_REQUEST['parrain'] = "Inconnu";
$_REQUEST['naissance'] = "06-06-2020_12:12";
}
if (strlen($_REQUEST['phone']) == 10 ) {