我可以通过网络浏览器(在 GUI 上)毫无问题地访问设备的配置页面。
但使用 cURL 似乎不起作用:
luis@Fresoncio:~$ curl http://192.168.1.232
<html><head>
<script src="jsMain.js"> </script>
<title>DWL-2100AP</title></head>
<script language='JavaScript'>
document.cookie = 'RpWebID=57562c4e';
</script>
<script language='JavaScript'>
function JumpToHmain(){location.replace('/html/HomeWizard.html');}window.setTimeout('JumpToHmain()',1);</script>
接受 cookie 会得到相同的结果:
luis@Fresoncio:~$ curl http://192.168.1.232 -c cookie.txt
<html><head>
<script src="jsMain.js"> </script>
<title>DWL-2100AP</title></head>
<script language='JavaScript'>
document.cookie = 'RpWebID=57562c5c';
</script>
<script language='JavaScript'>
function JumpToHmain(){location.replace('/html/HomeWizard.html');}window.setTimeout('JumpToHmain()',1);</script>
但是,如果我尝试进入初始/html/HomeWizard.html
配置页面(这次我尝试发送用户名和密码,只要我认为需要):
luis@Fresoncio:~$ curl -i -H 'Accept:application/json' -H 'Authorization:Basic admin:MyEditedPassword' http://192.168.1.232/html/HomeWizard.html
HTTP/1.1 404 Not Found
Content-Type: text/html
Transfer-Encoding: chunked
Server: Allegro-Software-RomPager/4.06
Connection: close
<html>
<head>
<title>Object Not Found</title></head><body>
<h1>Object Not Found</h1>The requested URL '/html/HomeWizard.html' was not found on the RomPager server.<p>Return to <A HREF="">last page</A><p>
没有该部分的测试Accept/application/json
:
luis@Fresoncio:~$ curl -i -H 'Authorization:Basic admin:MyEditedPassword' http://192.168.1.232/html/HomeWizard.html
HTTP/1.1 404 Not Found
Content-Type: text/html
Transfer-Encoding: chunked
Server: Allegro-Software-RomPager/4.06
Connection: close
<html>
<head>
<title>Object Not Found</title></head><body>
<h1>Object Not Found</h1>The requested URL '/html/HomeWizard.html' was not found on the RomPager server.<p>Return to <A HREF="">last page</A><p>
</body></html>
通过 Firefox 导航来访问 GUI 完全没有问题http://192.168.1.232/html/HomeWizard.html
(当然,在输入凭据之后)。
这是怎么回事?我该如何解决?
更多数据:
- 该网站使用Java,至少我是这样认为的。