-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathst_device.asp
211 lines (201 loc) · 7.38 KB
/
st_device.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="css_router.css">
<title>D-LINK CORPORATION, INC | WIRELESS ROUTER | HOME</title>
<meta http-equiv=Content-Type content="text/html; charset=utf8">
<script language="JavaScript" src="lingual_EN.js"></script>
<script language="Javascript" src="public.js"></script>
<script language="JavaScript" src="public_msg.js"></script>
<script language="JavaScript">
var submit_button_flag = true;
function encode_base64(psstr) {
return encode(psstr,psstr.length);
}
function encode (psstrs, iLen) {
var map1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var oDataLen = (iLen*4+2)/3;
var oLen = ((iLen+2)/3)*4;
var out='';
var ip = 0;
var op = 0;
while (ip < iLen) {
var xx = psstrs.charCodeAt(ip++);
var yy = ip < iLen ? psstrs.charCodeAt(ip++) : 0;
var zz = ip < iLen ? psstrs.charCodeAt(ip++) : 0;
var aa = xx >>> 2;
var bb = ((xx & 3) << 4) | (yy >>> 4);
var cc = ((yy & 0xf) << 2) | (zz >>> 6);
var dd = zz & 0x3F;
out += map1.charAt(aa);
op++;
out += map1.charAt(bb);
op++;
out += op < oDataLen ? map1.charAt(cc) : '=';
op++;
out += op < oDataLen ? map1.charAt(dd) : '=';
op++;
}
return out;
}
function check()
{
var pwd=get_by_id("log_pass").value;
if(submit_button_flag){
get_by_id("login_name").value=encode_base64(get_by_id("login_n").value); // save to nvram
get_by_id("login_pass").value=encode_base64(pwd); // save to nvram
get_by_id("login_n").value=get_by_id("login_name").value; //set admin field value encode too..
get_by_id("log_pass").value=get_by_id("login_pass").value; //set password field value encode too..
var auth = "0";
if (auth == 1){
get_by_id("graph_id").value=encode_base64(get_by_id("graph_id").value);
get_by_id("graph_code").value=encode_base64(get_by_id("graph_code").value);
}
submit_button_flag = false;
}
return true;
}
function chk_KeyValue(e){
var salt = ""
if(browserName == "Netscape") {
var pKey=e.which;
}
if(browserName=="Microsoft Internet Explorer") {
var pKey=event.keyCode;
}
if(pKey==13){
if(check()){
send_submit("form1");
}
}
}
function AuthShow(){
get_by_id("show_graph").style.display = "none";
get_by_id("show_graph2").style.display = "none";
var auth = "0";
if (auth == 1){
get_by_id("show_graph").style.display = "";
get_by_id("show_graph2").style.display = "";
}
}
function OnPageLoad(){
var check_login = get_by_id("alert_id").value;
if(check_login == 1){
alert(li_alert_3);
}else if(check_login == 2){
alert(li_alert_4);
}else{
}
}
var browserName = navigator.appName;
document.onkeyup=chk_KeyValue;
</script>
</head>
<body topmargin="1" leftmargin="0" rightmargin="0" bgcolor="#757575" onLoad="document.form1.log_pass.focus();">
<table border=0 cellspacing=0 cellpadding=0 align=center width=30>
<tr>
<td></td>
</tr>
<tr>
<td>
<div align=left>
<table width=836 border=0 cellspacing=0 cellpadding=0 align=center>
<tr>
<td align="center" valign="baseline" bgcolor="#FFFFFF">
<table id="header_container" border="0" cellpadding="5" cellspacing="0" width="838" align="center">
<tr>
<td width="100%"> <script>show_words(TA2)</script>: <a href="http://support.dlink.com.tw/">DIR-655</a></td>
<td width="60%"> </td>
<td align="right" nowrap><script>show_words(TA3)</script>: B1 </td>
<td align="right" nowrap><script>show_words(sd_FWV)</script>: 2.09</td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="baseline" bgcolor="#FFFFFF">
<div align=center>
<table id="topnav_container" border="0" cellpadding="0" cellspacing="0" width="838" align="center">
<tr>
<td align="center" valign="middle"><img src="wlan_masthead.gif" width="836" height="92"></td>
</tr>
</table>
<br><br>
<table width="650" border="0">
<tr>
<td height="10">
<div id=box_header>
<H1 align="left"><script>show_words(li_Login)</script></H1>
<script>show_words(li_intro)</script><p>
<form name="form1" id="form1" action="login.cgi" method="post" onSubmit="return check();">
<input type="hidden" id="html_response_page" name="html_response_page" value="login.asp">
<input type="hidden" id="login_name" name="login_name">
<input type="hidden" id="login_pass" name="login_pass">
<input type="hidden" id="graph_id" name="graph_id" value="89e5e">
<input type="hidden" id="alert_id" name="alert_id" value="0">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr height="24">
<td width="30%"></td>
<td colspan="2"><b><script>show_words(_username)</script> : </b>
<select id="login_n" name="login_n">
<option value="admin"><script>show_words(_admin)</script></option>
<option value="user"><script>show_words(_user)</script></option>
</select></td>
</tr>
<tr height="24">
<td width="30%"></td>
<td colspan="2"><b><script>show_words(_password)</script> : </b>
<input type="password" id="log_pass" name="log_pass" value="" tabindex="120" onfocus="select();"/></td>
</tr>
<tr height="54" id="show_graph" style="display:yes">
<td width="30%"></td>
<td colspan="2" width="280"><b><script>show_words(_authword)</script> </b>
<input type="password" id="graph_code" name="graph_code" value="" maxlength="8" onfocus="select();"/></td>
</tr>
<tr id="show_graph2" style="display:yes">
<td width="30%"></td>
<td width="90" height="40"><img src="auth.bmp"></td>
<td><input class="button_submit_padleft" type=button name=Refresh id=Refresh value="" onClick="window.location.reload( true );" style="width:120 ">
<script>get_by_id("Refresh").value = regenerate;</script></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="25%"></td>
<td width="90"></td>
<td><br>
<input class="button_submit_padleft" type="submit" name="login" id="login" value="" style="width:120 ">
<script>get_by_id("login").value = li_Log_In;</script>
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<p> </p>
</div></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table id="footer_container" border="0" cellpadding="0" cellspacing="0" width="836" align="center">
<tr>
<td width="125" align="center"> <img src="wireless_tail.gif" width="114" height="35"></td>
<td width="10"> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table><br>
<div id="copyright">Copyright © 2004-2012 D-Link Corporation, Inc.</div>
</body>
<script>
AuthShow();
OnPageLoad();
</script>
</html>