EddyPalmieri

Untitled

Jun 20th, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.25 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <link rel="stylesheet" href='stylemain.css' type='text/css'>
  5. <title>D-Link ADSL Router</title>
  6. <script language="javascript" src="aye_util.js"></script>
  7. <script language="javascript">
  8.  
  9. if(FAKEUI == true)
  10. {
  11. var Lang = [{'language':'en'}];
  12. var passwdInfo = [{'username':'', 'timeout':'10','captcha':'0'}];
  13. var status_general = [{'name':'DSL-2750B','currenttime':'Wednesday, October 10, 2012 09:46:10 AM','fwversion':'DSL-2750B_2.03_WI_20120704','releaseDate':'2012/10/13'}];
  14. }
  15. else
  16. {
  17. var Lang = eval("[{'language':'en'}]");
  18. var passwdInfo = eval("[{'adminUserName':'admin','supportUserName':'support','userUserName':'user','timeout':'10','captcha':'0'}]");
  19. var status_general = eval("[{'name':'AW5200U','ModelName':'DSL-2750B-D1','currenttime':'Monday, June 20, 2016 21:03:04','fwversion':'DSL-2750B_1.02_WI_20141113','releaseDate':'2014.11.13-03:17:01'}]");
  20. }
  21. var language =( typeof(Lang[0].language) !== 'undefined' && Lang[0].language != 'unknown' && Lang != null ) ? Lang[0].language : 'en' ;
  22. Set_Cookie( 'MultiLingual', language, '1', '/');
  23.  
  24. var ReleaseDate = '';
  25. var FirmVer = status_general[0].releaseDate;
  26. var ImageDateTime = FirmVer.split("-");
  27. var ImageDate = ImageDateTime[0].split(".");
  28. for(i=0;i<ImageDate.length;i++)
  29. {
  30. ReleaseDate += ImageDate[i];
  31. }
  32. Set_Cookie( 'ReleaseDate', ReleaseDate, '1', '/');
  33.  
  34. document.write("<script language='javascript' charset='utf-8' src='js\/"+language+"\/glb_str.js'><\/script>");
  35. document.write("<script language='javascript' charset='utf-8' src='js\/"+language+"\/login.js'><\/script>");
  36. </script>
  37.  
  38. <script language="javascript">
  39. <!--
  40. var accessmode = '';//lan or wan
  41. var captchaEnbl= passwdInfo[0].captcha;
  42.  
  43. var login_remember = 0;
  44. var login_password = 0;
  45.  
  46. var loginerrflag = false;
  47.  
  48. //check login authentication
  49. if(typeof(aye_response) !== 'undefined' && aye_response != null) {
  50. var msg1 = aye_response.split("!!");
  51. if(msg1[0]!='Status:0'){
  52. // Remove cookie
  53. deleteAllCookies();
  54. loginerrflag = true;
  55.  
  56. }else{
  57. var sessionKey = aye_response.split("sessionkey=")[1];
  58. login_remember = Get_Cookie('aye_remember');
  59. if(login_remember == 1)
  60. {
  61. login_password = Get_Cookie('password');
  62. }
  63. else
  64. {
  65. login_remember = 0;
  66. login_password = 0;
  67. Delete_Cookie('aye_remember','/','');
  68. Delete_Cookie('password','/','');
  69. }
  70. Set_Cookie( 'sessionKey', sessionKey, '1', '/');
  71. ayeSubmit('location=\'index.html\'');
  72. }
  73. }else{
  74. // Remove cookie
  75. login_remember = Get_Cookie('aye_remember');
  76. if(login_remember == 1)
  77. {
  78. login_password = Get_Cookie('password');
  79. }
  80. else
  81. {
  82. login_remember = 0;
  83. login_password = 0;
  84. Delete_Cookie('aye_remember','/','');
  85. Delete_Cookie('password','/','');
  86. }
  87. deleteAllCookies();
  88. }
  89.  
  90. function frmLoad(){
  91. with ( document.forms[0] )
  92. {
  93. if(loginerrflag == true)
  94. {
  95. tryagain_btn.value = aye_btn(glb_try_again_btn);
  96. document.getElementById('loginerror').style.display='';
  97. document.getElementById('maincontent').style.display='none';
  98. }
  99. if(login_remember == 1)
  100. {
  101. loginfo.checked = true;
  102. password.value = login_password;
  103. }
  104. }
  105. }
  106.  
  107. if(typeof(UPNP_DEV_MODEL_DESCRIPTION) == 'undefined')
  108. {
  109. var ModemVer = 'undefined';
  110. }
  111. else
  112. {
  113. var ModemVer = UPNP_DEV_MODEL_DESCRIPTION;
  114. }
  115.  
  116. if(typeof(AYECOM_AREA) == 'undefined' || typeof(AYECOM_FWVER) == 'undefined')
  117. {
  118. var FirmwareVer = 'undefined';
  119. }
  120. else
  121. {
  122. var FirmwareVer = UPNP_DEV_MODEL_DESCRIPTION + '_' + AYECOM_FWVER + '_' + AYECOM_AREA + '_' + ReleaseDate;
  123. }
  124.  
  125. if(typeof(AYECOM_HWVER) == 'undefined')
  126. {
  127. var HardwareVer = 'undefined';
  128. }
  129. else
  130. {
  131. var HardwareVer = AYECOM_HWVER;
  132. }
  133.  
  134. var POL = "0";
  135.  
  136. function returnlogin() {
  137. loc = 'login.html';
  138. code = 'location="' + loc + '"';
  139. ayeSubmit(code);
  140. }
  141.  
  142. function convert(val)
  143. // this converts a given char to url hex form
  144. {
  145. return "%" + decToHex(val.charCodeAt(0), 16);
  146. }
  147.  
  148. function decToHex(num, radix)
  149. // part of the hex-ifying functionality
  150. {
  151. var hexString = "";
  152. while ( num >= radix ) {
  153. temp = num % radix;
  154. num = Math.floor(num / radix);
  155. hexString += hexVals[temp];
  156. }
  157. hexString += hexVals[num];
  158. return reversal(hexString);
  159. }
  160.  
  161. function reversal(s)
  162. // part of the hex-ifying functionality
  163. {
  164. var len = s.length;
  165. var trans = "";
  166. for (i = 0; i < len; i++)
  167. trans = trans + s.substring(len-i-1, len-i);
  168. s = trans;
  169. return s;
  170. }
  171.  
  172. var hexVals = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
  173. "A", "B", "C", "D", "E", "F");
  174. var unsafeString = "\"<>%\\^[]`\+\$\,'#&";
  175.  
  176. function isUnsafe(compareChar)
  177. // this function checks to see if a char is URL unsafe.
  178. // Returns bool result. True = unsafe, False = safe
  179. {
  180. if ( unsafeString.indexOf(compareChar) == -1 && compareChar.charCodeAt(0) > 32
  181. && compareChar.charCodeAt(0) < 123 )
  182. return false; // found no unsafe chars, return false
  183. else
  184. return true;
  185. }
  186.  
  187. function encodeUrl(val)
  188. {
  189. var len = val.length;
  190. var i = 0;
  191. var newStr = "";
  192. var original = val;
  193. var hasField = false;
  194.  
  195.  
  196. for ( i = 0; i < len; i++ ) {
  197. if ( val.substring(i,i+1).charCodeAt(0) < 255 ) {
  198. // hack to eliminate the rest of unicode from this
  199. if (isUnsafe(val.substring(i,i+1)) == false)
  200. newStr = newStr + val.substring(i,i+1);
  201. else
  202. newStr = newStr + convert(val.substring(i,i+1));
  203. } else {
  204. // woopsie! restore.
  205. //alert ("Found a non-ISO-8859-1 character at position: " + (i+1) + ",\nPlease eliminate before continuing.");
  206. newStr = original;
  207. // short-circuit the loop and exit
  208. i = len;
  209. }
  210. }
  211.  
  212. return newStr;
  213. }
  214. function checkForm(){
  215.  
  216. with ( document.forms[0] ){
  217. temp = password.value;
  218. if (username.value == 'user' || username.value == 'support'){
  219. alert (aye_msg(account_str));
  220. return 0;
  221. }
  222. if (temp.length < 1){
  223. alert (aye_msg(input_password_str));
  224. return 0;
  225. }
  226. else {
  227. //password.value = encodeUrl(password.value);
  228. Set_Cookie( 'username', username.value, '1', '/');
  229. Set_Cookie( 'timeout', passwdInfo[0].timeout, '1', '/');
  230. if(loginfo.checked == true)
  231. {
  232. login_remember = 1;
  233. Set_Cookie( 'aye_remember', login_remember, '1', '/');
  234. Set_Cookie( 'password', password.value, '1', '/');
  235. }
  236. else
  237. {
  238. login_remember = 0;
  239. Set_Cookie( 'aye_remember', login_remember, '1', '/');
  240. }
  241. if(captchaEnbl == '1') {
  242. var loc= 'login.cgi?cli=' + 'access login encrypted ' + hex_md5('username '+username.value+' password '+password.value)+' authcode '+ authcode.value + '$';
  243. } else {
  244. var loc= 'login.cgi?cli=' + 'access login encrypted ' + hex_md5('username '+username.value+' password '+password.value) + '$';
  245. }
  246. var code = 'location=\'' + loc + '\'';
  247. ayeSubmit(code);
  248. }
  249. }
  250.  
  251. }
  252.  
  253. function stEnter(e){
  254. var keynum;
  255. if(window.event) // IE
  256. {
  257. keynum = e.keyCode;
  258. }
  259. else if(e.which) // Netscape/Firefox/Opera
  260. {
  261. keynum = e.which;
  262. }
  263. /*else if (e.charCode)
  264. {
  265. keynum = e.charCode;
  266. }*/
  267.  
  268. if (keynum == 13){
  269. checkForm();
  270. }
  271. }
  272.  
  273. function btnRegenerate()
  274. {
  275. with ( document.forms[0] ){
  276. var loc = 'auth_regen.cgi';
  277. var code = 'location="' + loc + '"';
  278. eval(code);
  279. }
  280. }
  281.  
  282. // -->
  283. </script>
  284.  
  285. </head>
  286.  
  287. <!--
  288. <body onload="javascript:document.frmLogin.password.focus();document.frmLogin.username.value='admin';">
  289. -->
  290. <body onLoad=frmLoad()>
  291. <BLOCKQUOTE>
  292. <form focus="password" name="frmLogin" method="POST" action="login.cgi">
  293. <style>
  294. div.overflow
  295. {
  296. overflow: auto;
  297. width: 660px;
  298. }
  299. </style>
  300. <DIV align="center" style="display: hidden" id="tblmain">
  301. <TABLE cellSpacing=0 width="800"><TR><TD>
  302. <TABLE id=header_container width="800"><TR>
  303. <script language="javascript">
  304. document.writeln("<TD align=left width=\"200\">" + aye_msg(product_str) + ModemVer + "</TD>");
  305. document.writeln("<TD align=right width=\"50\"></TD>");
  306. //document.writeln("<TD align=right width=\"550\">Firmware Version: " + FirmwareVer + " Hardware Version: " + HardwareVer + "</TD>");
  307. document.writeln("<TD align=right width=\"550\">" + aye_msg(firmware_ver_str) + FirmwareVer + "</TD>");
  308. document.writeln("</TR></TABLE>");
  309. </script>
  310.  
  311. <TABLE cellSpacing=0 width="800"><TR><TD id=masthead_container width="800"><IMG alt="" src="images/img_masthead.gif"></TD></TR></TABLE>
  312. <TABLE cellSpacing=0 summary="" border=0 width="100%" style="background-color:white" height=300>
  313. <TR>
  314. <TD align=center >
  315.  
  316. <DIV id=maincontent style="width:600" align="center">
  317. <table id=box_header border=0 cellSpacing=0>
  318. <tr>
  319. <td class=topheader>
  320. <script>aye_txt(login_str);</script>
  321. </td>
  322. </tr>
  323. <tr>
  324. <td class=content>
  325. <p> <script>aye_txt(login_to_str);</script></p>
  326.  
  327. <table class=formarea border="0" cellspacing="0" cellpadding="0" width=100% align="center">
  328. <tr>
  329. <td class=form_label ><b><script>aye_txt(username_str);</script></b></td>
  330. <script language="javascript">
  331. if(POL == '1') {
  332. document.writeln("<td><input type=\"username\" maxlength=\"16\" size=\"16\" name=\"username\" value='Multimedia' onkeypress='return stEnter(event)'></td>");
  333. }
  334. else
  335. {
  336. document.writeln("<td><input type=\"username\" maxlength=\"16\" size=\"16\" name=\"username\" value='admin' onkeypress='return stEnter(event)'></td>");
  337. }
  338. </script>
  339. </tr>
  340. <tr>
  341.  
  342. <td class=form_label ><b>Password&nbsp;&nbsp;:</b></td>
  343. <td><input type="password" maxlength="16" size="16" name="password" onKeyPress="stEnter(event);">
  344. <!--<input type="button" value="Log In" onclick="checkForm();"></td>-->
  345. <script language="javascript">
  346. if(captchaEnbl == '1') {
  347.  
  348. //document.writeln("<tr>");
  349. //document.writeln("<td class=form_label></td>");
  350. document.writeln("</td></tr><tr><td class=form_label ></td>");
  351. document.writeln("<td><b>"+enter_the_correct_str+".</b></td>");
  352. document.writeln("</tr> ");
  353. document.writeln("<tr>");
  354. document.writeln("<td class=form_label></td><td valign=center><IMG src='images/captcha.bmp'></td>");
  355. document.writeln("</tr> ");
  356. document.writeln("<tr>");
  357. document.writeln("<td class=form_label><b>"+authcode_str+"&nbsp;&nbsp;&nbsp;:</b></td>");
  358. document.writeln("<td><input type=authcode maxlength=16 size=18 id=authcode name=authcode onkeypress='return stEnter(event)'> </td>");
  359. document.writeln("</tr>");
  360.  
  361. document.writeln("<tr>");
  362. document.writeln("<td class=form_label></td>");
  363. document.writeln("<td><input type=button value='"+glb_login_btn+"' onclick='checkForm()'><input type='button' value='Regenerate' onclick='btnRegenerate()'></td>");
  364. }
  365. else{
  366. //document.writeln("<tr>");
  367. //document.writeln("<td class=form_label></td>");
  368. document.writeln("<input type=button value='"+glb_login_btn+"' onclick='checkForm()'></td>");
  369. }
  370. </script>
  371. </tr>
  372. <tr>
  373. <td align=right><input type="checkbox" name="loginfo" id="loginfo"></td>
  374. <td><label for=loginfo><script>aye_txt(remember_my_login_str);</script></label></td>
  375. </tr>
  376.  
  377. </table>
  378. </td>
  379. </tr>
  380. </table>
  381.  
  382. </DIV>
  383. <DIV id=loginerror style="width:600;display:none" >
  384.  
  385. <table id=box_header border=0 cellSpacing=0>
  386. <tr>
  387. <td class=topheader>
  388. Login
  389. </td>
  390. </tr>
  391. <tr>
  392. <td class=content>
  393. <table width="100%" border="0" cellspacing="0" cellpadding="0" height="80%">
  394. <tr>
  395.  
  396. <td align="center">
  397.  
  398. <script>aye_txt(authenication_fali_str);</script><br>
  399. <script>aye_txt(incorrect_str);</script>
  400. </td>
  401. </tr>
  402. <tr>
  403. <td align="center">&nbsp;
  404.  
  405. </td>
  406.  
  407. </tr>
  408. <tr>
  409. <td align="center">
  410. <INPUT TYPE="button" NAME="tryagain_btn" onClick="returnlogin()">
  411. </td>
  412. </tr>
  413. </table>
  414. </td>
  415. </tr>
  416.  
  417. </table>
  418.  
  419. </DIV>
  420. </TD>
  421. </TR></TABLE>
  422. <TABLE id=footer_container cellSpacing=0 border=0><TR><TD id=leftimage>
  423. <IMG height=35 alt="" src="images/img_bottom.gif" width=114></TD>
  424. <TD>&nbsp;</TD></TR></TABLE>
  425. </TD></TR></TABLE><DIV id=copyright><script>aye_txt(glb_copyright_str);</script>.</DIV></DIV>
  426. </TR></TD></TABLE>
  427. </DIV>
  428. </form>
  429. </BLOCKQUOTE>
  430. </body>
  431.  
  432. </html>
Advertisement
Add Comment
Please, Sign In to add comment