I use Lynx web browser from remote SSH (so I have no GUI) to enter into the web interface of some router and access points.
It works fine with some Ovislink and Buffalo models I have tested, but it shows no info on screen when trying to navigate to two D-Link models. Authentication should be the first step on both devices, but Lynx does not ask me for it. The OvisLink model does not ask for password, but the Buffalo does, and Lynx request it OK as it must.
Case for D-Link DWL-2100AP:
DWL-2100AP
[Blank lines here]
Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back.
Arrow keys: Up and Down to move. Right to follow a link; Left to go back.
H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list
Case for D-Link DAP-2310 :
REFRESH(0 sec): http://192.168.1.231/index.php
[Blank lines here]
Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back.
Arrow keys: Up and Down to move. Right to follow a link; Left to go back.
H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list
This is the GUI first screen (the browser pops up a separate credentials window) for DWL-2100AP (older) model:
And this one is the D-Link DAP-2310 (credentials inside the web page):
Is there a way for Lynx to access these interfaces?
Further tests:
- Adding
-auth=ID:PASSWD
to thelynx IP
command, with same results.
Further data about the interfaces:
- It seems both devices use Java.
This is the starting HTML, obtained with curl
, that DWL-2100AP seems to send:
<html><head>
<script src="jsMain.js"> </script>
<title>DWL-2100AP</title></head>
<script language='JavaScript'>
document.cookie = 'RpWebID=3c26d7c1';
</script>
<script language='JavaScript'>
function JumpToHmain(){location.replace('/html/HomeWizard.html');}window.setTimeout('JumpToHmain()',1);</script>
Starting web page for DWL-2100AP (after inputing credentials):
http://IPAddress/html/HomeWizard.html
If I try to download it with curl (whether be it using -u username:password
or not):
<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>
Starting web page for DAP-2310 (requesting credentials page):
http://IPAddress/login.php
Attempt to reboot the DWL-2100AP via WGet (direct URL):
luis@Fresoncio:~$ wget http://admin:MyEditedPassword@192.168.1.232/Forms/RESET_Switch
converted 'http://admin:EditedPassword@192.168.1.232/Forms/RESET_Switch?FlagForReboot=' (ANSI_X3.4-1968) -> 'http://admin:MySecretPassword@192.168.1.232/Forms/RESET_Switch?FlagForReboot=' (UTF-8)
--2016-06-07 00:46:42-- http://admin:*password*@192.168.1.232/Forms/RESET_Switch?FlagForReboot=
Connecting to 192.168.1.232:80... connected.
HTTP request sent, awaiting response... 303 See Other
Location: http://192.168.1.232/html/HomeWizard.html [following]
converted 'http://192.168.1.232/html/HomeWizard.html' (ANSI_X3.4-1968) -> 'http://192.168.1.232/html/HomeWizard.html' (UTF-8)
--2016-06-07 00:46:42-- http://192.168.1.232/html/HomeWizard.html
Reusing existing connection to 192.168.1.232:80.
HTTP request sent, awaiting response... 404 Not Found
2016-06-07 00:46:42 ERROR 404: Not Found.
Lynx does not report of any need to accept cookies when browsing to DWL-2100AP.
The WireShark/TCPDump capture for the reboot attempt shows a GET to http://192.168.1.232/html/HomeWizard.html
with the description Authorization: Basic XXXXXXXXXX
and just below Credentials: admin:MyEditedPassword
. I think this could be Base64 encoding.
... and then I try WGet with --post-data for RpWebId=3c268b4c
and FlagForReboot=&Submit=+Restart+
:
~$ wget 192.168.1.232/Forms/RESET_Switch -post-data='RpWebId=3c268b4c' --post-data='FlagForReboot=&Submit=+Restart+'
converted 'http://192.168.1.232/Forms/RESET_Switch' (ANSI_X3.4-1968) -> 'http://192.168.1.232/Forms/RESET_Switch' (UTF-8)
--2016-06-07 10:29:25-- http://192.168.1.232/Forms/RESET_Switch
Connecting to 192.168.1.232:80... connected.
HTTP request sent, awaiting response... 303 See Other
Location: http://192.168.1.232/html/HomeWizard.html [following]
converted 'http://192.168.1.232/html/HomeWizard.html' (ANSI_X3.4-1968) -> 'http://192.168.1.232/html/HomeWizard.html' (UTF-8)
--2016-06-07 10:29:25-- http://192.168.1.232/html/HomeWizard.html
Reusing existing connection to 192.168.1.232:80.
HTTP request sent, awaiting response... 404 Not Found
2016-06-07 10:29:25 ERROR 404: Not Found.
This is the capture for the moment of the login:
GET /html/HomeWizard.html HTTP/1.1
Host: 192.168.1.232
User-Agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.6.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.232/
Cookie: RpWebID=3c267896
Connection: keep-alive
Authorization: Basic YWRtaWAAAAAhQXBpYQ==
The password part is the final YWRta...
part, ending on Q==
(The AAAAA
is mine, in order to obscure the real password). If I do echo YWRtaWAAAAAhQXBpYQ== | base64 --decode
the shell gives me admin:MyPassword
.
This is the reboot device page:
This is my attempt (see JigglyNaga answer) to access the reboot device page via CURL without sending the FlagForReboot
data:
$ IP_ADDRESS=192.168.1.232
$ curl -b "$COOKIE" -u "admin:MySecretPassword" $IP_ADDRESS/html/MntRestartSystem.html
<html><head>... etc
And this one sending the FlagForReboot
data (I would swear they are the same):
$ IP_ADDRESS=192.168.1.232
$ curl -b "$COOKIE" -u "admin:MySecretPassword" --data "FlagForReboot=&Submit=+Restart+" $IP_ADDRESS/html/MntRestartSystem.html
<html><head>
<title>DWL-2100AP</title><meta HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<LINK REL=stylesheet TYPE="text/css" HREF="web_style.css">
<script language="JavaScript" src="jsMain.js"></script>
<script language="JavaScript">
function ShowMessage(s){
// alert("Switch is rebooting and Web will be disconnected!");
var Msg='Device will reboot and web will be disconnected! Continue?';
if(confirm(Msg))
{
return true;
}
else
return false;
}
</script>
<style type="text/css">
font{
font-family:"Arial";
font-size:10pt;
}
</style>
</head><body BGCOLOR=#FFFFFF leftmargin="0" topmargin="0" onLoad="Change_Device_Name()">
<table width="75%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td><div align=center><img id="img_logo" src="" width="765" height="95"></div></td></tr><tr>
<td><table width=765 border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
<td rowspan=9 width="20" background="/Images/down_01.gif"> </td><td rowspan=2 width="133"> <img id="img_ap" src="" width=133 height=75></td><td rowspan=2 width="25" background="/Images/down_03.jpg"> </td><td width="21"> <img src="/Images/tools_04.jpg" width=21 height=49></td><td width="522"> <img src="/Images/tools_over_05.jpg" width=522 height=49 usemap="#MapMap" border="0"></td><td width="19"> <img src="/Images/tools_06.jpg" width=19 height=49></td><td width="25" background="/Images/down_11.gif"> </td></tr><tr>
<td width="21" background="/Images/down_14.gif"> </td><td rowspan=8 width="522" valign=top>
<FORM METHOD="POST" ACTION="/Forms/RESET_Switch"><INPUT TYPE="HIDDEN" NAME="FlagForReboot" VALUE="" id="FlagForReboot"> <table width="100%" border="0" height="100">
<tr >
<td colspan=2 align=left height="24" bordercolorlight="#FFFFFF" bordercolordark="#000000"><b><font face=Arial color=#8bacb1 size=2>
System Settings</font> </b></td></tr><tr>
<td align=left height="20" width=200>
<font face=Arial size=2> Apply Settings and Restart</font>
</td><td><INPUT TYPE="SUBMIT" NAME="Submit" VALUE=" Restart " onClick="return ShowMessage()"> </td></tr></table></form><FORM METHOD="POST" ACTION="/Forms/RESTORE_Switch"><INPUT TYPE="HIDDEN" NAME="FlagForReboot" VALUE="" id="FlagForReboot"> <table width="100%" border="0" height="110">
<tr>
<td align=left height="25" width=200>
<font face=Arial size=2> Restore factory settings </font>
</td><td><INPUT TYPE="SUBMIT" NAME="Submit" VALUE=" Restore " onClick="return ShowMessage()"> </td></tr><tr>
<td height=20 colspan=2>
<div align=right><a href=/html/help_tools.html#02 target=_blank><img src=/Images/help_p.jpg width=36 height=52 border=0></a></div></td></tr></table></form></td><td width="19"> <img src="/Images/down_10.jpg" width=19 height=26></td><td width="25" background="/Images/down_11.gif"> </td></tr><tr>
<td class="style1" width="133" height="57" align=center onClick="javascript:Link('MgtUserAccount.html')">Admin</td><td width="25" background="/Images/down_03.jpg" height="42"> </td><td width="21" background="/Images/down_14.gif" height="42"> </td><td width="19" background="/Images/down_40.gif" height="42"> </td><td width="25" background="/Images/down_11.gif" height="42"> </td></tr><tr>
<td class="style2" width="133" height="57" valign=middle align=center onClick="javascript:Link('MntRestartSystem.html')">System</td><td width="25" background="/Images/down_03.jpg"> </td><td width="21" background="/Images/down_14.gif"> </td><td width="19" background="/Images/down_40.gif"> </td><td width="25" background="/Images/down_11.gif"> </td></tr><tr>
<td class="style1" width="133" height="57" valign=middle align=center onClick="javascript:Link('MntUpdateFirmware.html?1')">Firmware</td><td width="25" background="/Images/down_03.jpg"> </td><td width="21" background="/Images/down_14.gif"> </td><td width="19" background="/Images/down_40.gif"> </td><td width="25" background="/Images/down_11.gif"> </td></tr><tr>
<td class="style1" width="133" height="57" valign=middle align=center onClick="javascript:Link('MntConfigurationFile.html?0,0,0,0,0,0,0,0,0')">Cfg File</td><td width="25" background="/Images/down_03.jpg" height="6"> </td><td width="21" background="/Images/down_14.gif" height="6"> </td><td width="19" background="/Images/down_40.gif" height="6"> </td><td width="25" background="/Images/down_11.gif" height="6"> </td></tr> <tr>
<td width="133" height="57" valign=middle align=center background="/Images/down_37.gif"> </td><td width="25" background="/Images/down_03.jpg"> </td><td width="21" background="/Images/down_14.gif"> </td><td width="19" background="/Images/down_40.gif"> </td><td width="25" background="/Images/down_11.gif"> </td></tr> <tr>
<td width="133" background="/Images/down_37.gif"> </td><td width="25" background="/Images/down_03.jpg"> </td><td width="21" background="/Images/down_14.gif"> </td><td width="19" background="/Images/down_40.gif"> </td><td width="25" background="/Images/down_11.gif"> </td></tr>
<tr>
<td width="133" background="/Images/down_37.gif"> </td><td width="25" background="/Images/down_03.jpg"> </td><td width="21" background="/Images/down_14.gif"> </td><td width="19" background="/Images/down_40.gif"> </td><td width="25" background="/Images/down_11.gif"> </td></tr><tr>
<td colspan=6 rowspan=2> <img src="/Images/down_43.jpg" width=740 height=44></td><td width="25"> <img src="/Images/down_45.gif" width="25" height="17"></td></tr><tr>
<td width="25"> <img src="/Images/down_44.gif" width=25 height=27></td></tr></table></td></tr></table><map id="MapMap" name="MapMap">
<area shape="rect" coords="17,17,82,45" href="/html/HomeWizard.html" target="_self"/>
<area shape="rect" coords="109,18,205,42" href="/html/CfgWLanParam.html?1" target="_self"/>
<area shape="rect" coords="232,19,289,46" href="/html/MgtUserAccount.html" target="_self"/>
<area shape="rect" coords="346,18,405,45" href="/html/DeviceInfo.html" target="_self"/>
<area shape="rect" coords="455,18,501,47" href="/html/help_men.html" target="_self"/>
</map>
</body></html>
And this is its TCPDump capture (the part that seems relevant) for that moment, as shown on WireShark:
Frame 4: 517 bytes on wire (4136 bits), 517 bytes captured (4136 bits)
Ethernet II, Src: 00:00:00_00:09:77 (00:00:00:00:09:77), Dst: D-LinkIn_24:f7:6d (c8:d3:a3:24:f7:6d)
Internet Protocol Version 4, Src: 192.168.1.99, Dst: 192.168.1.232
Transmission Control Protocol, Src Port: 44981 (44981), Dst Port: 80 (80), Seq: 1, Ack: 1, Len: 451
Hypertext Transfer Protocol
GET /html/MntRestartSystem.html HTTP/1.1\r\n
Host: 192.168.1.232\r\n
User-Agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.6.0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
Accept-Language: en-US,en;q=0.5\r\n
Accept-Encoding: gzip, deflate\r\n
Referer: http://192.168.1.232/html/MgtUserAccount.html\r\n
Cookie: RpWebID=3c26e560\r\n
Authorization: Basic YWRtaW46VmlhQXBpYQ==\r\n
Connection: keep-alive\r\n
\r\n
[Full request URI: http://192.168.1.232/html/MntRestartSystem.html]
[HTTP request 1/2]
[Response in frame: 15]
[Next request in frame: 17]
0000 47 45 54 20 2f 68 74 6d 6c 2f 4d 6e 74 52 65 73 GET /html/MntRes
0010 74 61 72 74 53 79 73 74 65 6d 2e 68 74 6d 6c 20 tartSystem.html
0020 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 HTTP/1.1..Host:
0030 31 39 32 2e 31 36 38 2e 31 2e 32 33 32 0d 0a 55 192.168.1.232..U
0040 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f 7a 69 6c ser-Agent: Mozil
0050 6c 61 2f 35 2e 30 20 28 58 31 31 3b 20 4c 69 6e la/5.0 (X11; Lin
0060 75 78 20 61 72 6d 76 37 6c 3b 20 72 76 3a 33 38 ux armv7l; rv:38
0070 2e 30 29 20 47 65 63 6b 6f 2f 32 30 31 30 30 31 .0) Gecko/201001
0080 30 31 20 46 69 72 65 66 6f 78 2f 33 38 2e 30 20 01 Firefox/38.0
0090 49 63 65 77 65 61 73 65 6c 2f 33 38 2e 36 2e 30 Iceweasel/38.6.0
00a0 0d 0a 41 63 63 65 70 74 3a 20 74 65 78 74 2f 68 ..Accept: text/h
00b0 74 6d 6c 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f tml,application/
00c0 78 68 74 6d 6c 2b 78 6d 6c 2c 61 70 70 6c 69 63 xhtml+xml,applic
00d0 61 74 69 6f 6e 2f 78 6d 6c 3b 71 3d 30 2e 39 2c ation/xml;q=0.9,
00e0 2a 2f 2a 3b 71 3d 30 2e 38 0d 0a 41 63 63 65 70 */*;q=0.8..Accep
00f0 74 2d 4c 61 6e 67 75 61 67 65 3a 20 65 6e 2d 55 t-Language: en-U
0100 53 2c 65 6e 3b 71 3d 30 2e 35 0d 0a 41 63 63 65 S,en;q=0.5..Acce
0110 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 pt-Encoding: gzi
0120 70 2c 20 64 65 66 6c 61 74 65 0d 0a 52 65 66 65 p, deflate..Refe
0130 72 65 72 3a 20 68 74 74 70 3a 2f 2f 31 39 32 2e rer: http://192.
0140 31 36 38 2e 31 2e 32 33 32 2f 68 74 6d 6c 2f 4d 168.1.232/html/M
0150 67 74 55 73 65 72 41 63 63 6f 75 6e 74 2e 68 74 gtUserAccount.ht
0160 6d 6c 0d 0a 43 6f 6f 6b 69 65 3a 20 52 70 57 65 ml..Cookie: RpWe
0170 62 49 44 3d 33 63 32 36 65 35 36 30 0d 0a 41 75 bID=3c26e560..Au
0180 74 68 6f 72 69 7a 61 74 69 6f 6e 3a 20 42 61 73 thorization: Bas
0190 69 63 20 59 57 52 74 61 57 34 36 56 6d 6c 68 51 ic YWRtaW46VmlhQ
01a0 58 42 70 59 51 3d 3d 0d 0a 43 6f 6e 6e 65 63 74 XBpYQ==..Connect
01b0 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d ion: keep-alive.
01c0 0a 0d 0a ...
Now trying to "press" that Reset
button via CURL (same result:
$ curl -v -u "admin:MySecretPassword" -b "$COOKIE" --data "FlagForReboot=&Submit=+Restart+" $IP_ADDRESS/Forms/RESET_Switch
* Hostname was NOT found in DNS cache
* Trying 192.168.1.232...
* Connected to 192.168.1.232 (192.168.1.232) port 80 (#0)
* Server auth using Basic with user 'admin'
> POST /Forms/RESET_Switch HTTP/1.1
> Authorization: Basic YWRtaW46VmlhQXBpYQ==
> User-Agent: curl/7.38.0
> Host: 192.168.1.232
> Accept: */*
> Cookie: RpWebID=3c270622
> Content-Length: 31
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 31 out of 31 bytes
< HTTP/1.1 303 See Other
< Location: http://192.168.1.232/html/HomeWizard.html
< Content-Length: 0
* Server Allegro-Software-RomPager/4.06 is not blacklisted
< Server: Allegro-Software-RomPager/4.06
<
* Connection #0 to host 192.168.1.232 left intact
A rether different results with -L
option for CURL:
$ curl -b "$COOKIE" --data "FlagForReboot=&Submit=+Restart+" $IP_ADDRESS/Forms/RESET_Switch -L
<html><head>
<title>DWL-2100AP</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<link rel=stylesheet type="text/css" href="web_style.css">
<script type="text/javascript" src="jsMain.js"></script>
<script type="text/javascript" src="WizardScript.js"></script>
<style type="text/css">
font{
font-family:"Arial";
font-size:10pt;
}
td.h30{
height:30px;
}
td.h60{
height:60px;
}
td.h80{
height:80px;
}
</style>
</head><body bgcolor="#ffffff" topmargin="0" onLoad="InitialSettings()">
<table border="0" align=center cellpadding="0" cellspacing="0">
<tr>
<td><img id="img_logo" src="" alt=""></td></tr><tr>
<td><table border="0" align=center cellspacing="0" cellpadding="0">
<tr><!-- row 1 -->
<td width=20 rowspan=3 background="/Images/down_01.gif"></td><td width=133 rowspan=2><img id="img_ap" src="" border="0" alt=""/></td><td width=25 background="/Images/down_03.jpg"></td><td width=21 background="/Images/down_04.jpg"></td><td width=522><img src="/Images/down_05.jpg" border="0" usemap="#MapMap"/></td><td width=19 background="/Images/down_06.jpg"></td><td width=25 background="/Images/down_11.gif"></td></tr><tr><!-- row 2 -->
<td background="/Images/down_03.jpg"></td><td height="26" background="/Images/down_14.gif"></td><td rowspan=3 valign=top>
<FORM METHOD="POST" ACTION="/Forms/FormWizard"><table border="0" width="100%" align=center cellpadding="0" cellspacing="0">
<tr>
<td colspan=2>
<!-- Beginning of Contents -->
<table width=510 border="0">
<tr>
<td colspan=2>
<font color="#8bacb1"><b>Setup Wizard</b></font>
<INPUT TYPE="HIDDEN" NAME="Run_Wizard" VALUE="0" id="Run_Wizard"> </td></tr> <tr>
<td height="150">
<b><font>
The <span id="APName0"></span> is a <span id="Device_Type"></span>.
The setup wizard will guide you through the configuration of the
<span id="APName1"></span>. The <span id="APName2"></span>'s easy
setup will allow you to have wireless access within minutes.
Please follow the setup wizard step by step to configure
the <span id="APName3"></span>.
</font></b>
</td></tr><tr>
<td> </td></tr><tr>
<td align=center>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE=" Run Wizard " id="Run_Wizard" onClick="formSubmit(1)" align=right> </td></tr><tr>
<td align=right>
<a href="help_home.html#01" target=_blank>
<img src="/Images/help_p.jpg" width="36" height="52" border="0">
</a></td></tr>
</table><!-- End of Contents -->
</td></tr></table></form>
</td><td background="/Images/down_10.jpg"></td><td background="/Images/down_11.gif"></td></tr><tr><!-- row 3 -->
<td valign=top background="/Images/down_37.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td class="style2" align=center valign=middle onClick="javascript:Link('HomeWizard.html')">Wizard</td></tr><tr>
<td class="style1" align=center valign=middle onClick="javascript:Link('Wireless.html?1')">Wireless</td></tr><tr>
<td class="style1" align=center valign=middle onClick="javascript:Link('CfgIpSetup.html')">LAN</td></tr></table></td><td background="/Images/down_03.jpg"></td><td background="/Images/down_14.gif"></td><td background="/Images/down_40.gif"></td><td background="/Images/down_11.gif"></td></tr><tr><!-- row 4 -->
<td height="150" background="/Images/down_37.gif"></td><td background="/Images/down_37.gif"></td><td background="/Images/down_03.jpg"></td><td background="/Images/down_14.gif"></td><td background="/Images/down_40.gif"></td><td background="/Images/down_11.gif"></td></tr><tr><!-- row 5 -->
<td colspan=6 rowspan=2><img src="/Images/down_43.jpg" border="0"></td><td><img src="/Images/down_45.gif" border="0"></td></tr><tr>
<td><img src="/Images/down_44.gif" border="0"></td></tr></table></td></tr></table><map id="MapMap" name="MapMap">
<area shape="rect" coords="17,17,82,45" href="/html/HomeWizard.html" target="_self"/>
<area shape="rect" coords="109,18,205,42" href="/html/CfgWLanParam.html?1" target="_self"/>
<area shape="rect" coords="232,19,289,46" href="/html/MgtUserAccount.html" target="_self"/>
<area shape="rect" coords="346,18,405,45" href="/html/DeviceInfo.html" target="_self"/>
<area shape="rect" coords="455,18,501,47" href="/html/help_men.html" target="_self"/>
</map>
<script type="text/javascript">
var Run_Wizard = document.getElementById("Run_Wizard");
var NewPwd = document.getElementById("NewPwd");
var CfmNewPwd = document.getElementById("CfmNewPwd");
var channel = document.getElementById("channel");
var WizardRootSsid = document.getElementById("WizardRootSsid");
var no = document.getElementById("No");
var wpa = document.getElementById("wpa");
var psk = document.getElementById("psk");
var keytype = document.getElementById("Wizard_KeyType");
var KeySize1 = document.getElementById("KeySize1");
var KeySize2 = document.getElementById("KeySize2");
var KeySize3 = document.getElementById("KeySize3");
var key = document.getElementById("Key");
var passphrase = document.getElementById("passphrase");
var cipher = document.getElementById("cipher");
var groupkey = document.getElementById("groupkey");
</script>
</body></html>
After that, there will be a confirmation screen for reboots:
I can add more data upon requests.
RpWebId=3c269679
and some POST dataFlagForReboot=&Submit=+Restart+
, while your request has neither. Look for--post-data
and--load-cookies/--save-cookies
in the wget manual . And yes, please include the earlier dump. – JigglyNaga Jun 07 '16 at 07:28--save-cookies
.. – Sopalajo de Arrierez Jun 07 '16 at 08:25wget
requires--auth-no-challenge
. Sometimes the server doesn't request it. Also, that's Javascript, not Java. – JigglyNaga Jun 07 '16 at 09:50wget 192.168.1.232/Forms/RESET_Switch -post-data='RpWebId=3c268b4c' --post-data='FlagForReboot=&Submit=+Restart+' --auth-no-challenge
directly as first command? No need to obtain the cookie first? I have heard that cookie could las only a few minutes. – Sopalajo de Arrierez Jun 07 '16 at 09:53RpWebId=...
is a cookie, not POST-data. See the links in my comment about getting wget and curl to understand cookies. And please clarify which of the APs you're using, as they seem to need different authentication methods. – JigglyNaga Jun 07 '16 at 09:58