【问题标题】:Antibot spam protection on contact form联系表格上的反机器人垃圾邮件保护
【发布时间】:2012-05-15 09:44:31
【问题描述】:

我在我的 antibot 联系表中使用了这个,但我仍然收到大量邮件:

<script type="text/javascript">
var a = Math.ceil(Math.random() * 10);
var b = Math.ceil(Math.random() * 10);      
var c = a + b 
function DrawBotBoot()
{
 document.write("Antibot "+ a + " + " + b +" = ");
 document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>");
}    
function ValidBotBoot(){
    var d = document.getElementById('BotBootInput').value;
    if (d == c) return true;        
    return false;

}
</script>

有人可以帮我做这个要求让我们说“今年是什么”或类似的东西吗? 谢谢

【问题讨论】:

  • 这是用 JavaScript 编写的。大多数机器人不执行甚至不查看 JavaScript,这就是它被破坏的原因;他们只需提交没有 JS 的表单即可阻止它。
  • 使用reCaptcha
  • sigh 总是在服务器端验证你的东西...

标签: javascript spam bots


【解决方案1】:

对于出于任何原因不想使用 reCaptcha 并保留基本数学问题的人来说,这可能是限制机器人数量的解决方案: http://www.lateralcode.com/basic-math-security/

【讨论】:

    【解决方案2】:

    使用 CAPTCHA 保护自己免受 Bots 的侵害。 reCaptcha 之类的东西将满足您的需求。这将大大减少表单中的垃圾邮件数量。

    【讨论】:

      猜你喜欢
      • 2014-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多