Skip to content

Instantly share code, notes, and snippets.

@si9int
Created April 8, 2021 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save si9int/a4a12ebaedd8865259992b80cef18ed5 to your computer and use it in GitHub Desktop.
Save si9int/a4a12ebaedd8865259992b80cef18ed5 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