How to transform your cheap webcam into a security surveillance camera
March 3rd, 2008This tutorial might be hard to understand but I’ll make it as simple as I can.
What you will need:
1)A webcam
2)A PC with internet connection
3)A few softwares which I’ll explain later
Concept:

Take a look at picture above. We are going to use a homemade software to capture images from webcam and send them to GMAIL account using Blat with a SSL conection. Don’t worry if you couldn’t understand a word, just keep reading.
Setup:
First you need to configure your webcam. Make sure it’s working and you can access it from [my computer]. If not, it’s not my task to explain how.
Download & configuring Stunnel
Stunnel is a program that allows you to encrypt TCP connections inside SSL. In short, we are going to use this thing to create a SSL connection to Google SMTP server.
1)Download the standalone version of Stunnel.
2)Download libssl32.dll and libeay32.dll.
3)Place 3 of them in a folder.
4)In that folder, create a stunnel.conf file using notepad. Make sure it’s not stunnel.conf.txt.
5)Copy and paste these lines to the stunnel.conf:
client = yes
taskbar = yes
[SMTP Gmail]
accept = 127.0.0.1:1099
connect = smtp.gmail.com:465
Double click on the Stunnel icon to run it. It should be minimized to your taskbar.

[you should get something like this]
Download & configure Blat
Blat is a win32 command line mailer, which we are going to use for sending email+attachment.
1)Download the latest version of Blat:
2)Extract the file and you will find a folder named ‘full’.
3)Create a ’send.bat’ file using notepad. Again, copy and paste these line, click save.(you need to change the eMail and pass value)
@echo off
set eMail=youremail@gmail.com
set pass=yourpass
set subj=-s “Daily Report”
set server=-server 127.0.0.1:1099
blat msg.txt -to %eMail% -attach tmp.jpg -f %eMail% %subj% %server% -u %eMail% -pw %pass%
Lastly, download this package and extract everything to the ‘full’ folder just now.

OK, you’re ready to go. Make sure Stunnel is running and double click on the home icon. Click on the start button to start capturing image.

[omg my house]
Every 30 seconds, your pc will send an image of your house/room to your GMAIL account.

Last words:
Don’t worry about space because the image size is too little compared to Gmail space limit. It might take a year or two to full it up. Running Stunnel, Blat and the image capturing software might eat your memory resource so use it wisely.

