互联网机器人 - 填写表格

发布于 2024-12-06 05:14:11 字数 1459 浏览 4 评论 0原文

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

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

发布评论

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

评论(3

梦里梦着梦中梦 2024-12-13 05:14:11

一些测试平台(例如 Watir)实际上执行鼠标和键盘操作,而不仅仅是 HTTP 请求(因此您在可以避免使用 JavaScript)。这意味着基本上不可能区分机器人和人类。像验证码这样的东西依赖于机器人无法正确识别图像中的一个或多个单词,但即使这样有时也可以通过 OCR

基本上,您可以采取许多措施来阻止机器人,但如果它们勤奋的话,几乎不可能阻止它们。

Some testing platforms like Watir actually perform mouse and keyboard actions instead of just HTTP requests (so any bot-prevention methods you do in Javascript could be avoided). This means it is basically impossible to differentiate between a bot and a human. Things like Captcha rely on bots being unable to correctly identify a word or words in an image, but even this can be broken some of the time with OCR.

Basically there are many measures you can put in place to discourage bots, but it's pretty much impossible to stop them if they are diligent.

迷你仙 2024-12-13 05:14:11

您并不特别需要总是下载源代码。您可以手动查找表单字段,然后构建提交的内容(几乎任何内容,例如 Python 脚本)。

<form action="submit.php" method="post">
<input name="url" />
<input name="name" />
<input type="submit" />
</form>

然后使用任何语言向 site.com/submit.php 发送 POST 请求。一般用数据“url=xxx&name=xxx”。

基于标签,尽管你不太可能使用 JS 或 HTML 来做到这一点。

You don't particular need to always download the source. You can do it manually to find out the form fields, then build something (almost anything, Python script for example) that submits.

<form action="submit.php" method="post">
<input name="url" />
<input name="name" />
<input type="submit" />
</form>

Then use whatever language to send a POST request to site.com/submit.php. Generally with the data "url=xxx&name=xxx".

Based on the tags though its unlikely you can do it with JS or HTML.

水中月 2024-12-13 05:14:11

看一下脚本语言的有状态浏览器。 Python 有一个名为 mechanize 的模块

Take a look at stateful browsers for scripting languages. Python has this module called mechanize

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