Skip to content

Instantly share code, notes, and snippets.

Created July 13, 2018 21:13
What would you like to do?
Extract emails from PGP keys
#!/usr/bin/env python
import requests, base64, re, sys
r = requests.get("" + 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]))):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment