<%@ Page MasterPageFile="~/Blankenthoughts.master" Title="Blankenthoughts" %>

Thursday, July 10, 2008

So I was wandering around the Microsoft Research site, and happened upon something I had not heard of before: Asirra. It's a new model for a CAPTCHA test, and it seems to be pretty simple to implement.

For those of you not familiar with the term CAPTCHA, it stands for "Completely Automated Public Turing test to tell Computers and Humans Apart." You've certainly seen them before on sites like Ticketmaster, where you're asked to enter some characters that are all skewed and blurry in an image. Here some examples:



The basic idea behind it is simple. You need a test that a human can pass, but that software cannot. Imagine if Ticketmaster DIDN'T have a CAPTCHA challenge on their site. When baseball tickets went on sale, or seats to the Radiohead concert become available, a scalper could fire up his software, buy ALL of the tickets, and then re-sell them at a significant profit somewhere else. You wouldn't have a chance.

But, by enforcing a CAPTCHA challenge, that scalper is only able to buy tickets in small quantities (maybe 10) at a time, before he's forced to visually interpret some data that only a human can read. A computer has a serious challenge in reading text that has been skewed accurately.

Enter Asirra. While only a project of the Microsoft Research team, it IS available for public consumption. It also challenges the idea that a CAPTCHA challenge needs to be letters and numbers that are jumbled up to be unreadable by optical character recognition (OCR) software. Instead, it presents you with a set of 12 images. They're all pictures of animals. It's up the human to determine which ones are cats. With over 3 million images currently available, and a database that grows in size by roughly 10,000 images per day, there's a good chance you'll never even see the same pictures twice. I've included an example of it on this page, but it's not part of a form, so it's just for display purposes. A link to a working sample of mine is in the next paragraph.





Using some simple javascript and a few lines of C#, I have built a page that demonstrates this powerful tool for keeping your site from being exploited. You can see the Asirra CAPTCHA in C# action here. Also important to note is that they have also provided this tool with code samples for using it with Python, PHP, C#, VB, JScript, and Perl. This is not tied to any Microsoft-specific tools or languages. In fact, the web service that runs the challenge is actually written in Python. My sample code running in C# can be downloaded here.

On top of the technical problem that this solves, it's also good for the pet community. All of the images come from PetFinder.com, and all of those animals are unwanted, but perfectly lovable animals in need of a home. Exposing their pictures and profiles to a larger audience can only help to find a place for some of these needy animals to live. I think these kinds of solutions have a certain elegance that you don't see much in software.

kick it on DotNetKicks.com

Labels: , , , ,

posted by Jeff Blankenburg, 9:11 AM | link | 8 comments |
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
November 2006
December 2006
January 2007
February 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
September 2008
Credit or Debit?
Reformatting my blog...
TUTORIAL: Using Javascript To Call A WCF Web Servi...
DevLink '08 in pictures...
.NET Rocks at DevLink!
Consuming Web Services In Silverlight
Obscure Knowledge: The Levenshtein Distance
Codestock 2008 - Photos In Review
Streaming Live From Codestock!
NBC Olympics - In Silverlight 2!