
December 12, 2008 13:32 by
Corby
I'm curious if a little random number generation would do the trick or
if the same robots that can read the Captcha's could figure out this,
too. I guess I don't know enough about how the bad guys are able to defeat image Captchas on websites...but if you've got a .NET site, creating some simpl code tied to your comment or blog post submission button that generates random numbers and checks to see if the end-user can do the simple math would be an easy way of stopping bots from comment spamming.
This has always been my thought...and something I could whip up in 5 minutes with Visual Studio and C#.
int Rand1 //Random #1 (1-20)
int Rand2 //Random #2 (1-20)
int RandSign //Random math sign (1-2). If 1, sign is plus, if 2, sign is minus.
Display
Random #1 Random math sign Random #2
Type Answer here: ______
Submit Button
when the button's clicked:
if (Convert.ToInt32(this.txtRand1.Text) + Convert.ToInt32(this.txtRand2.Text) != Rand1 + Rand2) ||
(Convert.ToInt32(this.txtRand1.Text) - Convert.ToInt32(this.txtRand2.Text) != Rand1 - Rand2)
{
//Failed to match, probably robot, do not let them in
}
else
{
//They did good math, probably human, let'em in.
}
Are
these Captcha defeating robots able to screen scrape or something and
that's why something like this doesn't seem like it's implemented
anywhere on the web? Any thoughts on why this wouldn't work are welcome.
-Corby-
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5