├── config.json ├── LICENSE ├── OSINT-x-IMSS.py └── README.md /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_key": "YOUR_API_KEY_GOES_HERE" 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 emedina 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /OSINT-x-IMSS.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import json 3 | import requests 4 | 5 | # Print Banner 6 | print("") 7 | print(" ╓▄▓▌▀▓▓▓▓@▄▄, ") 8 | print(" .▄█▓▓▓▀╜└└╙╙▀▀▓▓▄¿ ") 9 | print(" `Å╙ ,▄▄▓▓▀▀▓█▀▀▄ ") 10 | print(" , █▀▓▓▓▀▓▀Ñ▄▄▄▓▓▌ ,▓▓▓█▓▓▄, ") 11 | print(" ,▄▓▓▀▀▀▓▓▓ █▀╫╫╫╫╫╫╫▓╩╨███ J█╫▓▓▓█▓╫▀▓▄ ") 12 | print(" ╥▓▌Ñ██▓█▓▓╫╫▌ █▀▓▓▓▓▓▓▓▌ ▄█▀█ ▌╫▓█▓▓▓▓▓▓▓█▄¿ ") 13 | print(" ╥▓█▓▓▓▓▓▓▓▓▓▒▓L ▐▓▓▓█▓▓▓▌▓▌ ▄█▌█ ,▌╫▀█▓▓▀▓▓█▓█▓▀▄ ") 14 | print(" ▓▌▀▓▓▀████▀╫█▀█ █▓▓▓▓█▓▓▌▓▓█▓▀█ ▄▓╫╫▌▓▓▀▀█▓▓█╫▓▓▓█▄ ") 15 | print(" ▄█▓▓▓█▓█▓█▓█▓▓▓▓▓▓▄▓▓▓▓▓▓▓▓▓▓▓▀▓▓█▓▓▓▓▓▓▓█▀█▄▒██▓▓▌█╫█╫█▓▓▄ ") 16 | print(" ╥███▓╫▓╫▓╫█▀▓▓▓▓▓▀█▓▓█▓▓▓▓▓▓▓█▄▌▓█▌▀▓▓▀▓▀▓▓▓▓▓▓▓█▓█▓▀▌▀▌▓▓▓▓▌ ") 17 | print(" ,█▓╫█╫█▀▓▓▓▌▓▓▓▓╫▓▓▀▒█▓▓▓╫█▀▀█▀▌▓█╫▓▓▓█▓▓▓▓▓▓▓▀▓▓▓▓▓█╫█▓█▓▓█▓▓█ ") 18 | print(" █▓▓█▓█▓██▓▌██▓█▓█▓▒█▀█▓▓▓╫▌╫█▌▓▓██╫█╫▓▓▌▓▓▓▓▒▓█▓█▀██▓████▓██▓██▄ ") 19 | print(" ▄█▓╫█▀█▀█▓█╫█▓▓╫▓╫█▓█▓█▓▓█▓█▓▌╫▌█▓█╫▓▓▓▓█▓▓▓█▓▓▓▓▓▓╫█╫█▓█▓▓█▓▓▓▓█ ") 20 | print(" ╒██╫▓▓▓▌╫▓╫▌▓▌▓╫█▓▓▓╫▓╫▓██▓▓▓▓▀▀▌█▓▓▀▓▀▓▀▓╫▓▓▌╫▓╫▓╫▓╫█▓▓▓█▓█╫█▓▓█▓▄ ") 21 | print(" █▓▀╫▓╫█▀█▓▓▓▓▓▌╫▌╫█▓▓▓╫█▓█▓▓▓▓▀▓▓█╫▓╫▌╫▌╫▓╫█╫▌╫█▓▓╫▓╫█▓╫█▀█▓▓╫▓█▓▓█ ") 22 | print(" █▓╫▓▀╫▌╫█╫▌╫▌▓▌╫▌╫█╫╫█╫▓▓▓█▓█▓▓▄▌██▓▓▓▓▓▓▓╫▌╫▌╫▌╫▌╫█▓▀▀▓▓▓▀██▓▀▓█▓█ ") 23 | print(" ▄▓▒▓▓▓█╫▓▓▓▓▀▀`▀▀█▓▓▓╫█▓▓▀███▓▀█▀▓▓█▒╫▒▓▓█▀▀▀▀▓▓▓▀▀▀` `▀█▓█▓▓▌▓▓▓█ ") 24 | print(" █╫▓▓╫▓▀▓▌▓▀ `└`▀ ▄▌▀▓█▓▓▓▌█╫█▓█▓▓▓▓█▄ ▀▀▀▓╫▓▀▓█ ") 25 | print(" █▓▓╫▓▌▓█▌` █▓▓██▓▓▓▌▄▓█▓███▓▓▓█▓▄ ▀▀▓╫▌") 26 | print(" ▀▓╫▓█▓Ö ▀▓▓▒▓▓▓█▌█╫█▓▓▓▓▓▓█▓█▓▌ ▓█▓ ▄▄, ▀▓▌") 27 | print(" █▀╜ ▄µ ╨▀▓▓▓▓██▌██▀█▓▓▓▓▓▓▌▀▓▓ ▀▓▓█▓▓█▌ ") 28 | print(" ▀▀▄▄▄▀▓▓▄▄ ╥▄▀█▓▓█▓▓▌█▓▓██▓█▓██▓▀▓▓ ▓▓▓▓█ ") 29 | print(" ╥,▄█▓▓▓▓▌ ╙▓▓▄,╥╥æ▓█▀▀└ ▄█▓▓╙▓▓█╫▓▓▀█▓█▓▓▓▓▓▌ ▄▄▓▓█▌ ▄▄▄ ") 30 | print(" ╨█▓▓██▓▓▓▓▌▄▄▓▓▀▀▌╫▓█▄▄▓█▓▀▀ ╙ ╙╙└▀██▀▀╙▀▀└ , ,▄▓▓▓▓▓█▓▓▓█F ") 31 | print(" ` ╙▀▀█▓▓▓▓██▓▌▀█▓█▓▓█▓▌ ,▄▄▄▄▓█ ▄▓▓█▄▄▓▓▓▓▓▓█▓▓▀╙ ") 32 | print(" ⁿ▄▄▓▓▓█▓▓▓▓▓▓█µ -█▓▓▓▓▓▓▓▄ ▓▓▓██▒▀█▓▓ ▄▓▓▓▓▌█▓▓▓▓▓▀ ") 33 | print(" ▀▓▓▓▓▓▓▓▓▓▓▓▓▓█ Å█▓▓▓▓▓▓▓▌ ▄█▓▓▓▓█▓▓██ █▓▓▓█▄█▓██▀ ") 34 | print(" ▀▀█▓█▓▌▀█▓▓▓█▄▄▄▓██▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▄███▓▓▓▓▓▓▓▌ ") 35 | print(" ▄█▓▓▓▓▓▓▓▓▓▓█▓▓▓█▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▀ ") 36 | print(" █▓▓▓▓▓▓▓▓▓▓▓▀,. █▓▓▓▓▓▓▓▓█▀▀▀▓█▓▓▓▓█▌▀ ") 37 | print(" ▐▌▀█▀▓▀▀██▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓█▓Γ ` ") 38 | print(" ▀▓█▓▓█▓▀▓▓▓▓▀╙▀▀▓█▀▀ ") 39 | print(" ============================================================= ") 40 | print(" OSINT MX ") 41 | print(" ============================================================= ") 42 | print(" osint x imss ") 43 | print(" ====================== ") 44 | print(" Author: Edgar Medina ") 45 | print(" ====================== ") 46 | print("") 47 | 48 | def main(): 49 | parser = argparse.ArgumentParser(description='Retrieve Mexican NSS aka IMSS, from a given CURP') 50 | parser.add_argument('curp', help='CURP to retrieve IMSS / NSS for') 51 | 52 | args = parser.parse_args() 53 | 54 | # Load API key from config.json 55 | with open('config.json') as f: 56 | config = json.load(f) 57 | api_key = config['rapidapi_key'] 58 | 59 | # Set up request headers and parameters 60 | url = "https://documentos-mex1.p.rapidapi.com/Imss/ExtraerNss" 61 | headers = { 62 | "X-RapidAPI-Key": api_key, 63 | "X-RapidAPI-Host": "documentos-mex1.p.rapidapi.com" 64 | } 65 | params = {"curp": args.curp} 66 | 67 | # Send request and print response 68 | response = requests.get(url, headers=headers, params=params) 69 | print(response.text) 70 | 71 | if __name__ == '__main__': 72 | main() 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OSINT MX 2 | ## OSINT x IMSS 3 | 4 | One of the few OSINT tools focused on Mexican citizens, retrieve and verify data about a Social Security Number aka IMSS from a given CURP. Insituto Mexicano del Seguro Social is a Mexican goverment dependency which deals and provides health and clinical services to Mexican citizens. This script is part of a collection of non-USA-focused-OSINT tools, designed to retrieve and verify data in the OSINT investigations context. Uses python's requests library and a config.json file containing your API keys managed by RapidAPI (available at RapidAPI.com), data points obtained aid to validate a Mexican citizen identity for OSINT research purposes, applied to missing person cases, fraud prevention and identity theft investigations. 5 | 6 | ## Prerequisites 7 | 8 | Python 3.x 9 | requests library (pip3 install requests) 10 | A valid subscription to RapidAPI and its IMSS API key. 11 | 12 | ## Installation 13 | 14 | Clone this repository to your local machine. 15 | Install the requests library by running pip install requests in your terminal. 16 | 17 | ## Configuration 18 | 19 | Open the config.json file in the root directory of the repository. 20 | Replace "your_api_key_here" with your actual IMSS/RapidAPI key. 21 | 22 | 23 | ## Usage 24 | 25 | In your terminal, navigate to the root directory of the repository. 26 | Run the following command: 27 | 28 | python3 OSINT-x-IMSS.py -h 29 | 30 | 31 | ╓▄▓▌▀▓▓▓▓@▄▄, 32 | .▄█▓▓▓▀╜└└╙╙▀▀▓▓▄¿ 33 | Å╙ ,▄▄▓▓▀▀▓█▀▀▄ 34 | , █▀▓▓▓▀▓▀Ñ▄▄▄▓▓▌ ,▓▓▓█▓▓▄, 35 | ,▄▓▓▀▀▀▓▓▓ █▀╫╫╫╫╫╫╫▓╩╨███ J█╫▓▓▓█▓╫▀▓▄ 36 | ╥▓▌Ñ██▓█▓▓╫╫▌ █▀▓▓▓▓▓▓▓▌ ▄█▀█ ▌╫▓█▓▓▓▓▓▓▓█▄¿ 37 | ╥▓█▓▓▓▓▓▓▓▓▓▒▓L ▐▓▓▓█▓▓▓▌▓▌ ▄█▌█ ,▌╫▀█▓▓▀▓▓█▓█▓▀▄ 38 | ▓▌▀▓▓▀████▀╫█▀█ █▓▓▓▓█▓▓▌▓▓█▓▀█ ▄▓╫╫▌▓▓▀▀█▓▓█╫▓▓▓█▄ 39 | ▄█▓▓▓█▓█▓█▓█▓▓▓▓▓▓▄▓▓▓▓▓▓▓▓▓▓▓▀▓▓█▓▓▓▓▓▓▓█▀█▄▒██▓▓▌█╫█╫█▓▓▄ 40 | ╥███▓╫▓╫▓╫█▀▓▓▓▓▓▀█▓▓█▓▓▓▓▓▓▓█▄▌▓█▌▀▓▓▀▓▀▓▓▓▓▓▓▓█▓█▓▀▌▀▌▓▓▓▓▌ 41 | ,█▓╫█╫█▀▓▓▓▌▓▓▓▓╫▓▓▀▒█▓▓▓╫█▀▀█▀▌▓█╫▓▓▓█▓▓▓▓▓▓▓▀▓▓▓▓▓█╫█▓█▓▓█▓▓█ 42 | █▓▓█▓█▓██▓▌██▓█▓█▓▒█▀█▓▓▓╫▌╫█▌▓▓██╫█╫▓▓▌▓▓▓▓▒▓█▓█▀██▓████▓██▓██▄ 43 | ▄█▓╫█▀█▀█▓█╫█▓▓╫▓╫█▓█▓█▓▓█▓█▓▌╫▌█▓█╫▓▓▓▓█▓▓▓█▓▓▓▓▓▓╫█╫█▓█▓▓█▓▓▓▓█ 44 | ╒██╫▓▓▓▌╫▓╫▌▓▌▓╫█▓▓▓╫▓╫▓██▓▓▓▓▀▀▌█▓▓▀▓▀▓▀▓╫▓▓▌╫▓╫▓╫▓╫█▓▓▓█▓█╫█▓▓█▓▄ 45 | █▓▀╫▓╫█▀█▓▓▓▓▓▌╫▌╫█▓▓▓╫█▓█▓▓▓▓▀▓▓█╫▓╫▌╫▌╫▓╫█╫▌╫█▓▓╫▓╫█▓╫█▀█▓▓╫▓█▓▓█ 46 | █▓╫▓▀╫▌╫█╫▌╫▌▓▌╫▌╫█╫╫█╫▓▓▓█▓█▓▓▄▌██▓▓▓▓▓▓▓╫▌╫▌╫▌╫▌╫█▓▀▀▓▓▓▀██▓▀▓█▓█ 47 | ▄▓▒▓▓▓█╫▓▓▓▓▀▀`▀▀█▓▓▓╫█▓▓▀███▓▀█▀▓▓█▒╫▒▓▓█▀▀▀▀▓▓▓▀▀▀` `▀█▓█▓▓▌▓▓▓█ 48 | █╫▓▓╫▓▀▓▌▓▀ └ ▀ ▄▌▀▓█▓▓▓▌█╫█▓█▓▓▓▓█▄ ▀▀▀▓╫▓▀▓█ 49 | █▓▓╫▓▌▓█▌ █▓▓██▓▓▓▌▄▓█▓███▓▓▓█▓▄ ▀▀▓╫▌ 50 | ▀▓╫▓█▓Ö ▀▓▓▒▓▓▓█▌█╫█▓▓▓▓▓▓█▓█▓▌ ▓█▓ ▄▄, ▀▓▌ 51 | █▀╜ ▄µ ╨▀▓▓▓▓██▌██▀█▓▓▓▓▓▓▌▀▓▓ ▀▓▓█▓▓█▌ 52 | ▀▀▄▄▄▀▓▓▄▄ ╥▄▀█▓▓█▓▓▌█▓▓██▓█▓██▓▀▓▓ ▓▓▓▓█ 53 | ╥,▄█▓▓▓▓▌ ╙▓▓▄,╥╥æ▓█▀▀└ ▄█▓▓╙▓▓█╫▓▓▀█▓█▓▓▓▓▓▌ ▄▄▓▓█▌ ▄▄▄ 54 | ╨█▓▓██▓▓▓▓▌▄▄▓▓▀▀▌╫▓█▄▄▓█▓▀▀ ╙ ╙╙└▀██▀▀╙▀▀└ , ,▄▓▓▓▓▓█▓▓▓█F 55 | ╙▀▀█▓▓▓▓██▓▌▀█▓█▓▓█▓▌ ,▄▄▄▄▓█ ▄▓▓█▄▄▓▓▓▓▓▓█▓▓▀╙ 56 | ⁿ▄▄▓▓▓█▓▓▓▓▓▓█µ -█▓▓▓▓▓▓▓▄ ▓▓▓██▒▀█▓▓ ▄▓▓▓▓▌█▓▓▓▓▓▀ 57 | ▀▓▓▓▓▓▓▓▓▓▓▓▓▓█ Å█▓▓▓▓▓▓▓▌ ▄█▓▓▓▓█▓▓██ █▓▓▓█▄█▓██▀ 58 | ▀▀█▓█▓▌▀█▓▓▓█▄▄▄▓██▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▄███▓▓▓▓▓▓▓▌ 59 | ▄█▓▓▓▓▓▓▓▓▓▓█▓▓▓█▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓█▀ 60 | █▓▓▓▓▓▓▓▓▓▓▓▀,. █▓▓▓▓▓▓▓▓█▀▀▀▓█▓▓▓▓█▌▀ 61 | ▐▌▀█▀▓▀▀██▓▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓█▓Γ 62 | ▀▓█▓▓█▓▀▓▓▓▓▀╙▀▀▓█▀▀ 63 | ============================================================= 64 | OSINT MX 65 | ============================================================= 66 | osint x imss 67 | ====================== 68 | Author: Edgar Medina 69 | ====================== 70 | 71 | usage: OSINT-x-IMSS.py [-h] curp 72 | 73 | Retrieve Mexican NSS aka IMSS, from a given CURP 74 | 75 | positional arguments: 76 | curp CURP to retrieve IMSS / NSS for 77 | 78 | options: 79 | -h, --help show this help message and exit 80 | 81 | 82 | 83 | The script will send a GET request to the IMSS API using the specified CURP and your RapidAPI key from the config.json file. 84 | If the request is successful, the script will print the data returned by the API. Otherwise, it will print an error message with the status code. 85 | The results print the data returned in json format. The data points retrieved are the following: curp, name(s), first surname, second surname, dob, sex, nss, origin state, age, clinic asigned, identifier key for the clinic, city, geolocation / lat-long, plus more. 86 | 87 | #### Author: Edgar Medina 88 | edgar.medina.m.ed@protonmail.com 89 | 90 | --------------------------------------------------------------------------------