what a good guy huh... for the love of people... or the love of money.... doubt it will catch on though >.> hope it does however.
11USD for 1BTC does not tell me it will not catch on, it already did, let's just hope for a steady climb, the BTC currency can only gain fame/value the more you use it, the only pain in the ass, is the synchronization, I never got to finish it, though I have made a nice bash script to mount your pendrive(with your wallet and bitcoin software), decrypt your wallet, launch your software and upon closing it will encrypt your wallet and unmount, but I think I will keep it simple and just mount the important stuff, and leave the rest in the system.
- - - Updated - - -
Do not use it, it still needs some stripping to do and make it simpler.
[bash]#!/bin/bash
# README ##################################################################
# This script is made with the intentions of mounting your USB directory, #
# decrypting/encrypting your wallet and erasing traces, all while in your #
# USB drive, basically no data is ever "stored" in the computer. All of #
# is done inside your USB drive. This script is meant to be ran inside #
# the terminal, currently, only Linux is supported. #
###########################################################################
# Instruction #############################################################
# If you have a previous wallet, please back it up into your USB drive, #
# erase the ".bitcoin" folder found in '/home/USERNAME/.bitcoin', once #
# you are done, you may start this script inside a terminal, make sure #
# the USB is connected at all times. #
###########################################################################
# Credits #################################################################
# #
###########################################################################
# CONFIG
BitcoinVersion="0.6.3" # Client Version, change as soon as new update is available.
BTCDir="$HOME/.bitcoin" # Home's .bitcoin directory.
SecRM='shred -z -u' # shred command.
WALLET='wallet.dat'
WALLET_E='wallet.crypt'
BITCOIN='0' # Bitcoin Client execute path. To be specified later.
NAME=$USER
USBDir='0'
# /CONFIG
# Functions
createBitDir() { # Function used before any attempt to start the bitcoin client.
pushd $BTCDir
if [[ ! -d $BTCDir ]]; then
echo "Creating Directory..."
mkdir $BTCDir
else
echo "Directory '.bitcoin' exists..."
echo -e "If you already had a '.bitcoin' folder,\nplease transfer the contents\nto the USB Directory you wish to mount."
echo "After you are done, transferring, delete the '.bitcoin' directory and run this script again."
sleep 2
clear
read -p "Do you wish to continue? [y/n]: " escapeCH
if [[ $escapeCH == "y" ]]; then
clear
echo "Continuing..."
else
exit 1
fi
fi
sleep 3
clear
popd
}
getPathDir() {
if [[ $USBDir == 0 ]]; then
read -p "Enter USB Drive directory, Ex. /foo/bar/ : " USBDir
sleep 2
clear
fi
if [[ $BITCOIN == 0 ]]; then
echo -e "Enter location of bitcoin client, Ex. /Path/to/Bitcoin_Bin.\nMake sure you use the binary that is correct for your architecture."
read -p "Enter Path: " BITCOIN
sleep 2
clear
fi
}
mountBitDir() {
echo "[ROOT] .:Mount:."
su -c "mount --bind $USBDir $BTCDir"
if [[ $? -eq 0 ]]; then
echo "Mount Successful..."
else
echo "Error while attempting to mount..."
sleep 2
clear
read -p "Want to re-attempt to mount? [y/n]: " retryM
if [[ $retryM == "y" ]]; then
echo "Re-attempting..."
sleep 2
mountBitDir
else
echo "Exiting script..."
exit 1
fi
fi
sleep 2
clear
}
unmountBitDir() {
echo "[ROOT] .:Unmount:."
pushd $HOME
su -c "umount .bitcoin/"
if [[ $? -eq 0 ]]; then
clear
echo "Unmounting $BTCDir..."
sleep 2
clear
echo "Unmount Successful..."
sleep 1
else
clear
echo "An error occurred while unmounting..."
sleep 2
clear
read -p "Do you wish to re-attempt again? [y/n]: " retryUm
if [[ $retryUm == "y" ]]; then
echo "Re-attempting..."
sleep 2
unmountBitDir
else
echo "Exiting script..."
exit 1
fi
fi
popd
sleep 2
}
encryptBit() {
echo "$WALLET found, encryption is about to begin..."
sleep 2
clear
echo "[Encrypt] Please enter a strong password..."
openssl enc -aes256 -in $WALLET -out $WALLET_E
if [[ $? -eq 0 ]]; then
echo "Encryption Successful."
$SecRM $WALLET
else
echo "Error: Passwords did not match."
sleep 2
echo "Retrying..."
clear
encryptBit
fi
sleep 1
clear
}
decryptBit() {
echo "$WALLET_E found, decryption is about to begin..."
sleep 2
clear
echo "[Decrypt] Please enter your decryption password..."
openssl enc -d -aes256 -in $WALLET_E -out $WALLET
if [[ $? -eq 0 ]]; then
echo "Decryption Successful."
$SecRM $WALLET_E
else
echo "Error: Wrong Password."
sleep 2
echo "Retrying..."
clear
decryptBit
fi
sleep 1
clear
}
startBitClient() {
echo "Bitcoin Client is about to start..."
sleep 2
clear
pushd $BITCOIN
./bitcoin-qt
popd
clear
}
checkWallet() {
pushd $USBDir
if [[ ! -f $WALLET ]] && [[ ! -f $WALLET_E ]]; then
clear
createBitDir
clear
mountBitDir
clear
startBitClient
clear
encryptBit
clear
unmountBitDir
elif [[ -f $WALLET ]] && [[ ! -f $WALLET_E ]]; then
clear
mountBitDir
clear
startBitClient
clear
encryptBit
clear
unmountBitDir
elif [[ ! -f $WALLET ]] && [[ -f $WALLET_E ]]; then
clear
mountBitDir
clear
decryptBit
clear
startBitClient
clear
encryptBit
clear
unmountBitDir
elif [[ -f $WALLET ]] && [[ -f $WALLET_E ]]; then
clear
echo "We have detected both wallets(encrypted and decrypted) inside the folder, please verify which is the current and delete the other, run script afterwards."
exit 1
fi
popd
}
retrieveBitCli() {
if [[ `find . -name bitcoin-*` ]]; then
clear
read -p "Do you wish to update Bitcoin Client? [y/n]: " upChoice
sleep 2
if [[ $upChoice == "y" ]]; then
rm -R bitcoin-$BitcoinVersion-linux
wget -O "bitcoinclient-$BitcoinVersion.tar.gz" http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-$BitcoinVersion/bitcoin-$BitcoinVersion-linux.tar.gz/download
tar -xzf "bitcoinclient-$BitcoinVersion.tar.gz"
rm "bitcoinclient-$BitcoinVersion.tar.gz"
else
echo "Aborting Update..."
sleep 2
clear
fi
else
clear
echo "Bitcoin Client was not found, Downloading Bitcoin Client Version.$BitcoinVersion..."
sleep 2
wget -O "bitcoinclient-$BitcoinVersion.tar.gz" http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-$BitcoinVersion/bitcoin-$BitcoinVersion-linux.tar.gz/download
tar -xzf "bitcoinclient-$BitcoinVersion.tar.gz"
rm "bitcoinclient-$BitcoinVersion.tar.gz"
clear
fi
}
# /Functions
# Main
pushd $HOME
if [[ -f "recall.path" ]]; then
echo "Recalling last USB and Binary paths."
USBDir=$(head -1 recall.path)
BITCOIN=$(head -2 recall.path | tail -1)
sleep 3
clear
fi
popd
retrieveBitCli
getPathDir
checkWallet
pushd $HOME
if [[ ! -f "recall.path" ]]; then
echo -e "$USBDir\n$BITCOIN" > recall.path
echo "'recall.path' was created in your HOME directory to remember the USB and Binary path."
sleep 3
fi
popd[/bash]