diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/common/askpass | 13 | ||||
| -rwxr-xr-x | bin/menuscripts/mpass | 2 | 
2 files changed, 14 insertions, 1 deletions
diff --git a/bin/common/askpass b/bin/common/askpass new file mode 100755 index 0000000..2725dbf --- /dev/null +++ b/bin/common/askpass @@ -0,0 +1,13 @@ +#!/bin/sh + +# We can figure out the password for the key based on $1 +# which is in the following form: +#	Enter passphrase for key 'path/to/key': +# The point is to retrieve the path and use the final name of the key +# find the according password. +key="$(printf '%s\n' "$1" | +	cut -f 2 -d \' | +	awk -F '/' '{print $NF}')" +pass="keys/$(hostname)/ssh/$key" + +pass show "$pass" | head -n 1 diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index 7348321..f513b16 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -14,7 +14,7 @@ list_pswds()  while [ -d "$store/$file" ]  do -	choice="$(list_pswds "$store/$file" | dmenu -c -g 4 -l 4)" +	choice="$(list_pswds "$store/$file" | commander -c)"  	[ "$choice" ] || exit 1  	[ -z "$file" ] && file="$choice" || file="$file/$choice"  done  | 
