Posted on April 22, 2012 by Michael Rosario
Total Posts: 33 | Join date: 03-12-11
Honeypot works by having a hidden field in a form. Naturally, a spammer-bot will try to fill in every single field - including our trap - the Honeypot! However, why do I still get spam? Introducing, the Reverse Honeypot Captcha.
First we setup a Honeypot field. Try it out. This might be your first line of defense for a week or so until the spammer figure out your site.
For more information, Phil Haack wrote a nice post about it on his blog: Click here
Second, you fill this field by default.
<input id="NAME" type="text" style="display: none;" value="I'm a spammer" />
By itself, this will trigger honeypot to identify everyone as a spammer. Now, here is the concept for Reverse Honeypot Captcha. We introduce jQuery or plain javascript to remove the value of that field when an actual human being hovers on the submit button.
$('.Button').hover(function(){ $("#NAME").val(''); },function(){});
This jquery bit removes the value from the honeypot field when a user hovers the submit button.
Tags: There are no tags for this entry.
Posted on on May 31, 2012 at 6:37am
by jaffa
Posted on on June 17, 2012 at 3:49pm
by Stano
$(document).ready(function(){
$('form[name="form1"] input').each(function(){ this.setAttribute('tabIndex', '-1'); });
$('form[name="form1"] input[type="submit"]').hover(function(){ this.form.NAME.value='human'; },function(){});
//$('form[name="form1"]').submit(function(){alert(this.NAME.value);});//test
});
[removed]</head>
<body>
<form name="form1">
<input type="text" name="item1">
<input type="text" name="NAME" value="I'm a spammer" />
<input type="submit" name="send" value="Send">
</form>
Posted on on June 17, 2012 at 7:20pm
by Stano
$(document).ready(function(){
$('form[name="form1"] input[type="submit"]').hover(function(){ this.form.NAME.value='human'; },function(){});
$('form[name="form1"]').keypress(function(evt){ if (evt.which==13 || (evt.target.type=='submit' && evt.which==32)) return false; else return true; });
//$('form[name="form1"]').submit(function(){ alert(this.NAME.value); return false; });//test
});
Posted on on June 18, 2012 at 3:59am
by Stano
$(document).ready(function(){
$('form[name="form1"] input[type="submit"]').hover(function(){ this.form.NAME.value='human'; },function(){});
$('form[name="form1"]').keypress( function(evt){ return !(evt.which==13 && evt.target.type!='textarea'); });
$('form[name="form1"] input[type="submit"]').attr('tabIndex',-1); // prevent submiting by spacebar (keyCode==32)
});
Posted on on June 18, 2012 at 8:36am
by Michael Rosario
Posted on on June 18, 2012 at 5:30pm
by Stano
Posted on on January 18, 2013 at 5:46pm
by Chris