Skip to content

Instantly share code, notes, and snippets.

@umihico
Last active August 5, 2020 00:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umihico/4b957f6cbce20f7496cea75ef7e091a6 to your computer and use it in GitHub Desktop.
Save umihico/4b957f6cbce20f7496cea75ef7e091a6 to your computer and use it in GitHub Desktop.
Generate secret keys whose public keys which contain specific string such as your name
cd $(mktemp -d); while true; do seq 1000 | xargs -P 1000 -I NUM sh -c 'ssh-keygen -t ed25519 -f NUM.pem -N "" -C "" > /dev/null && if grep -vi umihico NUM.pem.pub > /dev/null; then rm NUM.pem NUM.pem.pub;fi' ; if find . -mindepth 1 | read; then for f in *.pem.pub; do echo $f >> files.txt; done; test -f files.txt && head -n1 files.txt | xargs -I F curl -s -X POST -d '{"text":"F"}' https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYYYY/zzzZZZzZzzZzzZZzz; break; fi ; date ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment