新兵上阵
- 注册时间
- 2014-1-15
- 金币
- 17 个
- 威望
- 0 个
- 荣誉
- 0 个
尚未签到
|
本帖最后由 kif 于 2014-1-15 20:21 编辑
有大神能分析一下么,有没有啥漏洞?
由于这个论坛的字数限制,只能把代码分开两部分发出,在二楼发剩下的部分代码。- <script type="text/javascript">
- var httpAutErrorArray=new Array(
- 1,
- "",
- 0,0 );
- </script>
- <html><head><title>TL-WR842N</title>
- <script type="text/javascript"><!--
- function Click(){return false;}
- document.oncontextmenu=Click;
- function doPrev(){history.go(-1);}
- //--></script>
- <style type="text/css">
- body{
- font-family:"宋体";
- background-color:white;
- margin:0px;
- padding:0px;
- }
- div.loginBox
- {
- display: block;
- position:relative;
- margin-top:10%;
- text-align:center;
- }
- div.panelThre{
- margin-top:10px;
- }
- div.picDiv{
- width:457px;
- height:321px;
- background:url(../login/loginbg.png);
- position:relative;
- }
- input.pcPassword{
- width:300px;
- height:50px;
- line-height:50px;
- }
- .topLogo{
- background:url(../login/top_bg.png);
- height:55px;
- }
- ul{
- padding:40px 0px 0px 0px;
- margin:0px;
- list-style:none;
- }
- ul li{
- width:341px;
- text-align:left;
- color:#656565;
- font-family:"宋体";
- font-weight:normal;
- font-size:12pt;
- margin-top:10px;
- display:inline-block;
- _display:inline;
- _zoom:1;
- }
- .errMsg
- {
- color:#fd1515;
- }
- li.pwLi{
- height:40px;
- background:url(../login/loginPwd.png);
- }
- input.text{
- border:0px;
- height:36px;
- width:337px;
- padding:10px 0px;
- margin:2px 0px 0px 2px;
- font-size:14px;
- color:#6a6969;
- font-family:"宋体";
- font-weight:normal;
- background-color:transparent;
- vertical-align:middle;
- }
- label.loginBtn{
- height:40px;
- display:inline-block;
- width:148px;
- margin-top:20px;
- background:url(../login/loginBtn.png);
- cursor:pointer;
- vertical-align:middle;
- text-align: center;
- color:white;
- font-family:"宋体";
- font-weight:normal;
- font-size:14pt;
- line-height:40px;
- }
- </style>
- <script type="text/javascript">
- function Base64Encoding(input)
- {
- var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- var output = "";
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
- var i = 0;
- input = utf8_encode(input);
- while (i < input.length)
- {
- chr1 = input.charCodeAt(i++);
- chr2 = input.charCodeAt(i++);
- chr3 = input.charCodeAt(i++);
- enc1 = chr1 >> 2;
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
- enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
- enc4 = chr3 & 63;
- if (isNaN(chr2)) {
- enc3 = enc4 = 64;
- } else if (isNaN(chr3)) {
- enc4 = 64;
- }
- output = output +
- keyStr.charAt(enc1) + keyStr.charAt(enc2) +
- keyStr.charAt(enc3) + keyStr.charAt(enc4);
- }
-
- return output;
- }
- function utf8_encode (string)
- {
- string = string.replace(/\r\n/g,"\n");
- var utftext = "";
- for (var n = 0; n < string.length; n++) {
- var c = string.charCodeAt(n);
- if (c < 128) {
- utftext += String.fromCharCode(c);
- }
- else if((c > 127) && (c < 2048)) {
- utftext += String.fromCharCode((c >> 6) | 192);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- else {
- utftext += String.fromCharCode((c >> 12) | 224);
- utftext += String.fromCharCode(((c >> 6) & 63) | 128);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- }
- return utftext;
- }
- function CheckUserPsw(szValue)
- {
- var reg = /^[\x21-\x7e]+$/;
- if(!reg.test(szValue))
- {
- return false;
- }
- return true;
- }
- var pswLenMsg = "密码长度只能为6-15位。";
- var pswInvalid = "密码必须是数字、字母(区分大小写)、符号的组合(空格除外)。";
复制代码 |
|