Created
August 18, 2021 02:50
-
-
Save jaymody/7643248c897d2c5ebeb8f4b6319f312f to your computer and use it in GitHub Desktop.
Email Finder
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
import json | |
import time | |
import requests | |
import pandas as pd | |
from tqdm import tqdm | |
def get_result(email): | |
return requests.get(f"https://api.trumail.io/v2/lookups/json?email={email}") | |
def combinations(first, middle, last, domain): | |
return [ | |
username + "@" + domain | |
for username in [ | |
first, | |
last, | |
first + last, | |
last + first, | |
first + "." + last, | |
last + "." + first, | |
# first + middle + last, | |
# first[0] + middle[0] + last, | |
] | |
] | |
def main(first, middle, last, domain): | |
data = [] | |
for comb in tqdm(combinations(first, middle, last, domain)): | |
data.append(get_result(comb).json()) | |
time.sleep(2) | |
print(json.dumps(data, indent=2)) | |
df = pd.DataFrame(data).drop(["domain", "md5hash", "suggestion", "gravatar"]) | |
print(df) | |
if __name__ == "__main__": | |
main("jay", "", "mody", "amazon.com") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment