-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDeep-Email.py
76 lines (68 loc) · 5.91 KB
/
Deep-Email.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import argparse
import json
import requests
# Banner
print("")
print(" ▄▄▄▄▄▄▄▄ ")
print(" ▄▄██████████████████████▄▄ ")
print(" ▄▄███████▀▀▀ ▀▀▀▀███████▄ ")
print(" ▄█████▀▀ ▀▀█████▄ ")
print(" ▄████▀▀ ▀████▄ ")
print(" █████▀ ▀████ ")
print(" ████▀ ▀████ ")
print(" ▄███▀ ▀████ ")
print(" ████ ▀███▄ ")
print(" ▄███▀ ███▄ ")
print(" ▄███ ▀████████████████████████████████████████ ███▌ ")
print(" ▐███ ▄ ▀▀██████████████████████████████████▀ ▄ ███▌ ")
print(" ███▌ ████▄ ▀▀████████████████████████████▀ ▄███ ▐███ ")
print(" ████ ███████▄ ▀██████████████████████▀ ▄██████ ████ ")
print(" ███▀ ██████████▄ ▀████████████████▀ ▄█████████ ███ ")
print(" ▐███ █████████████ ▀██████████▀ ████████████ ███▌ ")
print(" ███ ██████████▀ ▄██▄ ▀████▀ ▄█▄ ▀██████████ ████ ")
print(" ███ ███████▀ ▄████████▄ ▄███████▄ ▄▄ ████ ")
print(" ▐███ ████▀ ▄████████████████████████ ▄█▀▀▀ ▀▀██▄ ███▌ ")
print(" ███ █▀ ▄█████████████████████████▀ ▄█▀ ▄▄▄▄▄ ██ ███ ")
print(" ███▌ ███████████████████████████▌ ██ ██▀▀▀██ ▐█▌ ▐███ ")
print(" ▐███ ██ ██▀ ▐██ ▐█▀ ███▌ ")
print(" ████ ██ ██▄▄▄██▌ ▄█▀ ████ ")
print(" ████ ▀██ ▀▀▀ ▀▀▀ ████ ")
print(" ████ ▀██▄ ▄▄ ████ ")
print(" ▀███▄ ▀▀▀▀ ████ ")
print(" ▀████ ▄███▀ ")
print(" ▀███▄ ▄████ ")
print(" ▀████ ▄████ ")
print(" ▀████▄ ▄████▀ ")
print(" ▀█████▄ ▄▄█████▀ ")
print(" ▀██████▄▄ ▄▄██████▀ ")
print(" ▀▀███████████▄▄▄▄████████████▀ ")
print(" ▀▀▀▀██████████▀▀▀▀ ")
print("=============================================================================")
print(" D E E P E M A I L ")
print("=============================================================================")
print(" author: Edgar Medina ")
print("=============================================================================")
# Define the API endpoint URL
API_ENDPOINT = "https://api.defastra.com/deep_email_check"
def main():
# Parse command-line arguments
parser = argparse.ArgumentParser(description="Check an email address with the Defastra API")
parser.add_argument("email", help="the email address to check")
args = parser.parse_args()
# Retrieve API key from config file
with open("config.json", "r") as config_file:
config = json.load(config_file)
api_key = config.get("api_key")
# Set request headers and data
headers = {
"accept": "application/json",
"content-type": "application/x-www-form-urlencoded",
"x-api-key": api_key,
}
data = {"email": args.email}
# Send API request
response = requests.post(API_ENDPOINT, data=data, headers=headers)
# Print API response
print(response.text)
if __name__ == "__main__":
main()