This commit is contained in:
rootzoll 2020-05-02 15:42:22 +02:00
commit 5bab2debb1
15 changed files with 27 additions and 30 deletions

View file

@ -22,7 +22,7 @@ while [ ${#result} -eq 0 ]
l2="one word, keep characters basic & not too long" l2="one word, keep characters basic & not too long"
dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2" 11 52 2>$_temp dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2" 11 52 2>$_temp
result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' ) result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
shred $_temp shred -u $_temp
echo "processing ..." echo "processing ..."
sleep 3 sleep 3
done done

View file

@ -183,10 +183,10 @@ if [ ${walletExists} -eq 0 ]; then
############################ ############################
# let user enter password c # let user enter password c
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
sudo /home/admin/config.scripts/blitz.setpassword.sh x "Set your Password C for the LND Wallet Unlock" /home/admin/.pass.tmp sudo /home/admin/config.scripts/blitz.setpassword.sh x "Set your Password C for the LND Wallet Unlock" /home/admin/.pass.tmp
passwordC=`sudo cat /home/admin/.pass.tmp` passwordC=`sudo cat /home/admin/.pass.tmp`
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
# make sure passwordC is set # make sure passwordC is set
if [ ${#passwordC} -eq 0 ]; then if [ ${#passwordC} -eq 0 ]; then
@ -200,7 +200,7 @@ if [ ${walletExists} -eq 0 ]; then
source /home/admin/python3-env-lnd/bin/activate source /home/admin/python3-env-lnd/bin/activate
python3 /home/admin/config.scripts/lnd.initwallet.py new ${passwordC} > /home/admin/.seed.tmp python3 /home/admin/config.scripts/lnd.initwallet.py new ${passwordC} > /home/admin/.seed.tmp
source /home/admin/.seed.tmp source /home/admin/.seed.tmp
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
# in case of error - retry # in case of error - retry
if [ ${#err} -gt 0 ]; then if [ ${#err} -gt 0 ]; then
@ -320,10 +320,10 @@ or having a complete LND rescue-backup from your old node.
clear clear
# let user enter password c # let user enter password c
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
sudo /home/admin/config.scripts/blitz.setpassword.sh x "Set your Password C for the LND Wallet Unlock" /home/admin/.pass.tmp sudo /home/admin/config.scripts/blitz.setpassword.sh x "Set your Password C for the LND Wallet Unlock" /home/admin/.pass.tmp
passwordC=`sudo cat /home/admin/.pass.tmp` passwordC=`sudo cat /home/admin/.pass.tmp`
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
# get seed word list # get seed word list
if [ "${CHOICE}" == "SEED+SCB" ] || [ "${CHOICE}" == "ONLYSEED" ]; then if [ "${CHOICE}" == "SEED+SCB" ] || [ "${CHOICE}" == "ONLYSEED" ]; then
@ -334,7 +334,7 @@ or having a complete LND rescue-backup from your old node.
# dialog to enter # dialog to enter
dialog --backtitle "RaspiBlitz - LND Recover" --inputbox "Please enter/paste the SEED WORD LIST:\n(just the words, seperated by spaces, in correct order as numbered)" 9 78 2>/home/admin/.seed.tmp dialog --backtitle "RaspiBlitz - LND Recover" --inputbox "Please enter/paste the SEED WORD LIST:\n(just the words, seperated by spaces, in correct order as numbered)" 9 78 2>/home/admin/.seed.tmp
wordstring=$( cat /home/admin/.seed.tmp | sed 's/[^a-zA-Z0-9 ]//g' ) wordstring=$( cat /home/admin/.seed.tmp | sed 's/[^a-zA-Z0-9 ]//g' )
shred /home/admin/.seed.tmp shred -u /home/admin/.seed.tmp
echo "processing ... ${wordstring}" echo "processing ... ${wordstring}"
# check correct number of words # check correct number of words
@ -374,10 +374,10 @@ During wallet creation LND offers to set an extra password
to protect the seed words. Most users did not set this. to protect the seed words. Most users did not set this.
" 11 65 " 11 65
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
sudo /home/admin/config.scripts/blitz.setpassword.sh x "Enter extra Password D" /home/admin/.pass.tmp sudo /home/admin/config.scripts/blitz.setpassword.sh x "Enter extra Password D" /home/admin/.pass.tmp
passwordD=`sudo cat /home/admin/.pass.tmp` passwordD=`sudo cat /home/admin/.pass.tmp`
sudo shred /home/admin/.pass.tmp 2>/dev/null sudo shred -u /home/admin/.pass.tmp 2>/dev/null
fi fi
fi fi

View file

@ -122,7 +122,7 @@ case $CHOICE in
l3="one word, keep characters basic & not too long" l3="one word, keep characters basic & not too long"
dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2$l3" 13 52 2>$_temp dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2$l3" 13 52 2>$_temp
result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' ) result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
shred $_temp shred -u $_temp
echo "processing ..." echo "processing ..."
sleep 3 sleep 3
done done

View file

@ -56,7 +56,7 @@ else
exit 1 exit 1
fi fi
address=$(cat $_temp | xargs) address=$(cat $_temp | xargs)
shred $_temp shred -u $_temp
if [ ${#address} -eq 0 ]; then if [ ${#address} -eq 0 ]; then
echo "FAIL - not a valid address (${address})" echo "FAIL - not a valid address (${address})"
echo "Press ENTER to return to main menu." echo "Press ENTER to return to main menu."

View file

@ -29,7 +29,7 @@ dialog --title "Open a Connection to a Peer" \
--backtitle "Lightning ( ${network} | ${chain} )" \ --backtitle "Lightning ( ${network} | ${chain} )" \
--inputbox "$l1\n$l2\n$l3" 10 60 2>$_temp --inputbox "$l1\n$l2\n$l3" 10 60 2>$_temp
_input=$(cat $_temp | xargs ) _input=$(cat $_temp | xargs )
shred $_temp shred -u $_temp
if [ ${#_input} -eq 0 ]; then if [ ${#_input} -eq 0 ]; then
clear clear
echo echo

View file

@ -26,7 +26,7 @@ l2="1 ${network} = 100 000 000 SAT"
dialog --title "Pay thru Lightning Network" \ dialog --title "Pay thru Lightning Network" \
--inputbox "$l1\n$l2" 9 50 2>$_temp --inputbox "$l1\n$l2" 9 50 2>$_temp
amount=$(cat $_temp | xargs | tr -dc '0-9') amount=$(cat $_temp | xargs | tr -dc '0-9')
shred $_temp shred -u $_temp
if [ ${#amount} -eq 0 ]; then if [ ${#amount} -eq 0 ]; then
clear clear
echo echo

View file

@ -96,7 +96,7 @@ l3="max available : ${confirmedBalance}"
dialog --title "Funding of Channel" \ dialog --title "Funding of Channel" \
--inputbox "$l1\n$l2\n$l3" 10 60 2>$_temp --inputbox "$l1\n$l2\n$l3" 10 60 2>$_temp
amount=$(cat $_temp | xargs | tr -dc '0-9') amount=$(cat $_temp | xargs | tr -dc '0-9')
shred $_temp shred -u $_temp
if [ ${#amount} -eq 0 ]; then if [ ${#amount} -eq 0 ]; then
echo echo
echo "no valid amount entered - returning to menu ..." echo "no valid amount entered - returning to menu ..."

View file

@ -49,7 +49,7 @@ l3="To try it out go to: ${testSite}"
dialog --title "Pay thru Lightning Network" \ dialog --title "Pay thru Lightning Network" \
--inputbox "$l1\n$l2\n$l3" 10 70 2>$_temp --inputbox "$l1\n$l2\n$l3" 10 70 2>$_temp
invoice=$(cat $_temp | xargs) invoice=$(cat $_temp | xargs)
shred $_temp shred -u $_temp
if [ ${#invoice} -eq 0 ]; then if [ ${#invoice} -eq 0 ]; then
clear clear
echo echo

View file

@ -19,7 +19,7 @@ dialog --title "Create a forwarding event report" \
--backtitle "Lightning ( ${network} | ${chain} )" \ --backtitle "Lightning ( ${network} | ${chain} )" \
--inputbox "$l1\n$l2" 10 60 7 2>$_temp --inputbox "$l1\n$l2" 10 60 7 2>$_temp
_input=$(cat $_temp | xargs ) _input=$(cat $_temp | xargs )
shred $_temp shred -u $_temp
if [ ${#_input} -eq 0 ]; then if [ ${#_input} -eq 0 ]; then
exit 1 exit 1
fi fi

View file

@ -156,8 +156,7 @@ fi
if [ "${command}" == "hide" ]; then if [ "${command}" == "hide" ]; then
sudo killall -3 fbi sudo killall -3 fbi
shred /home/admin/qr.png 2> /dev/null shred -u /home/admin/qr.png 2> /dev/null
rm -f /home/admin/qr.png 2> /dev/null
exit 0 exit 0
fi fi

View file

@ -142,7 +142,7 @@ elif [ "${abcd}" = "b" ]; then
# get user input # get user input
password1=$( cat $_temp ) password1=$( cat $_temp )
shred $_temp shred -u $_temp
# ask user for new password A (second time) # ask user for new password A (second time)
dialog --backtitle "RaspiBlitz - Setup"\ dialog --backtitle "RaspiBlitz - Setup"\
@ -150,7 +150,7 @@ elif [ "${abcd}" = "b" ]; then
# get user input # get user input
password2=$( cat $_temp ) password2=$( cat $_temp )
shred $_temp shred -u $_temp
# check if passwords match # check if passwords match
if [ "${password1}" != "${password2}" ]; then if [ "${password1}" != "${password2}" ]; then
@ -302,7 +302,7 @@ elif [ "${abcd}" = "x" ]; then
# second parameter is the flexible text # second parameter is the flexible text
text=$2 text=$2
resultFile=$3 resultFile=$3
shred $3 2>/dev/null shred -u $3 2>/dev/null
# ask user for new password (first time) # ask user for new password (first time)
dialog --backtitle "RaspiBlitz"\ dialog --backtitle "RaspiBlitz"\
@ -310,7 +310,7 @@ elif [ "${abcd}" = "x" ]; then
# get user input # get user input
password1=$( cat $_temp ) password1=$( cat $_temp )
shred $_temp shred -u $_temp
# ask user for new password A (second time) # ask user for new password A (second time)
dialog --backtitle "RaspiBlitz - Setup"\ dialog --backtitle "RaspiBlitz - Setup"\
@ -318,7 +318,7 @@ elif [ "${abcd}" = "x" ]; then
# get user input # get user input
password2=$( cat $_temp ) password2=$( cat $_temp )
shred $_temp shred -u $_temp
# check if passwords match # check if passwords match
if [ "${password1}" != "${password2}" ]; then if [ "${password1}" != "${password2}" ]; then

View file

@ -227,8 +227,7 @@ fi
# clean up # clean up
/home/admin/config.scripts/blitz.lcd.sh hide /home/admin/config.scripts/blitz.lcd.sh hide
shred ${imagePath} 2> /dev/null shred -u ${imagePath} 2> /dev/null
rm -f ${imagePath} 2> /dev/null
echo "------------------------------" echo "------------------------------"
echo "If the connection was not working:" echo "If the connection was not working:"

View file

@ -31,7 +31,7 @@ Follow the steps described at the following link
to get the DropBox-Authtoken from your account: to get the DropBox-Authtoken from your account:
https://github.com/rootzoll/raspiblitz/#b-dropbox-backup-target" 11 70 2>/home/admin/.tmp https://github.com/rootzoll/raspiblitz/#b-dropbox-backup-target" 11 70 2>/home/admin/.tmp
authtoken=$(cat /home/admin/.tmp) authtoken=$(cat /home/admin/.tmp)
shred /home/admin/.tmp shred -u /home/admin/.tmp
fi fi
# quick check on authtoken # quick check on authtoken
@ -104,8 +104,7 @@ elif [ "${MODE}" == "upload" ]; then
--header "Content-Type: application/octet-stream" \ --header "Content-Type: application/octet-stream" \
--data-binary @$SOURCEFILE > /home/admin/.dropbox.tmp --data-binary @$SOURCEFILE > /home/admin/.dropbox.tmp
safeResponse=$(sed 's/[^a-zA-Z0-9 ]//g' /home/admin/.dropbox.tmp) safeResponse=$(sed 's/[^a-zA-Z0-9 ]//g' /home/admin/.dropbox.tmp)
sudo shred /home/admin/.dropbox.tmp sudo shred -u /home/admin/.dropbox.tmp
sudo rm /home/admin/.dropbox.tmp 2>/dev/null
success=$(echo "${safeResponse}" | grep -c 'servermodified') success=$(echo "${safeResponse}" | grep -c 'servermodified')
sizeZero=$(echo "${safeResponse}" | grep -c 'size 0') sizeZero=$(echo "${safeResponse}" | grep -c 'size 0')

View file

@ -50,7 +50,7 @@ The RaspiBlitz will call this URL regularly.
4 service freedns.afraid.org use 'DirectURL' 4 service freedns.afraid.org use 'DirectURL'
" 10 52 2>./.tmp " 10 52 2>./.tmp
dynUpdateUrl=$( cat ./.tmp ) dynUpdateUrl=$( cat ./.tmp )
shred ./.tmp shred -u ./.tmp
fi fi

View file

@ -57,7 +57,7 @@ Password C will be stored on the device.
sudo /home/admin/config.scripts/lnd.autounlock.sh on sudo /home/admin/config.scripts/lnd.autounlock.sh on
exit 1 exit 1
fi fi
shred ./.tmp shred -u ./.tmp
fi fi
# config file # config file