如何阻止机器人发帖并引发异常
我有一个表格,任何人都可以填写对某事的评论,并且该表格不在登录区域内。
在越来越多的机器人试图输入垃圾邮件后,我开始使用验证码。 现在的问题是某种机器人并没有放弃。我每天都会收到大量异常电子邮件,因为机器人尝试输入“危险”数据,而 .NET 不允许这样做,因为请求已经过验证。 验证码根本没有帮助,因为甚至不需要填写它来尝试发布会导致异常的帖子。机器人似乎不明白它每次都会失败。
昨天我尝试更改文本框的名称,还添加了一个“蜜罐”。但这与验证码有同样的问题,异常发生在任何内容实际发布到后面的代码之前。
我真的应该设置 ValidateRequest="false" 以使机器人能够更进一步并可能停止发出请求吗?
所有的想法都非常值得赞赏。
I have a form where anyone can fill in a review about something and this form is not inside a login area.
I started to use captcha after more and more bots was trying to input spam.
The problem now is that some sort of bot just isn't giving up. I receive loads of exception emails everyday since the bot tries to input "dangerous" data and .NET doesn't allow this because the request is validated.
The captcha doesn't help at all since it doesn't even need to be filled in to try to make a post which will cause an exception. The bot doesn't seem to understand that it fails everytime.
Yesterday I tried changing the names of the text boxes and I also added a "honeypot". But it's the same problem as with captcha, the exception occurs before anything is actually posted to the code behind.
Should I really have to set ValidateRequest="false" to enable the bot to make it a step further and maybe stop making requests?
All ideas are very appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以:
我认为你可能必须将两者结合起来才能使其发挥作用。
You can either:
I think you might have to combine the 2 to get this to work.
也许机器人很愚蠢。不要使用 html 中的表单框,而是使用 JavaScript 对其进行加密。这可能会让机器人感到非常困惑。
Maybe the bot is quite stupid. Instead of having that form box in html encrypt it with javascript. It is possible that this will confuse the bot sufficiently.