add lib to init scripts
This commit is contained in:
parent
b4bdd426a1
commit
99261d36c0
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
<#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
MY_PATH="`dirname \"$0\"`" # relative
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
@ -40,9 +40,9 @@ passphrase generator...'
|
||||||
|
|
||||||
# GENERATE MNEMONIC KEY: 9 MOTS
|
# GENERATE MNEMONIC KEY: 9 MOTS
|
||||||
# LOGIN (=SALT) 6 WORDS
|
# LOGIN (=SALT) 6 WORDS
|
||||||
salt="$($MY_PATH/diceware.sh 6)"
|
salt="$($MY_PATH/lib/diceware.sh 6)"
|
||||||
# PASS (=PEPPER) 3 WORDS
|
# PASS (=PEPPER) 3 WORDS
|
||||||
pepper="$($MY_PATH/diceware.sh 3)"
|
pepper="$($MY_PATH/lib/diceware.sh 3)"
|
||||||
|
|
||||||
echo "........."
|
echo "........."
|
||||||
echo "REMEMBER YOUR CREDENTIALS !!!
|
echo "REMEMBER YOUR CREDENTIALS !!!
|
||||||
|
@ -52,7 +52,7 @@ password : $pepper"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# CREATE ~/.ssb/secret.dunikey
|
# CREATE ~/.ssb/secret.dunikey
|
||||||
python3 $MY_PATH/key_create_dunikey.py "$salt" "$pepper"
|
python3 $MY_PATH/lib/key_create_dunikey.py "$salt" "$pepper"
|
||||||
mv $MY_PATH/.secret.dunikey ~/.ssb/secret.dunikey
|
mv $MY_PATH/.secret.dunikey ~/.ssb/secret.dunikey
|
||||||
|
|
||||||
# CREATE SSB secret
|
# CREATE SSB secret
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
########################################################################
|
||||||
|
# Author: Fred (support@qo-op.com)
|
||||||
|
# Version: 2020.03.18
|
||||||
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
|
########################################################################
|
||||||
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
########################################################################
|
||||||
|
# \\///
|
||||||
|
# qo-op
|
||||||
|
#############
|
||||||
|
##########################
|
||||||
|
#######################################
|
||||||
|
####################################################
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
MOTS=$(echo "$1" | grep -E "^\-?[0-9]+$")
|
||||||
|
# Default is 6 words passphrase
|
||||||
|
if [[ "$MOTS" == "" ]]; then MOTS=6; fi
|
||||||
|
WORDCOUNT=${1-$MOTS}
|
||||||
|
# Download the wordlist
|
||||||
|
# wget -nc -O ~/.diceware-wordlist http://world.std.com/%7Ereinhold/diceware.wordlist.asc 2> /dev/null
|
||||||
|
# print a list of the diceware words
|
||||||
|
cat $MY_PATH/diceware-wordlist.txt |
|
||||||
|
awk '/[1-6][1-6][1-6][1-6][1-6]/{ print $2 }' |
|
||||||
|
# randomize the list order
|
||||||
|
shuf --random-source=/dev/urandom |
|
||||||
|
# pick the first n words
|
||||||
|
head -n ${WORDCOUNT} |
|
||||||
|
# pretty print
|
||||||
|
tr '\n' ' '
|
||||||
|
echo
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# This Python script gets Duniter creddentials as arguments, and writes a PubSec file that should be compatible with Cesium and Silkaj(DuniterPy) clients.
|
||||||
|
# launch with :
|
||||||
|
# python3 key_create_dnuikey.py <id> <mdp>
|
||||||
|
|
||||||
|
# depends on duniterpy 0.56
|
||||||
|
|
||||||
|
### Licence - WTFPL
|
||||||
|
# This script was written my Matograine, in the hope that it will be helpful.
|
||||||
|
# Do What The Fuck you like with it. There is :
|
||||||
|
# * no guarantee that this will work
|
||||||
|
# * no support of any kind
|
||||||
|
#
|
||||||
|
# If this is helpful, please consider making a donation to the developper's pubkey : 78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8
|
||||||
|
# Have fun
|
||||||
|
|
||||||
|
from sys import argv
|
||||||
|
from duniterpy.key import SigningKey
|
||||||
|
|
||||||
|
# path to save to
|
||||||
|
path = "./.secret.dunikey"
|
||||||
|
|
||||||
|
key = SigningKey.from_credentials(argv[1], argv[2], None)
|
||||||
|
key.save_pubsec_file(path)
|
||||||
|
print(
|
||||||
|
"G1 Wallet: ",
|
||||||
|
key.pubkey,
|
||||||
|
)
|
Loading…
Reference in New Issue