using PIL for anti-automation in ASP

Jay Dorsey jay at jaydorsey.com
Wed Oct 22 14:49:44 EDT 2003


Doug R wrote:

> I'm trying to create an anti-automation feature to prevent scripts
> from running reports on our website by requiring users to enter a code
> from an image (like Yahoo e-mail sign-up, or Network Solutions WHOIS
> search).
> 
> I'm using Python as the scripting language in the ASP page, and using
> PIL to generate the image. The code is stored into a session variable,
> which is used to check the user's entry. It works fine the first time
> around, but the problem I'm running into is that the page doesn't
> refresh properly if the user returns to it. It just returns a blank
> page.
> 

Maybe the users browser is caching the image/page?  Try a unique image 
name each time, or appending a date/time stamp to the image name 
(image.gif?blah=12345).  First, if you're using IE, you could also 
disable page/image caching in the browser (you can do this in Mozilla 
too I think, and other browsers).

Jay






More information about the Python-list mailing list