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"
dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2" 11 52 2>$_temp
result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
shred $_temp
shred -u $_temp
echo "processing ..."
sleep 3
done

View file

@ -183,10 +183,10 @@ if [ ${walletExists} -eq 0 ]; then
############################
# 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
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
if [ ${#passwordC} -eq 0 ]; then
@ -200,7 +200,7 @@ if [ ${walletExists} -eq 0 ]; then
source /home/admin/python3-env-lnd/bin/activate
python3 /home/admin/config.scripts/lnd.initwallet.py new ${passwordC} > /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
if [ ${#err} -gt 0 ]; then
@ -320,10 +320,10 @@ or having a complete LND rescue-backup from your old node.
clear
# 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
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
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 --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' )
shred /home/admin/.seed.tmp
shred -u /home/admin/.seed.tmp
echo "processing ... ${wordstring}"
# 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.
" 11 65
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
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

View file

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

View file

@ -56,7 +56,7 @@ else
exit 1
fi
address=$(cat $_temp | xargs)
shred $_temp
shred -u $_temp
if [ ${#address} -eq 0 ]; then
echo "FAIL - not a valid address (${address})"
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} )" \
--inputbox "$l1\n$l2\n$l3" 10 60 2>$_temp
_input=$(cat $_temp | xargs )
shred $_temp
shred -u $_temp
if [ ${#_input} -eq 0 ]; then
clear
echo

View file

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

View file

@ -96,7 +96,7 @@ l3="max available : ${confirmedBalance}"
dialog --title "Funding of Channel" \
--inputbox "$l1\n$l2\n$l3" 10 60 2>$_temp
amount=$(cat $_temp | xargs | tr -dc '0-9')
shred $_temp
shred -u $_temp
if [ ${#amount} -eq 0 ]; then
echo
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" \
--inputbox "$l1\n$l2\n$l3" 10 70 2>$_temp
invoice=$(cat $_temp | xargs)
shred $_temp
shred -u $_temp
if [ ${#invoice} -eq 0 ]; then
clear
echo

View file

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

View file

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

View file

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

View file

@ -227,8 +227,7 @@ fi
# clean up
/home/admin/config.scripts/blitz.lcd.sh hide
shred ${imagePath} 2> /dev/null
rm -f ${imagePath} 2> /dev/null
shred -u ${imagePath} 2> /dev/null
echo "------------------------------"
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:
https://github.com/rootzoll/raspiblitz/#b-dropbox-backup-target" 11 70 2>/home/admin/.tmp
authtoken=$(cat /home/admin/.tmp)
shred /home/admin/.tmp
shred -u /home/admin/.tmp
fi
# quick check on authtoken
@ -104,8 +104,7 @@ elif [ "${MODE}" == "upload" ]; then
--header "Content-Type: application/octet-stream" \
--data-binary @$SOURCEFILE > /home/admin/.dropbox.tmp
safeResponse=$(sed 's/[^a-zA-Z0-9 ]//g' /home/admin/.dropbox.tmp)
sudo shred /home/admin/.dropbox.tmp
sudo rm /home/admin/.dropbox.tmp 2>/dev/null
sudo shred -u /home/admin/.dropbox.tmp
success=$(echo "${safeResponse}" | grep -c 'servermodified')
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'
" 10 52 2>./.tmp
dynUpdateUrl=$( cat ./.tmp )
shred ./.tmp
shred -u ./.tmp
fi

View file

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