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

UC Davis

Davis

Temporary/elsewhere

* 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"