{"id":20886906,"url":"https://github.com/atao/shodan2db","last_synced_at":"2025-06-10T13:03:28.261Z","repository":{"id":184248156,"uuid":"670204753","full_name":"atao/Shodan2DB","owner":"atao","description":"🔌 Shodan export to SQLite database and generate an HTML report.","archived":false,"fork":false,"pushed_at":"2025-03-31T12:51:19.000Z","size":187,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T02:51:15.352Z","etag":null,"topics":["analysis","converter","cve","export","osint","python-class","python3","report","reporting","security","shodan","shodan-python","sqlite","vulnerability"],"latest_commit_sha":null,"homepage":"https://www.shodan.io/","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/atao.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,"zenodo":null}},"created_at":"2023-07-24T14:18:37.000Z","updated_at":"2025-03-31T12:51:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce7da5d1-9e99-44b7-9183-1f6bad0bb9c1","html_url":"https://github.com/atao/Shodan2DB","commit_stats":{"total_commits":60,"total_committers":1,"mean_commits":60.0,"dds":0.0,"last_synced_commit":"8919e1f6166bd0f0d5a6823b572c9ac2e2572081"},"previous_names":["atao/shodan2db"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atao%2FShodan2DB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atao%2FShodan2DB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atao%2FShodan2DB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atao%2FShodan2DB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atao","download_url":"https://codeload.github.com/atao/Shodan2DB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atao%2FShodan2DB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259080942,"owners_count":22802394,"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":["analysis","converter","cve","export","osint","python-class","python3","report","reporting","security","shodan","shodan-python","sqlite","vulnerability"],"created_at":"2024-11-18T08:18:26.022Z","updated_at":"2025-06-10T13:03:28.256Z","avatar_url":"https://github.com/atao.png","language":"Python","readme":"[![Lint Python](https://github.com/atao/Shodan2DB/actions/workflows/main.yml/badge.svg)](https://github.com/atao/Shodan2DB/actions/workflows/main.yml)\n\n# Shodan2DB\n\n🔌 Shodan export to SQLite database and generate an HTML report.\n\n## Purpose\n\nThe purpose of this tool is to parse Shodan export files and put them into a SQLite database.\n\nExports bypass the restriction on \"**vuln**\" and \"**tag**\" tags, which are only available with Small Business, Corporate or Enterprise accounts. These data are included present in Shodan exports.\n\nOnce in the database, it's easier to analyze the data and extract a list of machines with CVEs.\n\nGenerate a report of found CVEs with HTML template.\nCustomize the report in `templates/` folder using jinja2 and Bulma CSS.\n\n## Requirements\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage and options\n\n```bash\nUsage: shodan2db.py [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  export  Generate an HTML report from the data in the database.\n  parse   Parse the Shodan JSON export file and store data in the database.\n```\n\n- *Command parse*\n\n```bash\nUsage: shodan2db.py parse [OPTIONS]\n\n  Parse the Shodan JSON export file and store data in the database.\n\nOptions:\n  -i, --input-file PATH  JSON export file from Shodan.  [required]\n  -d, --database TEXT    Database name.  [required]\n  -v, --verbose          Verbose mode.\n  -h, --help             Show this message and exit.\n```\n\n- *Command export*\n\n```bash\nUsage: shodan2db.py export [OPTIONS]\n\n  Generate an HTML report from the data in the database.\n\nOptions:\n  -d, --database PATH       Path to the SQLite database file.  [required]\n  -o, --report-file PATH    Output path for the HTML report file.  [default:\n                            shodan.html]\n  -t, --template-file PATH  Template used for the report.  [default:\n                            report.html]\n  -v, --verbose             Verbose mode.\n  -h, --help                Show this message and exit.\n```\n\n## Quickstart\n\nDo a search and click on \"**Download Results**\".\n\n\u003cimg src=\"img/Shodan Export.png\"\u003e\n\nSelect the number of results to download.\n\n\u003cimg src=\"img/Shodan Results.png\"\u003e\n\nDownload your results.\n\n\u003cimg src=\"img/Shodan Download.png\"\u003e\n\nThen import the results into the database using the command :\n\n```bash\npython .\\shodan2db.py parse -i .\\example_shodan.json -d .\\example_database.db -v\npython .\\shodan2db.py export -d .\\example_database.db -o .\\example_report.html -v\n```\n\n**Tags** and **vulns** are visible directly in the **Summary** table.\n\n\u003cimg src=\"img/Summary.png\"\u003e\n\nExample of report :\n\n\u003cimg src=\"img/report.png\"\u003e\n\n## Templates\n\nCustomize the report template in [templates/report.html](templates/report.html)\n\nThe current one uses [Bulma CSS](https://bulma.io/).\n\n## Development\n\nUse Shodan2DB as python class\n\n```python\nimport shodan2db as sh\n\nsh.Shodan2DB.export(verbose=True, exportfile=\"test.html\", database=\"test.db\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatao%2Fshodan2db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatao%2Fshodan2db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatao%2Fshodan2db/lists"}