[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:

[WebDNA] Sorry WebDNA server not running (2014) [ShowNext] (1997) More questions about serial number dishing (1997) Emailer tracking (1997) Virtual Postcards (1998) [WebDNA] test email (2014) Databases (2000) HELP WITH DATES (1997) Re:Emailer Set Up (1997) [showif] / [hideif] (1997) Ordering Fraction (2000) (1997) [WebDNA] Authentication across domains (2009) [append] problem (1997) writing cart to db (1998) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Summing fields (1997) Date Sorting (1997) Country & Ship-to address & other fields ? (1997) Missing from Docs [folderName] (1997)