-
-
Save SleepTheGod/7f220d31cda982f7bd58fa625018528d to your computer and use it in GitHub Desktop.
OSINT Tool | Get emails by domain using public PGP repositories
This file contains hidden or 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
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('<')[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