tadded bury and exhume functions - gtomb - tomb gtk frontend in zenity (HTM) git clone git://parazyd.org/gtomb.git (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 677f7912f25563d7e77cdca2b74bd5fa564ace91 (DIR) parent 060c5aa753ac8e9d39fa516534bbf940e8005717 (HTM) Author: parazyd <parazyd@archlinux.info> Date: Wed, 18 Nov 2015 00:40:11 +0100 added bury and exhume functions Diffstat: M gtomb | 57 ++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) --- (DIR) diff --git a/gtomb b/gtomb t@@ -13,7 +13,7 @@ command=`zenity --title="gtomb - A GUI wrapper for Tomb" \ "slam" "Slam a tomb (or all) killing all programs using it" \ "resize" "Resize a tomb to a new size (can only grow)" \ "passwd" "Change the password of a key" \ - "setkey" "Change the key locking a tomb" \ + "setkey" "Forge a new key and change the key of an existing tomb" \ "engrave" "Generates a QR code of a key to be saved on paper" \ "bury" "Hide a key inside a JPEG image" \ "exhume" "Extract a key from a JPEG image"` t@@ -80,7 +80,18 @@ function resize { } function passwd { - echo '1' + keyfile=`zenity --file-selection --title="Choose a keyfile"` + case $? in + 0) + tomb passwd -k $keyfile + zenity --info --title="Success" \ + --text="Password successfully changed!" + main + eval $command;; + 1) + main + eval $command;; + esac } function setkey { t@@ -92,11 +103,49 @@ function engrave { } function bury { - echo '1' + keyfile=`zenity --title="Choose keyfile" --file-selection` + case $? in + 0) + jpegfile=`zenity --title="Choose JPEG file" --file-selection` + case $? in + 0) + tomb bury -k $keyfile $jpegfile + zenity --info --title="Success" \ + --text="Your key is how hidden in $jpegfile" + main + eval $command;; + 1) + main + eval $command;; + esac;; + 1) + main + $command;; + esac } function exhume { - echo '1' + jpegfile=`zenity --title="Choose JPEG file" --file-selection` + case $? in + 0) + keyfile=`zenity --title="Choose where to extract your key" \ + --file-selection \ + --save` + case $? in + 0) + tomb exhume -k $keyfile $jpegfile + zenity --info --title="Success" \ + --text="Your keyfile is extracted to $keyfile" + main + eval $command;; + 1) + main + eval $command;; + esac;; + 1) + main + $command;; + esac } main eval "$command"