Last active
October 11, 2018 14:19
-
-
Save shankerwangmiao/b2ba883027c2c151b58cf482c9900290 to your computer and use it in GitHub Desktop.
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 | |
function gen { | |
dd if=/dev/urandom 2>/dev/null | tr -dc a-f0-9 | fold -w $1 | head -n 1 | sed 's/^/0x/' | |
} | |
spi=`gen 8` | |
reqid=`gen 8` | |
auth_key=`gen 64` | |
enc_key=`gen 64` | |
cat << EOF | |
ENDPOINT=$1 | |
SPI=$spi | |
REQID=$reqid | |
AUTH_KEY=$auth_key | |
ENC_KEY=$enc_key | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment