Skip to content

Instantly share code, notes, and snippets.

@coachbjork
Forked from jchung00/eos-vanity.sh
Last active March 19, 2019 10:10
Show Gist options
  • Save coachbjork/8d31546ca5cb186ce4f2215bf970de9d to your computer and use it in GitHub Desktop.
Save coachbjork/8d31546ca5cb186ce4f2215bf970de9d to your computer and use it in GitHub Desktop.
#!/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