-
Notifications
You must be signed in to change notification settings - Fork 0
/
OSINT-x-CURP.py
88 lines (78 loc) · 7.16 KB
/
OSINT-x-CURP.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
85
86
87
88
import argparse
import json
import requests
# Print Banner
print("")
print(" ╓▄▓▌▀▓▓▓▓@▄▄, ")
print(" .▄█▓▓▓▀╜└└╙╙▀▀▓▓▄¿ ")
print(" `Å╙ ,▄▄▓▓▀▀▓█▀▀▄ ")
print(" , █▀▓▓▓▀▓▀Ñ▄▄▄▓▓▌ ,▓▓▓█▓▓▄, ")
print(" ,▄▓▓▀▀▀▓▓▓ █▀╫╫╫╫╫╫╫▓╩╨███ J█╫▓▓▓█▓╫▀▓▄ ")
print(" ╥▓▌Ñ██▓█▓▓╫╫▌ █▀▓▓▓▓▓▓▓▌ ▄█▀█ ▌╫▓█▓▓▓▓▓▓▓█▄¿ ")
print(" ╥▓█▓▓▓▓▓▓▓▓▓▒▓L ▐▓▓▓█▓▓▓▌▓▌ ▄█▌█ ,▌╫▀█▓▓▀▓▓█▓█▓▀▄ ")
print(" ▓▌▀▓▓▀████▀╫█▀█ █▓▓▓▓█▓▓▌▓▓█▓▀█ ▄▓╫╫▌▓▓▀▀█▓▓█╫▓▓▓█▄ ")
print(" ▄█▓▓▓█▓█▓█▓█▓▓▓▓▓▓▄▓▓▓▓▓▓▓▓▓▓▓▀▓▓█▓▓▓▓▓▓▓█▀█▄▒██▓▓▌█╫█╫█▓▓▄ ")
print(" ╥███▓╫▓╫▓╫█▀▓▓▓▓▓▀█▓▓█▓▓▓▓▓▓▓█▄▌▓█▌▀▓▓▀▓▀▓▓▓▓▓▓▓█▓█▓▀▌▀▌▓▓▓▓▌ ")
print(" ,█▓╫█╫█▀▓▓▓▌▓▓▓▓╫▓▓▀▒█▓▓▓╫█▀▀█▀▌▓█╫▓▓▓█▓▓▓▓▓▓▓▀▓▓▓▓▓█╫█▓█▓▓█▓▓█ ")
print(" █▓▓█▓█▓██▓▌██▓█▓█▓▒█▀█▓▓▓╫▌╫█▌▓▓██╫█╫▓▓▌▓▓▓▓▒▓█▓█▀██▓████▓██▓██▄ ")
print(" ▄█▓╫█▀█▀█▓█╫█▓▓╫▓╫█▓█▓█▓▓█▓█▓▌╫▌█▓█╫▓▓▓▓█▓▓▓█▓▓▓▓▓▓╫█╫█▓█▓▓█▓▓▓▓█ ")
print(" ╒██╫▓▓▓▌╫▓╫▌▓▌▓╫█▓▓▓╫▓╫▓██▓▓▓▓▀▀▌█▓▓▀▓▀▓▀▓╫▓▓▌╫▓╫▓╫▓╫█▓▓▓█▓█╫█▓▓█▓▄ ")
print(" █▓▀╫▓╫█▀█▓▓▓▓▓▌╫▌╫█▓▓▓╫█▓█▓▓▓▓▀▓▓█╫▓╫▌╫▌╫▓╫█╫▌╫█▓▓╫▓╫█▓╫█▀█▓▓╫▓█▓▓█ ")
print(" █▓╫▓▀╫▌╫█╫▌╫▌▓▌╫▌╫█╫╫█╫▓▓▓█▓█▓▓▄▌██▓▓▓▓▓▓▓╫▌╫▌╫▌╫▌╫█▓▀▀▓▓▓▀██▓▀▓█▓█ ")
print(" ▄▓▒▓▓▓█╫▓▓▓▓▀▀`▀▀█▓▓▓╫█▓▓▀███▓▀█▀▓▓█▒╫▒▓▓█▀▀▀▀▓▓▓▀▀▀` `▀█▓█▓▓▌▓▓▓█ ")
print(" █╫▓▓╫▓▀▓▌▓▀ `└`▀ ▄▌▀▓█▓▓▓▌█╫█▓█▓▓▓▓█▄ ▀▀▀▓╫▓▀▓█ ")
print(" █▓▓╫▓▌▓█▌` █▓▓██▓▓▓▌▄▓█▓███▓▓▓█▓▄ ▀▀▓╫▌")
print(" ▀▓╫▓█▓Ö ▀▓▓▒▓▓▓█▌█╫█▓▓▓▓▓▓█▓█▓▌ ▓█▓ ▄▄, ▀▓▌")
print(" █▀╜ ▄µ ╨▀▓▓▓▓██▌██▀█▓▓▓▓▓▓▌▀▓▓ ▀▓▓█▓▓█▌ ")
print(" ▀▀▄▄▄▀▓▓▄▄ ╥▄▀█▓▓█▓▓▌█▓▓██▓█▓██▓▀▓▓ ▓▓▓▓█ ")
print(" ╥,▄█▓▓▓▓▌ ╙▓▓▄,╥╥æ▓█▀▀└ ▄█▓▓╙▓▓█╫▓▓▀█▓█▓▓▓▓▓▌ ▄▄▓▓█▌ ▄▄▄ ")
print(" ╨█▓▓██▓▓▓▓▌▄▄▓▓▀▀▌╫▓█▄▄▓█▓▀▀ ╙ ╙╙└▀██▀▀╙▀▀└ , ,▄▓▓▓▓▓█▓▓▓█F ")
print(" ` ╙▀▀█▓▓▓▓██▓▌▀█▓█▓▓█▓▌ ,▄▄▄▄▓█ ▄▓▓█▄▄▓▓▓▓▓▓█▓▓▀╙ ")
print(" ⁿ▄▄▓▓▓█▓▓▓▓▓▓█µ -█▓▓▓▓▓▓▓▄ ▓▓▓██▒▀█▓▓ ▄▓▓▓▓▌█▓▓▓▓▓▀ ")
print(" ▀▓▓▓▓▓▓▓▓▓▓▓▓▓█ Å█▓▓▓▓▓▓▓▌ ▄█▓▓▓▓█▓▓██ █▓▓▓█▄█▓██▀ ")
print(" ▀▀█▓█▓▌▀█▓▓▓█▄▄▄▓██▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▄███▓▓▓▓▓▓▓▌ ")
print(" ▄█▓▓▓▓▓▓▓▓▓▓█▓▓▓█▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▀ ")
print(" █▓▓▓▓▓▓▓▓▓▓▓▀,. █▓▓▓▓▓▓▓▓█▀▀▀▓█▓▓▓▓█▌▀ ")
print(" ▐▌▀█▀▓▀▀██▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓█▓Γ ` ")
print(" ▀▓█▓▓█▓▀▓▓▓▓▀╙▀▀▓█▀▀ ")
print(" ============================================================= ")
print(" OSINT MX ")
print(" ============================================================= ")
print(" osint x curp ")
print(" ====================== ")
print(" Author: Edgar Medina ")
print(" ====================== ")
print("")
def get_config():
try:
with open("config.json") as f:
return json.load(f)
except FileNotFoundError:
return {}
def get_args():
parser = argparse.ArgumentParser(description="Retrieve data from Mexico's CURP RENAPO API")
parser.add_argument("curp", type=str, help="The CURP to retrieve")
return parser.parse_args()
def main():
config = get_config()
args = get_args()
curp = args.curp
endpoint = "/v1/curp"
url = "https://curp-renapo.p.rapidapi.com" + endpoint
api_key = config.get("X-RapidAPI-Key")
if api_key is None:
print("Error: No API key specified.")
return
headers = {
"X-RapidAPI-Host": "curp-renapo.p.rapidapi.com",
"X-RapidAPI-Key": api_key
}
response = requests.get(f"{url}/{curp}", headers=headers)
if response.status_code == 200:
data = response.json()
# Do something with the data
print(data)
else:
print(f"Request failed with status code {response.status_code}.")
if __name__ == "__main__":
main()