From b36cb9f7c43875938a1f1ee274c144b0ce5105cd Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 22 Jun 2022 16:11:58 +0200 Subject: [PATCH] netcat-openbsd 1234 trick --- ajouter_video.sh | 36 ++++++++++++++++++++++++++++++++++-- install.sh | 2 +- zen/ipns_self_publish.sh | 13 ++++++++++--- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/ajouter_video.sh b/ajouter_video.sh index 56cc3b7..7cec7cd 100755 --- a/ajouter_video.sh +++ b/ajouter_video.sh @@ -29,6 +29,16 @@ G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) [[ $(which ffmpeg) == "" ]] && echo "ERREUR! Installez ffmpeg" && echo "sudo apt install ffmpeg" && exit 1 [[ $(which xdpyinfo) == "" ]] && echo "ERREUR! Installez x11-utils" && echo "sudo apt install x11-utils" && exit 1 +# Check who is .current PLAYER +PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null) || ( echo "noplayer" && exit 1 ) +PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null) || ( echo "nopseudo" && exit 1 ) +G1PUB=$(cat ~/.zen/game/players/.current/.g1pub 2>/dev/null) || ( echo "nog1pub" && exit 1 ) +IPFSNODEID=$(cat ~/.zen/game/players/.current/.ipfsnodeid 2>/dev/null) || ( echo "noipfsnodeid" && exit 1 ) +PLAYERNS=$(cat ~/.zen/game/players/.current/.playerns 2>/dev/null) || ( echo "noplayerns" && exit 1 ) +MOANS=$(cat ~/.zen/game/players/.current/.moans 2>/dev/null) || ( echo "noplayermoans" && exit 1 ) +QOOPNS=$(cat ~/.zen/game/players/.current/.qoopns 2>/dev/null) || ( echo "noplayerqoopns" && exit 1 ) + + URL="$1" if [ $URL ]; then echo "URL: $URL" @@ -38,7 +48,7 @@ if [ $URL ]; then CHOICE="$IMPORT" fi -[[ $CHOICE == "Web" ]] && CHOICE=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Cette source Web est à enregistrer comme " --entry-text="Page" WebSite) +[[ $CHOICE == "Web" ]] && CHOICE="Page" #&& CHOICE=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Cette source Web est à enregistrer comme " --entry-text="Page" WebSite) # REMOVE GtkDialog errors for zenity shopt -s expand_aliases @@ -102,7 +112,7 @@ YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail ######################################################################## # CHOOSE CATEGORY (remove anime, not working!) -[[ $CHOICE == "" ]] && CHOICE=$(zenity --entry --width 300 --title="Catégorie" --text="Choisissez la catégorie de votre media" --entry-text="Film" Serie Youtube Video) +[[ $CHOICE == "" ]] && CHOICE=$(zenity --entry --width 300 --title="Catégorie" --text="Choisissez la catégorie de votre ajout" --entry-text="Film" Serie Youtube Video Astronaute) [[ $CHOICE == "" ]] && exit 1 # LOWER CARACTERS @@ -117,6 +127,28 @@ PREFIX=$(echo "${CAT}" | head -c 1 | awk '{ print toupper($0) }' ) # ex: F, S, A ######################################################################## case ${CAT} in ######################################################################## +# CASE ## ASTRONAUTE +# _ _ +# __ _ ___| |_ _ __ ___ _ __ __ _ _ _| |_ ___ +# / _` / __| __| '__/ _ \| '_ \ / _` | | | | __/ _ \ +# | (_| \__ \ |_| | | (_) | | | | (_| | |_| | || __/ +# \__,_|___/\__|_| \___/|_| |_|\__,_|\__,_|\__\___| +# +# +######################################################################## + astronaute) + +# INSTASCAN G1PUB CAPTURE +~/.zen/Astroport.ONE/tools/instascan_login.sh "ONE" + +if [[ $CAPTAIN == $PLAYER ]]; then + zenity --warning --width 300 --text "Bienvenue $PLAYER" + +fi + + exit 0 + ;; +######################################################################## # CASE ## YOUTUBE # _ _ # _ _ ___ _ _| |_ _ _| |__ ___ diff --git a/install.sh b/install.sh index 322c7bc..5eb7636 100755 --- a/install.sh +++ b/install.sh @@ -31,7 +31,7 @@ sudo apt-get update sudo apt install -y $i; done -for i in git fail2ban inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev; do +for i in git fail2ban netcat-openbsd inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev; do if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then echo ">>> Installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" sudo apt install -y $i diff --git a/zen/ipns_self_publish.sh b/zen/ipns_self_publish.sh index 363424c..6610b76 100755 --- a/zen/ipns_self_publish.sh +++ b/zen/ipns_self_publish.sh @@ -6,13 +6,20 @@ ME="${0##*/}" countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|grep' | wc -l) [[ $countMErunning -gt 2 ]] && echo "$ME already running $countMErunning time" && exit 0 ######################################################################## -IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) -[[ $IPFSNODEID == "" ]] && echo "ipfs TIMEOUT" && exit 1 + +PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null) || ( echo "noplayer" && exit 1 ) +PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null) || ( echo "nopseudo" && exit 1 ) +G1PUB=$(cat ~/.zen/game/players/.current/.g1pub 2>/dev/null) || ( echo "nog1pub" && exit 1 ) +IPFSNODEID=$(cat ~/.zen/game/players/.current/.ipfsnodeid 2>/dev/null) || ( echo "noipfsnodeid" && exit 1 ) +PLAYERNS=$(cat ~/.zen/game/players/.current/.playerns 2>/dev/null) || ( echo "noplayerns" && exit 1 ) +MOANS=$(cat ~/.zen/game/players/.current/.moans 2>/dev/null) || ( echo "noplayermoans" && exit 1 ) +QOOPNS=$(cat ~/.zen/game/players/.current/.qoopns 2>/dev/null) || ( echo "noplayerqoopns" && exit 1 ) + ######################################################################## ## TESSERACT DOUBLE ACTION ######################################################################## -echo "Adding ~/.zen/ipfs to IPFS" +echo "Adding ~/.zen/ipfs/ to IPFS" # MIPFS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1) # OLDCHAIN=$(cat ~/.zen/ipfs/.${IPFSNODEID}/.chain) # echo "OLD: $OLDCHAIN != NEW:$MIPFS ?"