查看: 2765|回复: 1

[讨论] 帮忙看看这个代码为什么用上去就是乱码

[复制链接]
论坛徽章:
0
发表于 2014-11-25 13:51 | 显示全部楼层 |阅读模式
这段代码一用上去,中文就是乱码了,求高手仔细说明下 这个怎么修改才可以显示正常!先谢谢了。
听朋友说是加密了,可是加密也有办法解密吧!
  1. <script>var Tool={isCN:function(e){var t=new RegExp("[\u4e00-\u9fa5]");return t.test(e)},getRealUserAgent:function(){var e=this,t=e.getUserAgent();if(t["type"]=="ie")try{external.twGetRunPath.toLowerCase().indexOf("360se")>-1&&(t.type="360se")}catch(n){}return t},getUserAgent:function(){var e="unknow",t=navigator.userAgent.toLowerCase();if(!t)return{type:e,version:e};var n=e,r=e,i,s=function(e){return e.test(t)};return s(/msie/)&&!s(/opera/)?(n="ie",i=/msie[\/|\s]*([\d+?\.?]+)/.exec(t)):!s(/webkit/)&&s(/gecko/)&&s(/firefox/)&&!s(/opera/)?(n="firefox",i=/firefox[\/|\s]*([\d+?\.?]+)/.exec(t)):s(/\bchrome\b/)?(n=s(/360ee/)?"360ee":"chrome",n=s(/qqbrowser/)?"qqbrowser":n,i=/chrome[\/|\s]*([\d+?\.?]+)/.exec(t)):s(/applewebkit/)&&s(/safari/)?(n="safari",i=/version[\/|\s]*([\d+?\.?]+)/.exec(t)):s(/opera/)&&(n="opera",i=/version[\/|\s]*([\d+?.?]+)/.exec(t)||/opera[\/|\s]*([\d+?.?]+)/.exec(t)),{type:n,version:r=i&&i[1]?i[1]:e}},externalLog:function(e,t){monitor.setConf("wpoUrl","http://s.360.cn/sou/cbd.gif"),monitor.log({val:e,guid:Tool.getGuid(),type:t},"wpo")},_open:function(e){var t=this;if(typeof _360SafeExplorer=="object")try{return _360SafeExplorer.navigate2(e,"_blank"),t.externalLog(1,"na2"),!0}catch(n){return t.externalLog(0,"na2"),!1}if(typeof external=="object")try{var r=external.GetSID(window);return!t.isMeetBrowser()&&Tool.getUserAgent().type!="ie"?(t.externalLog(0,"extver"),!1):(external.AppCmd(r,"","openurl",e,"1",function(e,t){return!1}),t.externalLog(1,"ext"),!0)}catch(n){return t.externalLog(0,"exterr"),!1}return!1},getURI:function(e){var t=Tool.getJsonHref();if(typeof e=="string"&&e.indexOf(",")<0)return t[e];var n=[];typeof e=="string"&&e.indexOf(",")>0?n=e.split(","):_keys instanceof Array&&(n=e);var r=[];for(var i=0;i<n.length;i++)t[n[i]]&&r.push(t[n[i]]);return r.join("&")},getJsonHref:function(){var e=window.location.href,t=window.location.search.replace("?",""),n=arguments[0]=="undefined"?"":arguments[0],r=t.split("&"),i={};for(var s=0;s<r.length;s++){var o=r[s].split("=");Tool.isCN(o[1])?i[o[0]]=o[0]+"="+encodeURIComponent(o[1]):i[o[0]]=r[s]}return i},getGuid:function(){return So.lib.cookie.get("QiHooGUID")}};
  2. So.web.srplog={eleOnebox:[],eleResult:[],params:{guid:"",_guid:"",_huid:"",x:"",abv:So.comm.abv,q:So.comm.q,src:So.comm.src,pid:So.comm.pid,qid:So.comm.user.qid,dpi:window.screen.width+"_"+window.screen.height},G:function(e){return document.getElementById(e)},getElementsByClassName:function(e,t,n){if(document.getElementsByClassName)return t=t||document,t.getElementsByClassName(e);t=t||document,n=n||"*";var r=e.split(" "),i=n==="*"&&t.all?t.all:t.getElementsByTagName(n),s=[],o=[],u,a,f=r.length;while(--f>=0)s.push(new RegExp("(^|\\s)"+r[f]+"(\\s|$)"));var l=i.length;while(--l>=0){u=i[l],a=!1;for(var c=0,h=s.length;c<h;c++){a=s[c].test(u.className);if(!a)break}a&&o.unshift(u)}return o},getOnebox:function(){var e=this,t=[];if(document.querySelectorAll)t=document.querySelectorAll("div[id^=mohe-]");else{var n=document.getElementsByTagName("div");for(var r=0,i=n.length;r<i;r++)n[r].id&&/^mohe-/.test(n[r].id)&&t.push(n[r])}return t},setEngDetail:function(){var e=this,t={},n="";for(var r=0,i=e.eleResult.length;r<i;r++){var s="";if(document.querySelector){var o=e.eleResult[r].querySelector("h3 a[data-res]"),u=o?JSON.parse(o.getAttribute("data-res")):{};u.e&&(s=u.e)}else{var a=e.eleResult[r].getElementsByTagName("h3");if(a&&a[0]){var f=a[0].getElementsByTagName("a");if(f&&f[0]){var l=f[0].getAttribute("data-res"),u=l?JSON.parse(l):{};u.e&&(s=u.e)}}}t.hasOwnProperty(s)||(t[s]=0),t[s]++}e.eleOnebox.length>0&&(t.ob=e.eleOnebox.length);for(engtype in t)n!=""&&(n+=","),n+=engtype+":"+t[engtype];e.params.engdetail=n},setResultClass:function(){var e=this,t=[],n=[];for(var r=0,i=e.eleResult.length;r<i;r++){var s=e.eleResult[r],o=e.getElementsByClassName("g-mohe",s,"div"),u=e.getElementsByClassName("so-pdr",s,"div");o.length>0?n.push(r+1+":"+o[0].getAttribute("id")):u.length>0?n.push(r+1+":"+u[0].getAttribute("id")):n.push(r+1+":n")}var a=e.getElementsByClassName("g-mohe",e.G("side"),"div");for(var r=0,i=a.length;r<i;r++){var f=a[r].getAttribute("id");f&&t.push(f)}n.push("0:"+t.join("|")),e.params.rcs=n.join(",")},setSms:function(){var e=this,t=[],n=[];for(var r=0,i=e.eleResult.length;r<i;r++)if(document.querySelector){var s=e.eleResult[r].querySelector("h3 a[data-res]"),o=s?JSON.parse(s.getAttribute("data-res")):{};o.stp&&t.push({stp:o.stp,pos:o.pos})}else{var u=e.eleResult[r].getElementsByTagName("h3");if(u&&u[0]){var a=u[0].getElementsByTagName("a");if(a&&a[0]){var f=a[0].getAttribute("data-res"),o=f?JSON.parse(f):{};o.stp&&t.push({stp:o.stp,pos:o.pos})}}}for(var r=0,i=t.length;r<i;r++)n.push(t[r].pos+":"+t[r].stp);e.params.sms=n.join(",")},setList:function(){var _this=this,list=[];for(var i=0,len=_this.eleOnebox.length;i<len;i++){var id=_this.eleOnebox[i].getAttribute("id")||"",abtest=_this.eleOnebox[i].getAttribute("data-abtest")||"";abtest&&(abtest="-"+abtest),list.push(id+abtest);if(id==="mohe-qihuwenda"){var extJson=_this.eleOnebox[i].getAttribute("data-ext");if(extJson)try{eval("var ext = "+extJson),_this.params["ob-qihuwenda-mcid"]=ext.mcid,_this.params["ob-qihuwenda-ids"]=ext.cids}catch(ex){}}}_this.params.list=list.join(","),_this.params.ob=_this.eleOnebox.length},setOfficial:function(){var e=this,t=e.getElementsByClassName("icon-official",document,"span"),n=[],r=[];for(var i=0,s=t.length;i<s;i++){var o=t[i].parentNode.getElementsByTagName("a");if(o&&o[0]){res=o[0].getAttribute("data-res"),n.push(o[0].getAttribute("href"));if(res){var u=JSON.parse(res);r.push(u.pos||"")}}}e.params.officials=n.join(","),e.params.official_local=r.join(",")},setOtherParams:function(){var e=this,t=e.getElementsByClassName("med-zhengzhuang",e.G("main"),"div");t.length>0&&(e.params.zhengzhuang=1),e.G("tips-res-fold")&&(e.params.fold="on");if(So.lib.startsWith(So.comm.src,"se_lighten")||So.lib.startsWith(So.comm.src,"se_zoned"))e.params.referrer=document.referrer;e.params.comment=So.comm.hasTantan,e.G("so-pdr-guide")&&(e.params.pdrs="0:guide");var n=e.getElementsByClassName("isokey",e.G("main"),"div");for(var r=0,i=n.length;r<i;r++)n[r].getAttribute("data-custom")==1&&(e.params.cus=r+1);if(document.getElementById("adv-search").style.display){var s=e.getElementsByClassName("selected",e.G("adv-search"),"dd"),o=s[0].getElementsByTagName("a")[0].getAttribute("data-val");e.params.soadv=o}},log:function(e,t){var n=this,r=[];for(var i in n.params)r.push(i+"="+encodeURIComponent(n.params[i]));r="?"+t+"&"+r.join("&")+"&t="+ +(new Date);var s="so_"+ +(new Date),o=window[s]=new Image;o.src="http://s.360.cn/sou/"+e+".gif"+r,o.onload=o.onerror=function(){window[s]=null,o=null}},getGuid:function(){function f(e){var t=0,n=0,r=e.length-1;for(r;r>=0;r--){var i=parseInt(e.charCodeAt(r),10);t=(t<<6&268435455)+i+(i<<14),(n=t&266338304)!=0&&(t^=n>>21)}return t}function l(){var e=[i.appName,i.version,i.language||i.browserLanguage,i.platform,i.userAgent,s.width,"x",s.height,s.colorDepth,r.referrer].join(""),t=e.length,n=window.history.length;while(n)e+=n--^t++;return(Math.round(Math.random()*2147483647)^f(e))*2147483647}var e=!0;try{var t=location.protocol.toLowerCase();if(t=="http:"||t=="https:")e=!1}catch(n){}var r=document,i=navigator,s=window.screen,o=e?"":document.domain.toLowerCase(),u=i.userAgent.toLowerCase(),a=["360.cn","so.com","leidian.com"],c="__guid",h=So.lib.cookie.get(c);if(!h){h=[f(e?"":r.domain),l(),+(new Date)+Math.random()+Math.random()].join(".");var p={expires:2592e7,path:"/",domain:""};if(a.length)for(var d=0;d<a.length;d++){var v=a[d],m="."+v;if(o.indexOf(m)>0&&o.lastIndexOf(m)==o.length-m.length||o==v){p.domain=m;break}}var g=new Date;g.setDate(g.getDate()+300),So.lib.cookie.set(c,h,{expires:g,path:p.path,domain:p.domain})}},init:function(){var e=this;e.getGuid(),e.params.guid=Tool.getGuid()||"",e.params._guid=So.lib.cookie.get("__guid")||"",e.params._huid=So.lib.cookie.get("__huid")||"",e.params.x=So.lib.cookie.get("GUID")||"";for(var t in So.comm.monitor)e.params[t]=So.comm.monitor[t];e.eleResult=e.getElementsByClassName("res-list",document,"li");var n=[],r=So.lib.parseQuery();if(e.eleResult.length>0){e.eleOnebox=e.getOnebox(),e.setEngDetail(),e.setResultClass(),e.setSms(),e.setList(),e.setOfficial(),e.setOtherParams(),typeof r.pn!="undefined"?n.push("pn="+r.pn):n.push("pn=1");var i=["pq","rg","site","cq","fr","psid"];for(var s=0,o=i.length;s<o;s++)typeof r[i[s]]!="undefined"&&n.push(i[s]+"="+r[i[s]]);e.log("srp",n.join("&"))}else{var i=["pq"];for(var s=0,o=i.length;s<o;s++)typeof r[i[s]]!="undefined"&&n.push(i[s]+"="+r[i[s]]);e.params.type=e.G("warning_info")?300:100,e.log("srp_null",n.join("&"))}}},So.web.srplog.init();
  3. TIME.R_PAGE = +new Date;TIME.JQUERY = +new Date;</script>
  4. <script src="http://s0.qhimg.com/lib/jquery/183.js" ></script>
  5. <script>TIME.JQUERY[1] = +new Date;TIME.RESULT_JS = [+new Date];</script>
  6. <script src="http://s1.qhimg.com/static/9b8e623aa5100a24/result.js" ></script>
  7. <script>TIME.RESULT_JS[1] = [TIME.R_RESULT_JS = +new Date]</script>
  8. <!--[if (gt IE 8)|!(IE)]><!-->
  9. <script>So.tantan = {"fl":1,"topicId":"546d4b2c205ff6cb7c8b4567","v":"b2J4a3YxMC5zZS5nenN0LnFpaG9vLm5ldA==","cq":"\u6c6a\u6db5\u5f53\u7238","midnight":0,"aqid":"11141652989417500313","ftk":"c5fa93b8","abv":"b"};
  10. _loader.add('swfobject', 'http://s4.qhimg.com/!c02d195a/swfobject.js');
  11. _loader.use('jquery,require.2.1.11,swfobject', function() {
  12. define.amd = false;
  13. if(So.tantan.abv && So.tantan.abv == 'a'){
  14.     _loader.add('comment', {stc:'/resource/js/comment-old.js'}.stc);
  15. }else{
  16.     _loader.add('comment', "http://s0.qhimg.com/static/d0a23d4070a9a545/comment.js");
  17. }
  18. _loader.use('comment', function(){});
  19. });</script>
  20. <!--<![endif]--><script>TIME.FOOT_JS = [+new Date];</script>
  21. <script src="http://s0.qhimg.com/static/1a2a23ca5e8bd112/foot.js" ></script>
  22. <script>TIME.R_FOOT_JS = TIME.FOOT_JS[1] = +new Date;TIME.LOGIN_CSS = [+new Date];</script>
  23. <link rel="stylesheet" href="http://s1.qhimg.com/i360/;css;index_pop/v3204b5.css">
  24. <script>TIME.R_LOGIN_CSS = TIME.LOGIN_CSS[1] = +new Date;</script>
  25. <!--[if (gte IE 9)|!(IE)]><!-->
  26. <script>TIME.ISO=[+new Date];
  27. So.web.iso = {};</script>
  28. <link href="http://s1.qhimg.com/static/a1e30157da6fb717/iso.ui.css" type="text/css" rel="stylesheet">
  29. <script>So.web.iso.files = {
  30.     'app.iso' : "http://s0.qhimg.com/static/e849ceb4e9ff7254/suibian/app.iso.js",
  31.     'app.iso.monitor' : "http://s1.qhimg.com/static/31708a376910f55a/suibian/app.iso.monitor.js",
  32.     'app.iso.top' : "http://s1.qhimg.com/static/bdec3fe5227ef232/suibian/app.iso.top.js",
  33.     'app.iso.dragmode' : "http://s0.qhimg.com/static/47a5ec6f755ff148/suibian/app.iso.dragmode.js",
  34.     'app.iso.dragline' : "http://s1.qhimg.com/static/a064dde293391928/suibian/app.iso.dragline.js",
  35.     'jquery.easing' : "http://s0.qhimg.com/static/6b430db3ee92470f/jquery.easing.js",   
  36.     'app.player' : "http://s0.qhimg.com/static/d8eec6bbad0541c6/suibian/app.player.js"   
  37. };
  38. _loader.add('require.2.1.11', 'http://s2.qhimg.com/!5a33324b/require.js');
  39. _loader.use('jquery, require.2.1.11', function() {
  40.     define.amd = false;
  41.     _loader.add('iso', So.web.iso.files['app.iso']);
  42.     _loader.use('iso', function(){});
  43. });</script>
  44. <!--<![endif]-->
  45. <script>
  46. var birthdayOptions = " 小沐沐,欢迎来到这个美丽世界";
  47. </script>
  48. <script src=" http://s7.qhimg.com/!f8ab2096/birthday.js  "></script>
  49. </body>
  50. </html>
复制代码


认证徽章
论坛徽章:
0
发表于 2015-3-27 09:30 | 显示全部楼层
你的这个代码的编码和你的IDE编码不一致,解决方法:你可以再你的项目中建一个和你这个代码名字一样的文件,然后把代码复制进去,就OK了

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

SACC2019中国系统架构师大会

【数字转型 架构演进】SACC2019中国系统架构师大会,7折限时优惠重磅来袭!
2019年10月31日~11月2日第11届中国系统架构师大会(SACC2019)将在北京隆重召开。四大主线并行的演讲模式,1个主会场、20个技术专场、超千人参与的会议规模,100+来自互联网、金融、制造业、电商等领域的嘉宾阵容,将为广大参会者提供一场最具价值的技术交流盛会。

限时七折期:2019年8月31日前


----------------------------------------

大会官网>>
TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 
京ICP备09055130号-4  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表