{"id":18952440,"url":"https://github.com/devanshbatham/ip2cloud","last_synced_at":"2025-08-12T09:19:14.841Z","repository":{"id":186108998,"uuid":"674546547","full_name":"devanshbatham/ip2cloud","owner":"devanshbatham","description":"Check IP addresses against known cloud provider IP address ranges","archived":false,"fork":false,"pushed_at":"2023-08-09T08:59:25.000Z","size":200,"stargazers_count":44,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T05:12:20.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devanshbatham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-04T07:53:49.000Z","updated_at":"2025-03-12T07:04:11.000Z","dependencies_parsed_at":"2024-02-06T01:49:23.626Z","dependency_job_id":null,"html_url":"https://github.com/devanshbatham/ip2cloud","commit_stats":null,"previous_names":["devanshbatham/ip2cloud"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshbatham%2Fip2cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshbatham%2Fip2cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshbatham%2Fip2cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshbatham%2Fip2cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devanshbatham","download_url":"https://codeload.github.com/devanshbatham/ip2cloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249182565,"owners_count":21226090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T13:33:25.864Z","updated_at":"2025-04-16T01:33:58.895Z","avatar_url":"https://github.com/devanshbatham.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    ip2cloud\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eCheck IP addresses against known cloud provider IP address ranges\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003e🔧 Installation\u003c/a\u003e  \n  \u003ca href=\"#usage\"\u003e⚙️ Usage\u003c/a\u003e  \n  \u003ca href=\"#add-new-ip-ranges\"\u003e ⚡ Add New IP Ranges\u003c/a\u003e \n  \u003cbr\u003e\n\u003c/p\u003e\n\n![ip2cloud](https://github.com/devanshbatham/ip2cloud/blob/main/static/banner.png?raw=true)\n\n# Prerequisites\n\n- Python 3.x\n- intervaltree library (`pip install intervaltree`)\n- tqdm library (`pip install tqdm`)\n\n# Installation\n\n\n```sh\ngit clone https://github.com/devanshbatham/ip2cloud\ncd ip2cloud\nchmod +x setup.sh\n./setup.sh\n```\n\n\nNow, you can use `ip2cloud` from the command line to check IP addresses against known cloud provider IP address ranges.\n\n\n# Usage\n\n\n\n```sh\ncat input_ips.txt | ip2cloud\n```\n\nThe script will process the provided IP addresses and display the corresponding cloud provider for each IP address. Optionally, you can use the `-j` or `--json` flag to print the output in JSON format.\n\n\n\n### Example\n\nSuppose you have a file named `input_ips.txt` with the following IP addresses:\n\n```\n59.82.33.201\n63.32.40.140   \n63.33.205.240\n64.4.8.90 \n64.4.8.67\n```\n\nRun the script as follows:\n\n```sh\n(~)\u003e\u003e cat input_ips.txt | ip2cloud\n\n[aliyun] : 59.82.33.201\n[aws] : 63.32.40.140                         \n[aws] : 63.33.205.240        \n[azure] : 64.4.8.67 \n[azure] : 64.4.8.90   \n```\n\n- with `--json` or `-j` flag: \n\n\n```sh\n(~)\u003e\u003e cat input_ips.txt | ip2cloud -j\n\n{\n  \"aliyun\": [\n    \"59.82.33.201\"\n  ],\n  \"aws\": [\n    \"63.32.40.140\",\n    \"63.33.205.240\"\n  ],\n  \"azure\": [\n    \"64.4.8.90\",\n    \"64.4.8.67\"\n  ]\n}\n```\n\nIf no cloud provider is found for an IP address, it won't appear in the JSON or standard output.\n\n\n# Add New IP Ranges\n\nIf you want to add new IP ranges for cloud providers, follow these steps:\n\n1. Create a new text file in the `data` folder (e.g., `somecloud.txt`).\n2. Add the IP address ranges in CIDR notation to the new text file. Each range should be on a separate line.\n3. Run the parse_data script:\n\n```sh\npython3 parse_data.py\n```\n\nThe new IP ranges will be updated in the `cloud_data.json` file, and `ip2cloud` will use the updated data for IP lookups.\n\n\n### Note\n\n- The script only supports IPv4 addresses.\n- Make sure to keep the `cloud_data.json` file updated with the latest IP address ranges for the cloud providers you want to check.\n- `cloud_data.json` should be stored in `~/.config/.cloud-ranges` folder after running `setup.sh`\n\n\n# Supported Cloud Providers\n\nThe `data` folder contains IP address ranges for the following mentioned cloud providers, and you are welcome to add IP address ranges for any number of additional providers.\n\n- [x] Alibaba Cloud (Aliyun)\n- [x] Amazon Web Services (AWS)\n- [x] Microsoft Azure\n- [x] Cloudflare\n- [x] DigitalOcean\n- [x] Fastly\n- [x] Google Cloud\n- [x] IBM Cloud\n- [x] Linode\n- [x] Oracle Cloud\n- [x] Tencent Cloud\n- [x] UCloud\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevanshbatham%2Fip2cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevanshbatham%2Fip2cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevanshbatham%2Fip2cloud/lists"}