使用Java的Net库时,我该如何伪造特定的浏览器客户端? [英] How do I fake an specific browser client when using Java's Net library?
本文介绍了使用Java的Net库时,我该如何伪造特定的浏览器客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的一个小程序刚刚坏了,因为,看来,我正在以编程方式浏览的网站现在假定Java请求来自手机,而我正在寻找的链接不在他们的手机页面上.
A small program of mine just broke because, it seems, the site I was programmatically browsing now assumes a Java request comes from a mobile phone, and the link I was looking for is not on their mobile page.
因此,我想伪造Internet Explorer访问权限.如何使用java.net做到这一点?
So I want to fake an Internet Explorer access. How do I do that with java.net?
推荐答案
IIRC,通过 System
, -D
在命令行上,您的JNLP文件中或其他位置.
IIRC, set "http.agent"
system property through System
, -D
on the command line, in your JNLP file or elsewhere.
这篇关于使用Java的Net库时,我该如何伪造特定的浏览器客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文