Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [[ $1 == "" ]]; then
  4. echo "Search for vanity keys - Usage : ./vanity.sh STRING"
  5. exit 1
  6. fi
  7.  
  8. echo "Finding keys containing : $1"
  9. STRING=$(echo "$1" | tr '[:upper:]' '[:lower:]')
  10.  
  11. while true; do
  12. output=$(cleos create key --to-console)
  13. pub=$(cut -d ' ' -f 5 <<< "${output//[$'\r\n']}")
  14. pub=$(echo "$pub" | tr '[:upper:]' '[:lower:]')
  15. if [[ $pub =~ .*$STRING.* ]]; then
  16. echo $output
  17. break
  18. fi
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement