diff --git a/README.asciidoc b/README.asciidoc index 11c0783b9..2a0ebc982 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -164,8 +164,8 @@ Contributors, sorted by the number of commits in descending order: * Nathan Isom * Thorsten Wißmann * Philipp Hansch -* Austin Anderson * Kevin Velghe +* Austin Anderson * Alexey "Averrin" Nabrodov * avk * ZDarian diff --git a/misc/userscripts/password_fill b/misc/userscripts/password_fill index bc12e228b..fba09c78e 100755 --- a/misc/userscripts/password_fill +++ b/misc/userscripts/password_fill @@ -273,6 +273,28 @@ pass_backend() { } # ======================================================= +# ======================================================= +# backend: secret +secret_backend() { + init() { + return + } + query_entries() { + local domain="$1" + while read -r line ; do + if [[ "$line" =~ "attribute.username = " ]] ; then + files+=("$domain ${line#${BASH_REMATCH[0]}}") + fi + done < <( secret-tool search --unlock --all domain "$domain" 2>&1 ) + } + open_entry() { + local domain="${1%% *}" + username="${1#* }" + password=$(secret-tool lookup domain "$domain" username "$username") + } +} +# ======================================================= + # load some sane default backend reset_backend pass_backend