-
Notifications
You must be signed in to change notification settings - Fork 30
/
Deep-HLR.py
84 lines (74 loc) · 6.25 KB
/
Deep-HLR.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
77
78
79
80
81
82
83
84
import argparse
import json
import os
import requests
# Banner
print("")
print(" ,█M █▌ ")
print(" █▀ ██ ")
print(" ,█▌ █▌ ")
print(" ▓█ █▌ ▄██▌ ██µ ▀▌ ")
print(" ▓█ ██ ▓██▌ ▀▌ █▌ ")
print(" ▄█ █▌ ▓██▌ , ██ ▀█ ")
print(" █ █▌ █▀ ▓██▌ J██ ██ ▀█ █▄ ")
print(" ██ █▌ █▌ ██ ██▓██▌ J██ █▄ ██ ² █ ")
print(" █ █ █╚ ██ █████▌ J██ █▄ ██ █▌ ")
print(" █▌ ██ ██ ██ ██▓████████ █ █ █▌ ")
print(" ██ █ █ ████████▌ J██ █▌ █ █ ")
print(" █▌ █ ▀▌ ██ █▐▌ ██J██ █▌ █▌ █ ")
print(" █▌ █ ▐█ ██ ▄ ██▌ █▌J██ █▌ █▄ █ ")
print(" ██ █ █ ██ █▌▌▐▌╙█▌ ▀▀ █┐ █ █ ")
print(" ▀▌ █▌ █▌ ██ ████▌ ██ ██ ▓▌ █▌ ")
print(" █ █ ▀▌ █▌ ▐▌ ███ ▓█ █ █ ")
print(" █▌ ▐█ ██ ██ ▐▌ ████ █▀ ██ █▌ ")
print(" ██ ██ ╙█═ ▓─██▐██████████▌ ██ █▌ █ ")
print(" █▄ ▀█ █▌███▌ █ ████ ██ █╝ ")
print(" █▄ ▀▌ ▓W██▐▌██ ███ ▓█╨ █▀ ")
print(" ██ ▌█ ╟▌ ▀ L ██ ╥█Γ ")
print(" ██ ██¿ █▀ ")
print(" ╙██ ██▌█ ▄██ ")
print(" █F ,█▀▌▓▌ █ ")
print(" █ ▀▌ █▄ ")
print(" █▌ ▀▌ █ ")
print(" J████▌███▌ ")
print(" █ █████ █▄ ")
print(" █▌ ▓▌ █ ")
print(" ▐██████▌█████▌ ")
print(" █ ██▌ ▓▌ ,██└█▌ ")
print(" █▀ ████╙ █ ")
print(" ▄████████████████▌ ")
print(" █ ▀██ █▌ ▓██ █▌ ")
print(" `╙ ███▌██▀ ▌ ")
print(" ██ ")
print(" █▌ ")
print(" =======================================================================================")
print(" D E E P H L R ")
print(" =======================================================================================")
print(" author: Edgar Medina ")
print(" =======================================================================================")
print("")
def main(api_key, phone):
url = "https://api.defastra.com/deep_phone_check"
headers = {"X-API-KEY": api_key, "Content-Type": "application/x-www-form-urlencoded"}
data = {"phone": phone}
response = requests.post(url, headers=headers, data=data)
if response.status_code == 200:
print(json.dumps(response.json(), indent=4))
else:
error_msg = response.json()["error_message"]
print(f"Error: {error_msg}")
if __name__ == "__main__":
# Define the command-line arguments
parser = argparse.ArgumentParser(description="Retrieve a full profile to a phone number including rep, hlr, carrier, geo, social, device, plus more...")
parser.add_argument("phone", help="The phone number to check in international format with the country code.")
# Parse the arguments
args = parser.parse_args()
# Read the API key from the config file
config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), "config.json")
with open(config_file) as f:
config = json.load(f)
api_key = config.get("api_key")
if not api_key:
print("Error: API key not found in config file.")
exit(1)
main(api_key, args.phone)