检测服务器上的机器人?

发布于 2024-08-02 09:07:42 字数 381 浏览 2 评论 0原文

这个问题有点扩展了我的有关机器人和验证码的其他问题。我按照大家的建议做了(谢谢大家!),但是是否有可能首先检测服务器上的机器人?例如(我将再次使用 Stackoverflow 作为参考):有时当我提出问题时,Stackoverflow 会回来要求我验证我是否是人类。 然而,有时却并非如此。

Stackoverflow 是如何做到这一点的,因为这就是我想做的:检查数据,如果它看起来像机器人,则请求人工验证。

此外,这还需要在 Java(最好)、Perl 或 PHP 上完成。

This question sort of extends my other question on robots and captcha. I did what everyone recommend (thanks everyone!), however is it at all possible to detect a robot on the server first? For Example (Once again, I will use Stackoverflow as a reference): Sometimes when I ask a question, Stackoverflow comes back asking me to verify if I am human.
However, sometimes it does not.

How does Stackoverflow do that, because that is what I want to do: Check data and if it looks like a robot, request human verification.

Also this needs to be done on Java (preferably), Perl or PHP.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

榕城若虚 2024-08-09 09:07:42

在 StackOverflow 上,这是通过太快地执行同一任务太多次或太快地执行多个任务来完成的。

如果您想模仿这一点,您可以跟踪最近请求的数量和时间,并检查一切是否在您的限制范围内。如果不是,请重定向到验证码。

不幸的是,我没有足够的 Java EE 经验来提供任何代码,但希望我的方法能给您一些想法。

On StackOverflow, it's done by performing the same task too many times too quickly or performing multiple tasks too quickly.

If you want to emulate this, you can keep track of the number and time(s) of recent requests and check to see that everything is within your limits. If it isn't, redirect to a CAPTCHA.

Unfortunately, I don't have enough Java EE experience to provide any code, but hopefully my approach will give you some idea(s).

濫情▎り 2024-08-09 09:07:42

简单的方法是记录活动(点击、评论等),然后检查这些活动之间的频率和相似性。您通常可以通过查找重复执行的类似任务来检测机器人。

如果您真的认真对待机器人检测,请记录每次击键和鼠标移动。普通用户在打字和浏览网站时会遇到一定比例的错误和不确定性。一个 100% 无拼写错误的用户,能够轻松快速地浏览网站(将鼠标从 a 点直线移动到 b 点),而无需使用后退按钮,那么该用户很可能是机器人。

The simple method would be to log activity (clicks, comments, ect.) and then check the frequency and similarity between these. You can usually detect robots by looking for similar tasks performed repeatedly.

If you are really serious about robot detection, log every keystroke and mouse movements. Regular users have a percentage of error and uncertainty associated with typing and navigating the site. A 100% typo free user that navigates the site easily and quickly (moving the mouse on a straight line from point a to point b) without ever going for the back button is very likely to be a bot.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文