Skip to content

Instantly share code, notes, and snippets.

@Debdut
Last active March 23, 2022 20:38
Show Gist options
  • Save Debdut/2f7dbccd0007a1e2e81055daef9eadc2 to your computer and use it in GitHub Desktop.
Save Debdut/2f7dbccd0007a1e2e81055daef9eadc2 to your computer and use it in GitHub Desktop.
Safari Like Password Generator

CLI Safari Password Generator

If you love the Safari Password generator like me, idk about you but a paaaassword like e40a2a-a97a30-860df1 looks really cute to me!

Install Instructions

  • Create a file named pass in /usr/local/bin or somewhere in $PATH
  • Copy and paste the pass.sh contents into it
  • Give it executable permssion chmod +x /usr/local/bin/pass
  • And you are done!

or just copy paste in the terminal!

curl -o-  https://gist.githubusercontent.com/Debdut/2f7dbccd0007a1e2e81055daef9eadc2/raw/fa7666c7054d51c74a2bf475b6f477db75889ad9/pass.sh > /usr/local/bin/pass; chmod +x /usr/local/bin/pass;

Usage

# generate a password
$ pass
e40a2a-a97a30-860df1

# generate and copy to clipboard (on mac)
$ pass | pbcopy

# generate and save to a file
$ pass > dropbox.com.pass

# save username and pass
$ echo "user: debdut\npass: $(pass)" > github.com.pass

$ cat github.com.pass
user: debdut
pass: 29e721-49b393-970823
#!/usr/bin/env sh
# generate 6 random character
rand6 () {
echo $(openssl rand -base64 800 | md5 | head -c6)
}
# generate safari like password
pass () {
echo "$(rand6)-$(rand6)-$(rand6)"
}
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment