Skip to content

Instantly share code, notes, and snippets.

@umeyuki
Last active December 2, 2019 06:24
Show Gist options
  • Save umeyuki/d003f0d13360d715d248a46c38d1c851 to your computer and use it in GitHub Desktop.
Save umeyuki/d003f0d13360d715d248a46c38d1c851 to your computer and use it in GitHub Desktop.
2pass
#!/bin/bash
read -sp 'service␣ password:' DATA
list=(${DATA// / })
echo -n list[0] | openssl sha256 -hmac list[1] -binary | openssl base64 | cut -c 1-16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment