{"id":21129590,"url":"https://github.com/pimvh/nrich","last_synced_at":"2025-07-09T00:32:27.919Z","repository":{"id":151279176,"uuid":"481298279","full_name":"pimvh/nrich","owner":"pimvh","description":"Nrich.py is a tool to query the shodan internetdb","archived":false,"fork":false,"pushed_at":"2024-05-29T09:14:02.000Z","size":83,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-30T10:33:25.683Z","etag":null,"topics":["internetdb","python","shodan"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pimvh.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":"2022-04-13T16:47:25.000Z","updated_at":"2024-05-29T09:14:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2392e93-1320-464d-81a9-28255ee9a3cf","html_url":"https://github.com/pimvh/nrich","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnrich","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnrich/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnrich/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnrich/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pimvh","download_url":"https://codeload.github.com/pimvh/nrich/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225473898,"owners_count":17479870,"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":["internetdb","python","shodan"],"created_at":"2024-11-20T05:25:54.803Z","updated_at":"2024-11-20T05:25:55.282Z","avatar_url":"https://github.com/pimvh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nrich\n\nPython equivalent of the Rust [nrich](https://gitlab.com/shodan-public/nrich) program, developed by Shodan. Simple async Python program to interact with the Shodan InternetDB API.\n\nIn addition to the official tool, you can specify subnets, and this tool just unpacks them.\n\n## Usage\n\n`nrich --help`:\n\n```\nusage: nrich.py [-h] [-input-file INPUT_FILE] [-output-file OUTPUT_FILE] [-output-type {json,str}] [-skip_missing]\n\noptions:\n  -h, --help            show this help message and exit\n  -input-file INPUT_FILE, -i INPUT_FILE\n                        File to parse IPs from, if not given parse from stdin\n  -output-file OUTPUT_FILE, -o OUTPUT_FILE\n                        file to write IPs to\n  -output-type {json,str}, -t {json,str}\n                        Format to output in\n  -skip_missing, -s     skip IPs with no information on them.\n```\n\n### Standalone\n\nTo run this program as a standalone tool, run:\n\n```\npython3 -m nrich \u003cyour command\u003e\n```\n\nFor example, you can get the InternetDB information for a single IP, with the following command:\n\n```\necho -e \"\u003c\u003c your IP HERE\u003e\u003e\\n\" | python3 -m nrich\nINFO:root:creating queue and IPlookup object...\nINFO:root:creating tasks...\nINFO:ShodanLookupper:Starting session...\nINFO:root:running tasks...\nINFO:ShodanLookupper:Got response: ShodanResult(ip=None, cpes=[], hostnames=[], ports=[], tags=[], vulns=[], detail='No information available', empty=False)...\n{\"ip\": null, \"cpes\": [], \"hostnames\": [], \"ports\": [], \"tags\": [], \"vulns\": [], \"detail\": \"No information available\", \"empty\": false}\n```\n\nAny stdout piped input will be consumed by Shodan, when it is a file that contains IPs, line by line. Refer to the `--help` statement for usage when you want to consume files instead.\n\n### parse_internetdb.py\n\nExample script to parse the shodan internet.db output\n\n## Installation\n\nThis package is available via PyPi. In order to install you can use the following command\n\n```\npip install nrich\n```\n\n### Nix users\n\nFor users of nix a flake is avaible. Have a look at flake.nix for the targets.\n\nIf you just want a shell where the package is available, run:\n\n```\nnix develop\n```\n\n# License\n\nGPLv3, see license.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimvh%2Fnrich","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpimvh%2Fnrich","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimvh%2Fnrich/lists"}