def scan_network(): for i in range(1, 255): ip = f"{ip_range}{i}" for port in ports: url = f"http://{ip}:{port}{vulnerable_endpoint}" try: # Timeout set to 3 seconds to avoid lag response = requests.get(url, timeout=3) # Check for specific strings in the response if "viewerframe" in response.text and ("motion" in response.text or "upd" in response.text): print(f"[VULNERABLE] Found open stream at {url}") # Optionally, save the feed metadata with open("exposed_cameras.txt", "a") as f: f.write(url + "\n") except: pass # Connection refused or timeout
Stay secure, and keep your streams private.
vulnerable_endpoint = "/viewerframe?mode=motion"
if == " main ": print("Scanning internal network for 'viewerframe mode motion upd'...") scan_network()
One such powerful, niche string is .