From 5844b4e921f9a0cd9c0c3763663ab7dbbc60fa43 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 7 Dec 2016 13:48:21 -0800 Subject: [PATCH] [Linux] Add keepass get password functions --- dotfiles/lib/shellenv/functions.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dotfiles/lib/shellenv/functions.sh b/dotfiles/lib/shellenv/functions.sh index ebcfeb2c..931b84d2 100644 --- a/dotfiles/lib/shellenv/functions.sh +++ b/dotfiles/lib/shellenv/functions.sh @@ -87,7 +87,7 @@ function confirm() { # call with a prompt string or use a default read -r -p "$1" response case $response in - [yY][eE][sS]|[yY]) + [yY][eE][sS]|[yY]) return 0 ;; *) @@ -463,3 +463,13 @@ function localip { ;; esac } + +function keepass_system_password { + keepasshttp.py --get -u "http://$(hostname).systempassword" | + jq '.[].password' | unescape.py +} + +function keepass_keepass_password { + keepasshttp.py --get -u "http://keepass.password" | + jq '.[].password' | unescape.py +}