Created
January 7, 2018 19:03
-
-
Save ptsneves/6c938a3422209afc4f365972ee9f6a2f to your computer and use it in GitHub Desktop.
Generates passowords with sha1sum with a master password and a salt like in http://www.angel.net/~nic/passwd.current.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# != 2 ]; then | |
echo "Usage: $0 <master password> <salt>" | |
exit 1 | |
fi | |
#Puts it in the clipboard, at least in gnome | |
echo -n "$(echo -n $1:$2| sha1sum | cut -f1 -d\ | xxd -r -p | base64 | cut -c 1-13)@1a" | xclip -selection "clipboard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment