Visual captcha: Fighting blog spam

In the recent times my blog has been attacked by spammers and it's really annoying to delete 20-50 comments each day. I internally used Aksimet and some JavaScript tricks in hope that this would fight more spammers, but it didn't.

To solve this problem I wanted to use a captcha, but to make it more fun I wanted the captcha to be visual. After some looking around, I could not find this, so I implemented it myself.

The idea and implementation is:

  • The user is presented with 6 pictures, 5 bird pictures and 1 cat picture
  • The user has to pick the cat picture
  • Flickr is used for finding random pictures
  • The general idea isn't mine, but from Microsoft research's Asirra project

The new captcha system is live on the blog, try to post a comment to see it in action.

Screenshot

Visual Capatcha

Source code

Here is the code:

Feel free to port this code to other frameworks and other languages. The code is a bit unclean as I have copy-pasted it directly from Skeletonz.

Todo:

  • Add more picture randomness, it would be easy to crack this captcha if one knew which Flickr pages it fetched
  • Implement this as a library that can be used
Announcements · Code · Interesting · Skeletonz · Tips 25. Aug 2008
52 comments so far

testing

intentionally pick the wrong answer

Re-testing as well :)

hmmmm not a bad idea... would be great as a "pick the lolcat" one methinks. ;)

hi! visual captcha, kewlness!

Better check nr. of bad responses per ip or you will only have reduced the spam by 5/6th. (Assuming you are targeted directly)

Spand:
I think the new trend is that zombie networks are posting the spam, so it's hard to target them on their IP (I have looked into this).

testing

Cool idea, thanks for sharing

Although it takes some time to load on the first go...

woooo

The same thing was already done here.

http://www.thepcspy.com/kitten...

Testing and what a great idea!!!

just testing ...

@Shawn:
Seen that, but it didn't have any code or a demonstration.

Interesting.

Amix, I like your idea. Would give me a chance to share some of my photos too.

Test :/ .

Hi,

That is very cool. I am so sorry to bother you, but I can't get greybox to work.

I have tried two ways.
1 - I saved the scripts to my own website: http://www.suzannechandler.com...

and inserted this line in the footer:
::

but I get nothing.

So then I tried
2 - hotlinked (temporarily) off your scripts,

still get nothing.

Do you mind taking a look at my source code (I've labeled everything really clearly) and telling me where I've gone wrong?

THank you so much.

Best,

Suzanne

Curious captcha :-)

testing

testing :p

pretty cool

some spam from new evalution spam bot =)

lezze

testing the new amix.dk captcha system

Looks interesting!

got to test this, too :)

// make the images clickable to enhance usability ;)

nice

test

testing...

a

sasadf

adf

Just seeing

Let's see... :)

just trying

Trying it out!!! Oh yeah!

try

test

Not bad. Might use this for our site: http://abortaware.com/

....test!

Testing

test

cool i think all captures should be like that!
--tom

I'm willing to try anything to at least slow down the spam.

cool idea

Just testing :) And wonderful idea. Should perhaps ( if possible ) allow for a javascript free version so if we have noscript or just turn off javascript we could still post comments.

ddds

Thanks for sharing!

nice idea

Yes Visual captcha is working for you. But I guess textual is much better.

Post a comment
Commenting on this post has expired.
© 2000-2009 amix. Powered by Skeletonz.