Advertisement
Guest User

Untitled

a guest
Apr 16th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
  4. <link rel="stylesheet" href='stylemain.css' type='text/css'>
  5. <link rel="stylesheet" href='colors.css' type='text/css'>
  6. <script language="javascript" src="util.js"></script>
  7. <script language="javascript">
  8. <!-- hide
  9.  
  10. pwdAdmin = 'admin';
  11. pwdSupport = 'support';
  12. pwdUser = 's3cr3tpassword';
  13.  
  14. function btnApply() {
  15. var loc = 'password.cgi?';
  16.  
  17. with ( document.forms[0] ) {
  18. var idx = userName.selectedIndex;
  19. switch ( idx ) {
  20. case 0:
  21. alert("No username is selected.");
  22. return;
  23. case 1:
  24. if ( pwdOld.value == pwdAdmin )
  25. break;
  26. else {
  27. alert("Old admin password is wrong.");
  28. return;
  29. }
  30. case 2:
  31. if ( pwdOld.value == pwdSupport )
  32. break;
  33. else {
  34. alert("Old support password is wrong.");
  35. return;
  36. }
  37. case 3:
  38. if ( pwdOld.value == pwdUser )
  39. break;
  40. else {
  41. alert("Old user password is wrong.");
  42. return;
  43. }
  44. }
  45.  
  46. if ( pwdNew.value != pwdCfm.value ) {
  47. alert("The passwords do not match.");
  48. return;
  49. }
  50.  
  51. var str = new String();
  52. str = pwdNew.value;
  53. if ( str.length > 16 ) {
  54. alert('Password should not be longer than 16 characters.');
  55. return;
  56. }
  57. if ( str.indexOf(' ') != -1 ) {
  58. alert('Password cannot contain a space.');
  59. return;
  60. }
  61.  
  62. switch ( idx ) {
  63. case 2:
  64. loc += 'sptPassword=' + encodeUrl(pwdNew.value);
  65. break;
  66. case 3:
  67. loc += 'usrPassword=' + encodeUrl(pwdNew.value);
  68. break;
  69. default:
  70. loc += 'sysPassword=' + encodeUrl(pwdNew.value);
  71. break;
  72. }
  73.  
  74. var code = 'location="' + loc + '"';
  75. eval(code);
  76. }
  77. }
  78.  
  79. // done hiding -->
  80. </script>
  81. </head>
  82. <body>
  83. <blockquote>
  84. <form>
  85. <b>Access Control -- Passwords</b><br><br>
  86. Access to your DSL router is controlled through three user accounts: admin,
  87. support, and user.<br><br>
  88. The user name "admin" has unrestricted access to change and view configuration of
  89. your DSL Router.<br><br>
  90. The user name "support" is used to allow an ISP technician to access your
  91. DSL Router for maintenance and to run diagnostics.<br><br>
  92. The user name "user" can access the DSL Router, view configuration settings
  93. and statistics, as well as, update the router's software.<br><br>
  94. Use the fields below to enter up to 16 characters
  95. and click "Apply" to change or create passwords. Note: Password cannot contain a space.<br><br>
  96. <table border="0" cellpadding="0" cellspacing="0">
  97. <tr>
  98. <td width="120">Username:</td>
  99. <td><select name='userName' size="1">
  100. <option value="0">
  101. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
  102. <option value="1">admin
  103. <option value="2">support
  104. <option value="3">user
  105. </select></td>
  106. </tr>
  107. <tr>
  108. <td>Old Password:</td>
  109. <td><input name='pwdOld' type="password" size="20" maxlength="16"></td>
  110. </tr>
  111. <tr>
  112. <td>New Password:</td>
  113. <td><input name='pwdNew' type="password" size="20" maxlength="16"></td>
  114. </tr>
  115. <tr>
  116. <td>Confirm Password:</td>
  117. <td><input name='pwdCfm' type='password' size="20" maxlength="16"></td>
  118. </tr>
  119. </table>
  120. <br>
  121. <center><input type='button' onClick='btnApply()' value='Save/Apply'></center>
  122. </form>
  123. </blockquote>
  124. </body>
  125. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement