看起来我们将为Stack Overflow添加CAPTCHA支持。这对于防止机器人、垃圾邮件发送者和其他恶意脚本活动是必要的。我们只希望人类在这里发布或编辑东西!

我们将使用JavaScript (jQuery)验证码作为第一道防线:

http://docs.jquery.com/Tutorials:Safer_Contact_Forms_Without_CAPTCHAs

这种方法的优点是,对于大多数人来说,CAPTCHA永远不会可见!

然而,对于禁用JavaScript的人,我们仍然需要一个备用方案,这就是棘手的地方。

我为ASP编写了一个传统的CAPTCHA控件。NET,我们可以重复使用。

但是,我更倾向于使用一些文本化的东西,以避免为每个请求在服务器上创建所有这些图像的开销。

我见过这样的事情…

ASCII文本验证码:\/\/(_)\/\/ 数学难题:7减3乘以2等于多少? 小问题:癞蛤蟆和冰棍,哪个更好吃?

也许我只是在风车这里倾斜,但我希望有一个更少的资源密集型,非图像为基础的<noscript>兼容的验证码,如果可能的话。

想法吗?


当前回答

我有一些想法想和你们分享……

避免OCR的第一个想法

一个验证码对用户来说有一些隐藏的部分,但完整的图像是两个代码在一起,所以OCR程序和验证码农场读取图像,包括可见部分和隐藏部分,尝试解码它们,但未能提交…-我已经准备好解决这个问题,并在网上工作。

http://www.planethost.gr/IdeaWithHiddenPart.gif

第二个想法,让它更容易

一页有很多单词,人类必须选择正确的一个。我也创建了这个,很简单。文字是可点击的图像,用户必须点击正确的图像。

http://www.planethost.gr/ManyWords.gif

没有图像的第三个想法

和以前一样,但是有div和文本或小图标。用户必须只点击正确的一个div/字母/图像,无论如何。

http://www.planethost.gr/ArrayFromDivs.gif

最终想法——我称之为CicleCaptcha

还有一个我的CicleCaptcha,用户必须在图像上找到一个点。如果他找到并点击它,那么是一个人,机器可能会失败,或者需要制作新的软件来找到解决这个问题的方法。

http://www.planethost.gr/CicleCaptcha.gif

欢迎任何批评。

其他回答

If the main issue with not using images for the captcha is the CPU load of creating those images, it may be a good idea to figure out a way to create those images when the CPU load is "light" (relatively speaking). There's no reason why the captcha image needs to be generated at the same time that the form is generated. Instead, you could pull from a large cache of captchas, generated the last time server load was "light". You could even reuse the cached captchas (in case there's a weird spike in form submissions) until you regenerate a bunch of new ones the next time the server load is "light".

这句话的第五个单词是什么颜色?红色的吗?,蓝色,绿色?

(适当的颜色词)

简单的文字听起来很棒。贿赂社区来做这项工作!如果您像我一样相信,SO代表积分可以衡量用户帮助网站成功的承诺,那么提供声誉积分来帮助网站免受垃圾邮件发送者的侵害是完全合理的。

Offer +10 reputation for each contribution of a simple question and a set of correct answers. The question should suitably far away (edit distance) from all existing questions, and the reputation (and the question) should gradually disappear if people can't answer it. Let's say if the failure rate on correct answers is more than 20%, then the submitter loses one reputation point per incorrect answer, up to a maximum of 15. So if you submit a bad question, you get +10 now but eventually you will net -5. Or maybe it makes sense to ask a sample of users to vote on whether the captcha questionis a good one.

最后,就像每日信誉上限一样,假设没有用户可以通过提交验证码问题获得超过100个声誉。这是对此类贡献的权重的合理限制,也有助于防止垃圾邮件发送者在系统中植入问题。例如,你可以选择与提交者的声誉成比例的概率而不是相等概率的问题。乔恩·斯基特,请不要提交任何问题。

你试过http://sblam.com/en.html吗? 据我所知,这是验证码的一个很好的替代方案,而且对用户来说是完全透明的。

验证码过滤器的一个理论想法。向用户提出一个服务器可以简单回答的问题,用户也可以回答。共享答案成为用户和服务器都知道的一种公钥。

Stack Overflow的相关示例:

用户XYZ有多少声誉点?

提示:查看屏幕侧面的信息,或者点击这个链接。 用户可以从已知的堆栈溢出用户中随机抽取。

一个更一般的例子: 你住在哪里? 你住的地方星期六九点天气怎么样? 提示:使用雅虎天气,并提供湿度和一般条件。

然后用户输入他们的答案

西雅图 部分多云,湿度85%

计算机证实确实是西雅图当时的天气状况。

答案对用户来说是唯一的,但服务器有一种查找和确认答案的方法。

问题的类型可以多种多样。但其思想是,您对人类必须查找的事实组合进行一些处理,服务器可以简单地进行查找。这个过程是一个两部分的对话,需要一定程度的相互理解。这是一种反向转弯测试。让人类证明它可以提供可计算的数据,但它需要人类的知识来产生可计算的数据。

另一种可能的实现。你叫什么名字,什么时候出生的?

人会提供一个已知的答案,计算机可以在数据库中查找信息。

也许一个数据库可以由一个机器人来填充,但机器人需要一些智能来把相关的事实放在一起。服务器端的数据库或查找表可以被系统地删除明显的垃圾信息,如属性。

I am sure that there are flaws and details to be worked out in the implementation. But the concept seems sound. The user provides a combination of facts that the server can lookup, but the server has control over the kind of combinations that should be asked. The combinations could be randomized and the server could use a variety of strategies to lookup the shared answer. The real benefit is that you are asking the user to provide some sort of profiling and revelation of themselves in their answer. This makes it all the more difficult for bots to be systematic. A bunch of computers start using the same answers across many servers and captcha forms such as

我是1972年下午3:45出生的机器人。

然后,这种响应可以被整个网络分析和使用,以阻止机器人,有效地使自动化在几次迭代后变得毫无价值。

As I think about this more it would be interesting to implement a basic reading comprehension test for commenting on blog posts. After the end of a blog post the writer could pose a question to his or her readers. The question could be unique to each blog post and it would have the added benefit of requiring users to actually read before commenting. One could write the simple question at the end of a post with answers stored server side and then have an array of non sense questions to salt the database.

这篇文章谈到紫色验证码技术了吗? 服务器端回答(false, no)

这篇文章是关于验证码的吗? 服务器端回答(是,是)

这篇文章是关于迈克尔·杰克逊的吗? 服务器端回答(false, no)

以随机的顺序提出几个问题,并使这个顺序有意义,这似乎很有用。例如,上面的would = no, yes, no。打乱顺序,问一些无意义的问题,答案是“不是”和“是”。