[BULK] Re: [WebDNA] Security Images (Captcha)

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 100931
interpreted = N
texte = Here you go. I've added some comments, but it should be easy enough to follow. This does not use images, instead it creates a random number and then takes each digit of that random number and splits it up across multiple cells. However, it also takes a few more random numbers, set them to the background color, and interleaves them between the legitimate digits. So far this technique has not been cracked by any attack bot. I also left in the code which checks for required fields, and the error messages that show up if those fields are blank. ======================Code starts here==================================== [text]..fname=[/text] [text]..lname=[/text] [text]--errfname=[/text] [text]--errlname=[/text] [text]--errcaptchaverify=[/text] [!]------------------------------------------------------------------------ This section checks the captcha and sends the email -----------------------------------------------------------------------[/!] [showif [pass]=2] [!]-- let's decode the captchaverify code--[/!] [text]captchaverifytest=[decrypt seed=privatekey][captchaverify][/decrypt][/text] [hideif [url][captchaverifytest][/url]=[url][__captchacode][/url]] [text]--errcaptchaverify=T[/text] [text]pass=1[/text] [/hideif] [text]..fname=[removehtml][__fname][/removehtml][/text] [showif [url][..fname][/url]=][text]--errfname=T[/text][text]pass=1[/text][/showif] [text]..lname=[removehtml][__lname][/removehtml][/text] [showif [url][..lname][/url]=][text]--errlname=T[/text][text]pass=1[/text][/showif] [!]------ double check that we are still sending the email, if pass=1 then there is an error ------[/!] [showif [pass]=2] [sendmail] First name: [__fname] Last Name: [__lname] [/sendmail]
{This is where I put the thank you message for the user to see after successfully filling out the form}
[/showif] [/showif] [!]--------------------------------------------------------------------------------------------------------------- This section shows the form when the user first reaches the page, or if an error is found above ---------------------------------------------------------------------------------------------------------------[/!] [hideif [pass]=2]
[text]captchaverify=[random][random][random][/text] [showif [--errfname]=T] Please enter your first name. [/showif] First Name [showif [--errlname]=T] Please enter your last name. [/showif] Last Name [!]--- This is where the actual CAPTCHA is displaied on the screen ---[/!] [showif [--errcaptchaverify]=T] [/showif] [text]bgcolor=#00FF[getchars start=1&end=2][random][random][/getchars][/text] [text]fntcolor=#[getchars start=1&end=2][random][random][/getchars]00FF[/text]
Please re-enter the captchaverify code shown below.
To better protect your information, please enter the security code you see in the box here.
[getchars start=1&end=1][captchaverify][/getchars][getchars start=1&end=1][random][/getchars][getchars start=2&end=2][captchaverify][/getchars][getchars start=3&end=3][captchaverify][/getchars][getchars start=4&end=4][captchaverify][/getchars][getchars start=5&end=5][captchaverify][/getchars][getchars start=1&end=1][random][/getchars][getchars start=6&end=6][captchaverify][/getchars]


[/hideif] ======================Code ends here==================================== Matthew A Perosi | Psi Prime, Inc. | http://www.psiprime.com | http://en.wikipedia.org/wiki/Psi_Prime%2C_Inc | 323 Union Blvd. | Totowa, NJ 07512 | P: 973.413.8210 | F: 973.413.8217 | eddie@thinksite.com wrote: > Has anyone made a WebDNA version of image security (Captcha) for their > forms? I've used on on PHP sites, but not on any of my WebDNA sites, > and they are starting to get hit more often with spam. I haven't put > much thought into making my own, I thought I'd ask others first. > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > > Associated Messages, from the most recent to the oldest:

    
Here you go. I've added some comments, but it should be easy enough to follow. This does not use images, instead it creates a random number and then takes each digit of that random number and splits it up across multiple cells. However, it also takes a few more random numbers, set them to the background color, and interleaves them between the legitimate digits. So far this technique has not been cracked by any attack bot. I also left in the code which checks for required fields, and the error messages that show up if those fields are blank. ======================Code starts here==================================== [text]..fname=[/text] [text]..lname=[/text] [text]--errfname=[/text] [text]--errlname=[/text] [text]--errcaptchaverify=[/text] [!]------------------------------------------------------------------------ This section checks the captcha and sends the email -----------------------------------------------------------------------[/!] [showif [pass]=2] [!]-- let's decode the captchaverify code--[/!] [text]captchaverifytest=[decrypt seed=privatekey][captchaverify][/decrypt][/text] [hideif [url][captchaverifytest][/url]=[url][__captchacode][/url]] [text]--errcaptchaverify=T[/text] [text]pass=1[/text] [/hideif] [text]..fname=[removehtml][__fname][/removehtml][/text] [showif [url][..fname][/url]=][text]--errfname=T[/text][text]pass=1[/text][/showif] [text]..lname=[removehtml][__lname][/removehtml][/text] [showif [url][..lname][/url]=][text]--errlname=T[/text][text]pass=1[/text][/showif] [!]------ double check that we are still sending the email, if pass=1 then there is an error ------[/!] [showif [pass]=2] [sendmail] First name: [__fname] Last Name: [__lname] [/sendmail]
{This is where I put the thank you message for the user to see after successfully filling out the form}
[/showif] [/showif] [!]--------------------------------------------------------------------------------------------------------------- This section shows the form when the user first reaches the page, or if an error is found above ---------------------------------------------------------------------------------------------------------------[/!] [hideif [pass]=2]
[thisurl]"> [text]captchaverify=[random][random][random][/text] [url][encrypt seed=privatekey][captchaverify][/encrypt][/url]"> [showif [--errfname]=T] Please enter your first name. [/showif] First Name [showif [--errlname]=T] Please enter your last name. [/showif] Last Name [!]--- This is where the actual CAPTCHA is displaied on the screen ---[/!] [showif [--errcaptchaverify]=T] [/showif] [text]bgcolor=#00FF[getchars start=1&end=2][random][random][/getchars][/text] [text]fntcolor=#[getchars start=1&end=2][random][random][/getchars]00FF[/text]
Please re-enter the captchaverify code shown below.
To better protect your information, please enter the security code you see in the box here.
[getchars start=1&end=1][captchaverify][/getchars][getchars start=1&end=1][random][/getchars][getchars start=2&end=2][captchaverify][/getchars][getchars start=3&end=3][captchaverify][/getchars][getchars start=4&end=4][captchaverify][/getchars][getchars start=5&end=5][captchaverify][/getchars][getchars start=1&end=1][random][/getchars][getchars start=6&end=6][captchaverify][/getchars]


[/hideif] ======================Code ends here==================================== Matthew A Perosi | Psi Prime, Inc. | http://www.psiprime.com | http://en.wikipedia.org/wiki/Psi_Prime%2C_Inc | 323 Union Blvd. | Totowa, NJ 07512 | P: 973.413.8210 | F: 973.413.8217 | eddie@thinksite.com wrote: > Has anyone made a WebDNA version of image security (Captcha) for their > forms? I've used on on PHP sites, but not on any of my WebDNA sites, > and they are starting to get hit more often with spam. I haven't put > much thought into making my own, I thought I'd ask others first. > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > > "Psi Prime, Matthew A Perosi "

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

File commands and Wild Cards ?? (1998) WebDelivery: One step closer !! (1997) Error (1997) Hiding HTML and page breaks (1997) [WriteFile] problems (1997) Searching (second post) (1999) Cart# (1997) request for string functions (1998) shipping calcs (1998) Configuration Q (1998) Giving out error pages (1997) [addlineitems] display (1997) Help! WebCat2 bug (1997) Custom Error Pages in Apache (2006) Need relative path explanation (1997) Wonderin' whats the way (1998) RAM variables (1997) Text data with spaces in them... (1997) Wanted: Broader string manipulation functions (1997) Associative lookup style? + bit more (1997)