BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Password app
- Subject: [Discuss] Password app
- From: dbarrett at blazemonger.com (Daniel Barrett)
- Date: Fri, 10 Oct 2014 12:59:24 -0400
- References: <li6zjd3yl4p.fsf@panix5.panix.com>
Here is my password app for Linux. It's free. :-) 1. Create a text file with three columns: username, password, and any notes you want to add. Use a single tab character as a column separator. 2. Encrypt the file with GnuPG. 3. Write a script to run "gpg -d | grep -i" on your encrypted file to locate matching lines. (So any command-line arg can be a search key.) Use /usr/bin/cut to extract the first column and pipe it to "xclip -selection clipboard", and the second column to "xclip -selection primary". 4. Run the script with any arguments as search keys: $ myscript amazon.com 5. Now, "right-click + Paste" will paste your username, and middle mouse button will paste your password. 6. If you get tired of typing your passphrase over and over, use gpg-agent or similar. Here's my script, which also echoes the username and notes (third column) on screen. Enjoy, modify, share, etc. Public domain. ------------8<----------------- cut here ----------------8<------------------ #!/bin/bash if [ -z "$DISPLAY" ] then echo "$0: no DISPLAY, cannot use xclip" exit 1 fi PASSFILE=/path/to/your/file.gpg lines=`gpg -d "$PASSFILE" | /bin/grep -i "$@"` count=`echo "$lines" | wc -l` echo if [ $count -eq 1 ] then username=`echo -n "$lines" | cut -f1` password=`echo -n "$lines" | cut -f2` notes=`echo -n "$lines" | cut -f3` echo "Username = $username" echo "$notes" echo "Password is in clipboard" echo -n "$password" | xclip -selection primary echo -n "$username" | xclip -selection clipboard else echo "$count lines found - multiple matches - try again" fi ------------8<----------------- cut here ----------------8<------------------ -- Dan Barrett dbarrett at blazemonger.com
- References:
- [Discuss] Password app
- From: smallm at panix.com (Mike Small)
- [Discuss] Password app
- Prev by Date: [Discuss] Password app
- Next by Date: [Discuss] Password app
- Previous by thread: [Discuss] Password app
- Next by thread: [Discuss] Perl Tech meeting Tues Oct 14th - Shell-Shocker CGI and Perl DoS bugs
- Index(es):