Skip to content

Instantly share code, notes, and snippets.

@bbhunter
Forked from si9int/pgp.py
Created April 13, 2021 15:48
Show Gist options
  • Save bbhunter/c2d5254cd1fb62a21beebca67b0a102c to your computer and use it in GitHub Desktop.
Save bbhunter/c2d5254cd1fb62a21beebca67b0a102c to your computer and use it in GitHub Desktop.
OSINT Tool | Get emails by domain using public PGP repositories
import requests
import sys
import re
def get_mails(domain):
url = 'https://pgp.circl.lu/pks/lookup?search={}&fingerprint=on&op=index'.format(domain)
res = requests.get(url).text
mails = re.findall(r'<a href=".*">(.*)<\/a>', res)
for m in mails:
try:
print(m.split('&lt;')[1][:-4].lower())
except IndexError:
pass
if __name__ == '__main__':
try:
get_mails(sys.argv[1])
except IndexError:
print('[X] Usage: python3 pgp.py target.com')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment