-
-
Save coachbjork/8d31546ca5cb186ce4f2215bf970de9d 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 | |
if [[ $1 == "" ]]; then | |
echo "Search for vanity keys - Usage : ./vanity.sh STRING" | |
exit 1 | |
fi | |
echo "Finding keys containing : $1" | |
STRING=$(echo "$1" | tr '[:upper:]' '[:lower:]') | |
while true; do | |
output=$(cleos create key --to-console) | |
pub=$(cut -d ' ' -f 5 <<< "${output//[$'\r\n']}") | |
pub=$(echo "$pub" | tr '[:upper:]' '[:lower:]') | |
if [[ $pub =~ .*$STRING.* ]]; then | |
echo $output | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment