最近给 bbs.80app.com 换了套 克米 苍南蓝色时尚门户风格 模板 感觉还不错,可惜在某天我突然发现我浏览论坛的时候会有一个弹窗。
巨邪恶, 中国站长论坛(www.adminchn.com) 弹窗, 通过firefox dom 资源 查询 代码 竟然没有找到 网址 。
排查过程:
1: 页面当天第一打开会有弹窗后续就不会有了
2: firefox 清楚cookie 确实可以复现问题
3:服务器上grep 了下 adminchn 无果 很悲催啊
4:继续grep eval 可能是加密了代码
5:继续grep cookie 再某个安葬的教过里藏着一段 猥琐的代码
function setCookie(name, value, expire)
{
window.document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}
function getCookie(Name)
{
var search = Name + "=";
if (window.document.cookie.length > 0)
{ // if there are any cookies
offset = window.document.cookie.indexOf(search);
if (offset != -1)
{ // if cookie exists
offset += search.length;
// set index of beginning of value
end = window.document.cookie.indexOf(";", offset)
// set index of end of cookie value
if (end == -1)
end = window.document.cookie.length;
return unescape(window.document.cookie.substring(offset, end));
}
}
return null;
}
function register(name) {
var today = new Date();
var expires = new Date();
expires.setTime(today.getTime() + 1000*60*60*24);
setCookie("ttt", name, expires);
}
var exitURL="http://url.cn/0uSr3c";
function openWin() {
var c = getCookie("ttt");
if (c != null) {
return;
}
register("ttt");
var featureStr="''";
featureStr="'top=0,left=0,width=1024,height=768,toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=tes,center:yes'";
self.focus();
var ExitWindow = window.open(exitURL,'', featureStr);
ExitWindow.focus();
}
openWin();
window.focus()
原来是 把原始网址 短写了下 http://url.cn/0uSr3c 怪不得怎么都查不出来。
此话题就此结束 你还在深深被 www.adminchn.com 弹窗困扰的话 希望你可以搜索到本文章.