{"id":51551351,"url":"https://github.com/phor3nsic/rtspwitness","last_synced_at":"2026-07-10T00:01:15.735Z","repository":{"id":367102899,"uuid":"1279257014","full_name":"phor3nsic/rtspWitness","owner":"phor3nsic","description":"Capture frames from RTSP streams and generate an elegant, paginated HTML report","archived":false,"fork":false,"pushed_at":"2026-06-24T14:15:12.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-24T16:12:46.317Z","etag":null,"topics":["camera","cctv","ip-camera","nmap","opencv","pentesting","python","reconnaissance","rtsp","security"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/phor3nsic.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-24T14:13:19.000Z","updated_at":"2026-06-24T14:16:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/phor3nsic/rtspWitness","commit_stats":null,"previous_names":["phor3nsic/rtspwitness"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/phor3nsic/rtspWitness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phor3nsic%2FrtspWitness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phor3nsic%2FrtspWitness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phor3nsic%2FrtspWitness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phor3nsic%2FrtspWitness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phor3nsic","download_url":"https://codeload.github.com/phor3nsic/rtspWitness/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phor3nsic%2FrtspWitness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35315894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["camera","cctv","ip-camera","nmap","opencv","pentesting","python","reconnaissance","rtsp","security"],"created_at":"2026-07-10T00:01:14.271Z","updated_at":"2026-07-10T00:01:15.729Z","avatar_url":"https://github.com/phor3nsic.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📹 rtspWitness\n\nA command-line tool that connects to a list of **RTSP** streams, captures a frame\nfrom each camera and generates an **elegant HTML report** with thumbnails, search,\nfilters, a lightbox and **pagination** for very large lists.\n\n![status](https://img.shields.io/badge/python-3.10%2B-blue) ![license](https://img.shields.io/badge/use-authorized-green)\n\n---\n\n## ✨ Features\n\n- 🚀 **Parallel capture** (multithreaded) with configurable timeout.\n- 🖼️ **HTML report** with dark theme, thumbnails and a fullscreen viewer (lightbox).\n- 🔎 **Search and filters** by host, URL or error — and by status (online / failed).\n- 📄 **Client-side pagination** (12/24/48/96 per page) for thousands of results.\n- 📊 Stats summary (total, captured, failed) and metadata (resolution, timestamp).\n- 🧩 Accepts URLs with or without the `rtsp://` prefix, skips comments (`#`) and duplicates.\n\n---\n\n## 📦 Installation\n\n```bash\n# (optional) virtual environment\npython3 -m venv .venv \u0026\u0026 source .venv/bin/activate\n\npip install -r requirements.txt\n```\n\n\u003e Requires **Python 3.10+**. OpenCV already ships with the FFmpeg backend needed for RTSP.\n\n---\n\n## ▶️ Usage\n\n```bash\npython main.py -l urls.txt -o output\n```\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `-l`, `--list` | File with one RTSP URL per line **(required)** | — |\n| `-o`, `--output` | Output folder | `rtspwitness_output` |\n| `-t`, `--timeout` | Connection timeout per camera (seconds) | `10` |\n| `-w`, `--workers` | Concurrent captures | `10` |\n\nFull example:\n\n```bash\npython main.py -l urls.txt -o output -t 15 -w 20\n```\n\nWhen it finishes, open **`output/report.html`** in your browser.\n\n```\noutput/\n├── images/            # captured .jpg frames\n└── report.html        # navigable report\n```\n\n---\n\n## 📄 URL list format\n\nOne target per line. The `rtsp://` prefix is optional and lines starting with `#` are ignored:\n\n```text\n# block A cameras\nrtsp://192.168.0.10:554/onvif1\n192.168.0.11:554/live.sdp\nrtsp://admin:password@192.168.0.12:554/Streaming/Channels/101\n```\n\n---\n\n## 🛰️ Generating the list with Nmap\n\n`nmap` is the fastest way to discover cameras exposing the RTSP port\n(default **554**, sometimes **8554**) and turn the result into the format this\nscript expects.\n\n\u003e ⚠️ **Only use this on networks and devices you are authorized to test.**\n\n### 1. Find hosts with RTSP open\n\n```bash\n# Scan the subnet for the RTSP port and save the \"greppable\" output\nnmap -p 554 --open -oG rtsp_scan.txt 192.168.0.0/24\n```\n\nTo also include the alternate port 8554:\n\n```bash\nnmap -p 554,8554 --open -oG rtsp_scan.txt 192.168.0.0/24\n```\n\n### 2. Convert the Nmap output into a URL list\n\nFrom the `-oG` (greppable) file, extract `IP:port` and build the URLs:\n\n```bash\ngrep \"Ports:\" rtsp_scan.txt \\\n  | awk '{print $2}' \\\n  | while read ip; do\n      port=$(grep \"Host: $ip \" rtsp_scan.txt | grep -oE '[0-9]+/open' | cut -d/ -f1 | head -1)\n      echo \"rtsp://$ip:$port/\"\n    done \u003e urls.txt\n```\n\n**Simple version** (assumes port 554, which covers most cases):\n\n```bash\ngrep \"554/open\" rtsp_scan.txt | awk '{print \"rtsp://\" $2 \":554/\"}' \u003e urls.txt\n```\n\n### 3. (Optional) Identify the stream path\n\nMany cameras require a specific *path* (e.g. `/onvif1`, `/live.sdp`,\n`/Streaming/Channels/101`). The Nmap NSE script helps identify them:\n\n```bash\nnmap -p 554 --script rtsp-url-brute 192.168.0.0/24\n```\n\nAppend the discovered path to the URLs in `urls.txt`. Common paths:\n\n```text\n/                              # generic\n/live.sdp                      # various vendors\n/onvif1                        # ONVIF\n/Streaming/Channels/101        # Hikvision\n/cam/realmonitor?channel=1\u0026subtype=0   # Dahua\n/h264Preview_01_main           # Reolink\n```\n\n### 4. Run rtspWitness\n\n```bash\npython main.py -l urls.txt -o output -w 20\n```\n\n---\n\n## 🔧 Tips\n\n- **Lots of failures?** Increase `--timeout` (slow cameras) or lower `--workers`.\n- **Credentials:** include them in the URL → `rtsp://user:password@ip:554/path`.\n- **Large report:** pagination is automatic; use the \"N / page\" selector and the search box.\n\n---\n\n## ⚖️ Legal notice\n\nThis tool is intended for **authorized security testing**, internal audits and\neducational purposes. Using it against systems without explicit permission may be\nillegal. You are solely responsible for how you use it.\n\n---\n\n## 📜 License\n\nReleased under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphor3nsic%2Frtspwitness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphor3nsic%2Frtspwitness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphor3nsic%2Frtspwitness/lists"}