-
-
Save ajgappmark/11161d8dfb955b73f0936756ec626ec9 to your computer and use it in GitHub Desktop.
Hashpass shell script with xclip to copy password to clipboard
This file contains hidden or 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 | |
#hashapass.com method for generating passwords | |
#script by Simon Elmir | |
export IFS="" #read will now preserve whitespace | |
read -rp "parameter: " PARAMETER | |
read -rsp "password: " PASSWORD | |
echo | |
echo -n "$PARAMETER" \ | |
| openssl dgst -sha1 -binary -hmac "$PASSWORD" \ | |
| openssl enc -base64 \ | |
| cut -c 1-28 \ | |
| xclip -selection c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment