Created
July 13, 2018 21:13
-
-
Save haccer/40479b98ff5fe365f02c8ec4c19b782b to your computer and use it in GitHub Desktop.
Extract emails from PGP keys
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
#!/usr/bin/env python | |
import requests, base64, re, sys | |
r = requests.get("https://keybase.io/" + sys.argv[1] + "/key.asc") | |
body = r.text.split("\n\n") | |
key = body[1].split("-----") | |
for email in re.findall(r' <(.*?)>', str(base64.b64decode(key[0]))): | |
print(email) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment