Webcams

From davispedia
Revision as of 10:21, 6 September 2026 by Josh (talk | contribs) (Adding DavisWiki attribution template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: none of the UC Davis webcams work any more.

UC Davis

[edit | edit source]

Davis

[edit | edit source]

Temporary/elsewhere

[edit | edit source]

* You can control webcams marked with an asterisk.

Also see Surveillance Cameras. Not nearly as fun (really, you're on the other side of the lens).

Quick-n'-dirty webcam finder. If you don't understand it, it's not for you.

#!/usr/bin/env python
#"tcpclient.py": Quick-and-dirty webcam finder (with bugs, shortcomings). Hacker friendly.
#To run: "python -u tcpclient.py" from a shell.

import socket

def getdata(HOST):
string=gethost(HOST,"/")
if "URL=/view/index.shtml" in string:
string=gethost(HOST,"/view/index.shtml")
return string

def gethost(HOST,GET):

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1)
sock.connect((HOST,80))

sock.send("GET %s HTTP/1.1\r\n"%GET)
sock.send("Host: %s\r\n\r\n"%HOST)

string = ""
data = sock.recv(1024)
while len(data):
string += data
data = sock.recv(1024)
sock.close()
return string

a=169
b=237
for c in range(0,255+1):
for d in range(0,255+1):
HOST='%s.%s.%s.%s'%(a,b,c,d)
print "Trying %s..."%HOST,
try:
string=getdata(HOST)
except:
print "error\r",
else:
if "Camera" in string:
print "\a*****************************Camera found"


This article incorporates and modifies material from DavisWiki, authored by LocalWiki Contributors. The incorporated material is available under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.