Re: I wrote a captcha generator

2005-01-21 Thread Rick Root
Larry Lyons wrote:
> 
> thanks Rick, shall give it a try.

FYI, I moved the script to a different location:

http://www.it.dev.duke.edu/blogcfm/captcha_script/index.cfm



~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191360
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: I wrote a captcha generator

2005-01-21 Thread Larry Lyons
> Larry - that's just a default font file.  You can change it to any 
> truetype font - it should work quite nicely on any platform.
> 
  
> - Rick

thanks Rick, shall give it a try.

larry

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191356
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: I wrote a captcha generator

2005-01-20 Thread Rick Root
Larry Lyons wrote:
> 
> It works really well Rick. One question however, does it only work with 
> windows boxes? Or how much modification would it require to work on a *nix 
> box. For instance I saw this snippet in your code:
> 
> if (not isDefined("arguments.fontFile")) {
>  arguments.fontFile = "C:\WINDOWS\FONTS\comic.ttf";
> }

Larry - that's just a default font file.  You can change it to any 
truetype font - it should work quite nicely on any platform.

  - Rick


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 1/19/2005


~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191315
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: I wrote a captcha generator

2005-01-20 Thread Larry Lyons
>While working on my blog application ( www.webworksllc.com/blogcfm ) I 
>decided I needed some kind of captcha tool to help keep out the 
>spambots.  So with the help of a few java font rendering tutorials... I 
>wrote one, and am releasing it under the BSD open-source license.


It works really well Rick. One question however, does it only work with windows 
boxes? Or how much modification would it require to work on a *nix box. For 
instance I saw this snippet in your code:

if (not isDefined("arguments.fontFile")) {
 arguments.fontFile = "C:\WINDOWS\FONTS\comic.ttf";
}

thx,
larry

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191266
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: I wrote a captcha generator

2005-01-20 Thread Rick Root
Paul, that's a great idea.  I just implemented it =)

  - Rick

Paul Vernon wrote:
>>You can also put the image name in the form, which would allow 
>>you to delete it upon form submission. 
>>
>>Alternatively, you could just delete the images it
>>creates with a scheduled task. 
> 
> 
> You could use a cfm file to serve the image and use something like the
> following in the form..
> 
> 
> 
> Then use CFContent in servecaptcha.cfm to serve the image specified and auto
> delete it... Neat and tidy with no schedules or need to handle deletion in
> the form submission either :)
> 
> Paul
> 
> 
> 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191259
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: I wrote a captcha generator

2005-01-20 Thread Damien McKenna
How about defining an X*Y grid for each character and randomly placing
the character within these boundaries to add an extra element of
randomness?  Then maybe add a touch of rotation (no idea how to do that,
sorry)?

-- 
Damien McKenna - Web Developer - [EMAIL PROTECTED]
The Limu Company - http://www.thelimucompany.com/ - 407-804-1014
#include 


~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191246
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: I wrote a captcha generator

2005-01-20 Thread Paul Vernon
> You can also put the image name in the form, which would allow 
> you to delete it upon form submission. 
>
> Alternatively, you could just delete the images it
> creates with a scheduled task. 

You could use a cfm file to serve the image and use something like the
following in the form..



Then use CFContent in servecaptcha.cfm to serve the image specified and auto
delete it... Neat and tidy with no schedules or need to handle deletion in
the form submission either :)

Paul


~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191245
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: I wrote a captcha generator

2005-01-20 Thread Rick Root
Dawson, Michael wrote:
> Very nice.  I would suggest that you randomly stagger the vertical
> location of the text to make it that much harder to OCR.

good idea!  Done! =)

  - Rick

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191244
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: I wrote a captcha generator

2005-01-20 Thread Dawson, Michael
Very nice.  I would suggest that you randomly stagger the vertical
location of the text to make it that much harder to OCR.

-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 12:44 PM
To: CF-Talk
Subject: I wrote a captcha generator

While working on my blog application ( www.webworksllc.com/blogcfm ) I
decided I needed some kind of captcha tool to help keep out the
spambots.  So with the help of a few java font rendering tutorials... I
wrote one, and am releasing it under the BSD open-source license.

http://www.it.dev.duke.edu/blogcfm/captcha.cfm

it's pretty basic so far, but it works.

the function generates a 6 character alphanumeric string, and then
generates a png image based on that string, and returns the image name
and an MD5 hash for the string.  You can also put the image name in the
form, which would allow you to delete it upon form submission. 
Alternatively, you could just delete the images it creates with a
scheduled task.

You include the MD5 hash as a hidden form element.

The handling form should convert the user's entry to an MD5 hash, and
then compare it to the hidden form field.  If they match, SUCCESS!


  - Rick



~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191243
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54