From 22ab82c9fc55de7a500fb82203e921e6df9fb43b Mon Sep 17 00:00:00 2001 From: qo-op Date: Sat, 6 Jun 2020 02:47:37 +0200 Subject: [PATCH] OUI --- cron_MINUTE.sh | 34 ++++++++++++++++++++--------- g1sms/sms_ASTROPORT.sh | 6 ++--- g1sms/sms_NEW.sh | 2 +- www/LOVELand/g1sms/sms_loveland.php | 6 ++--- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index adc3348..df96b64 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -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 diff --git a/g1sms/sms_ASTROPORT.sh b/g1sms/sms_ASTROPORT.sh index 4d033e0..9fae4b3 100755 --- a/g1sms/sms_ASTROPORT.sh +++ b/g1sms/sms_ASTROPORT.sh @@ -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\-\_]+$)") diff --git a/g1sms/sms_NEW.sh b/g1sms/sms_NEW.sh index 100070e..90200dd 100755 --- a/g1sms/sms_NEW.sh +++ b/g1sms/sms_NEW.sh @@ -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 diff --git a/www/LOVELand/g1sms/sms_loveland.php b/www/LOVELand/g1sms/sms_loveland.php index 5615161..09b84a6 100644 --- a/www/LOVELand/g1sms/sms_loveland.php +++ b/www/LOVELand/g1sms/sms_loveland.php @@ -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 ) {