简体   繁体   English

在浏览器中禁用java.awt.robot

[英]Disabling the java.awt.robot inside of a browser

Would it be possible to disable a Java program that contains a Robot from running inside of a browser? 是否可以禁用包含机器人的Java程序在浏览器内部运行? I don't think so, but I figured I'd ask anyway. 我不这么认为,但我想我还是会问。

For example, a robot that clicks the the "Ask Question" button on the SO site can be created in Java (based on the pixel location of the "Ask Question" button) using the Robot class. 例如,可以使用Robot类用Java(基于“问问题”按钮的像素位置)创建单击SO网站上“问问题”按钮的机器人。 Can somebody alter the stack-overflow website such that said Java program can't run on it? 有人可以更改堆栈溢出网站,使该Java程序无法在其上运行吗?

不,他们可以更改站点并移动按钮或添加验证码质询或类似的内容,但是从本质上讲,来自Java程序的请求与其他任何请求一样,都向SO服务器提供。

Web site admins really only have the request URL and the request headers for filtering or blocking traffic. 网站管理员实际上仅具有用于过滤或阻止流量的请求URL和请求标头。 You can't manage requests from java.awt.robot directly; 您无法直接管理来自java.awt.robot的请求; you'll have to look for something else to work with. 您将不得不寻找其他可以使用的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM