hey going further

This commit is contained in:
qo-op 2020-12-04 02:55:16 +01:00
parent c7709f8fb3
commit ac61d1784a
3 changed files with 18 additions and 7 deletions

View File

@ -22,15 +22,23 @@ g1_profil=$(zenity --entry --text "Nom de votre profil Gchange" --title "Astropo
g1_salt=$(zenity --entry --text "Un peu de sel" --title "Astroport - Sel" --entry-text="$salt");
g1_pepper=$(zenity --entry --text "Un peu de poivre" --title "Astroport - Poivre" --entry-text="$pepper");
echo "CREATE /tmp/secret.dunikey"
python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
g1pub=$(cat ~/.zen/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
g1priv=$(cat ~/.zen/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
cd ~/.zen/astroport/zen/tools/
ipfs_ID=$(python3 ./create_ipfsnodeid_from_tmp_secret.dunikey.py)
zenity --info --width 300 --text "$ipfs_ID"
echo
echo "CREATE ~/.ipfs/config.new"
ipfs_ID=$(python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
echo $ipfs_ID > ~/.zen/secret.ipfs
source ~/.zen/secret.ipfs
jq -r --arg PeerID "$PeerID" '.Identity.PeerID=$PeerID' ~/.ipfs/config > /tmp/config.tmp
jq -r --arg PrivKEY "$PrivKEY" '.Identity.PrivKey=$PrivKEY' /tmp/config.tmp > ~/.ipfs/config.new
rm /tmp/config.tmp
echo $PeerID
echo $PrivKEY
echo

View File

@ -37,7 +37,7 @@ ipfs_secure_bytes = ipfs_secure.private_bytes(encoding=serialization.Encoding.Ra
# Formulating PeerID
ipfs_pid = base58.b58encode(b'\x00$\x08\x01\x12 ' + ipfs_shared_bytes)
PeerID = ipfs_pid.decode('ascii')
print('PeerID={}'.format(ipfs_pid.decode('ascii')))
print('PeerID={};'.format(ipfs_pid.decode('ascii')))
# Serializing private key in IPFS-native mode, the private key contains public one

View File

@ -94,7 +94,10 @@ echo "~/.zen/secret(s) are OK !"
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py -o ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py \
&& chmod +x ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py
python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py
ipfs_ID=$(python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
echo $ipfs_ID > ~/.zen/secret.ipfs
source ~/.zen/secret.ipfs
cat ~/.zen/secret.ipfs
echo
echo
echo "########################################################"