views:

60

answers:

3

I have a website where i want to put a custom made captcha, can't use online captcha services due to layout needs. It runs on google appengine. Does appengine API has a something for writing characters on a given image?

I went through appengine Python Image API but it doesnot seems to be of much help.

Any suggestions how to generate captcha on google appengine infrastructure?

+4  A: 

A quick google search will provide you with plenty of guides for integrating captch services with your AppEngine application. Here's one that uses reCaptcha.

Adam Crossland
i want to generate it on my own in appengine itself `custom captcha`, i know about recaptcha and used it a plenty of times but this time i have to limit the size of the image + customs colors. so i cant rely on any service..
Idlecool
There aren't any good answers for what you want to do. As @Drew notes, you are limited to pure Python, and performing the work to create a meaningfully-difficult to solve captcha is going to take a lot of time, and that is AppEngine's counter-use-case.
Adam Crossland
thanks.. i need to try such a python module instead.. i know it will take time but my client needs it.. do you know any such module.. alternative for PHP GD Library.
Idlecool
@Idlecool, I would not be surprised if there are some pure Python libraries for creating images, but I haven't personally used any of them, so I can't make a recommendation. However, I'd like to suggest in closing that as your client's subject-matter expert that you make a strong push to talk them out of building a custom captcha solution. It is a terrible idea on many levels. Do them a great favor and push back on this requirement.
Adam Crossland
@Adam: the need is the captcha should have a custom background/text+layout which should match the web site which i cannot get from recaptcha or anyother service. i worked on custom captcha in the past. but on php. now i am working on appengine.. new to python webdevelopment too.. does pure python module means the module itself should contain only python scripts with no c files or other?
Idlecool
@Idlecool, pure Python means that you can only use libraries that are 100% Python, so you can't use a python library that is just a wrapper around some C or C++. That is going to dramatically reduce your options, and I wouldn't be surprised if the kind of graphical operations that are required to make an effective captcha would take more time and CPU than is practical for an AppEngine application.
Adam Crossland
+1  A: 

Instead of creating your own impl. I recommend using a reliable service like reCaptcha: http://www.google.com/recaptcha

Alois Cochard
i need it for aesthetic purpose. can rely on any services.
Idlecool
You have aesthetic constraints on your _captcha_? Huh?
Nick Johnson
@Nick: the website is 2-color website.. cant hamper the look. :)
Idlecool
@Idlecool And that's really the most important consideration in implementing a CAPTCHA? Over and above security?
Nick Johnson
@Nick: Not exactly but implementing a general captcha do not take much expertise. I am not managing a google or facebook to worry much about spamming, even if i face more spamming in future i can easily replace it with recaptcha or i will enhance my own captcha up to the mark.
Idlecool
Implementing a captcha that isn't trivially broken by an automated system _does_ take expertise. If you're not worried much about spamming, use something simpler, like asking users to repeat a word or answer a simple question.
Nick Johnson
+1  A: 

Generally, you can't.

The Image API is designed for transforming existing images, not generating new ones.

Theoretically if you found a pure Python image creation library it would run on App Engine, but it would be slow.

Why not just leverage an external CAPTCHA service?

Drew Sears
do you know any captcha service which provides options for color and layout? i guess ReCaptcha doesnt.
Idlecool
I saw customized reCaptcha around the web ...
Alois Cochard
Python/GAE is not an ideal language for generating bitmaps and the like due to performance reasons, so finding a library for that is difficult I think. Maybe you can make the captcha with CSS, HTML5 canvas or SVG or something?
pthulin