瀏覽器特征

function randomString(len) {
    len = len || 32;
    var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
    /****默認(rèn)去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
    var maxPos = $chars.length;
    var pwd = '';
    for (i = 0; i < len; i++) {
        pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
    }
    return pwd;
}


window.parseFloat = parseFloat;
window.parseInt = parseInt;
window.isNaN = isNaN;
window.decodeURI = decodeURI;
window.decodeURIComponent = decodeURIComponent;
window.encodeURI = encodeURI;
window.encodeURIComponent = encodeURIComponent;
window.escape = escape;
window.unescape = unescape;
window.eval = eval;
window.Date = Date;

document = new Object();
document.createElement = function(name) {
    return "<" + name + ">" + "</" + name + ">"
};
document.createElement.toString = function() {
    return "function createElement() { [native code] }"
};
window.document = document;

var navigator = new Object();
navigator.appCodeName = "Mozilla";
navigator.appName = "Netscape";
navigator.appVersion = "5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36";
navigator.cookieEnabled = true;
navigator.connection = {
    'connection': null,
    'effectiveType': "4g",
    'rtt': 50,
    'downlink': 10,
    'saveData': false
};
navigator.deviceMemory = 8;
navigator.hardwareConcurrency;
navigator.doNotTrack = null;
navigator.language = "zh-CN";
navigator.languages = ["zh-CN", "zh"];
navigator.onLine = true;
navigator.platform = 'Win32';
navigator.product = 'Gecko';
navigator.productSub = '20030107';
navigator.userAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36";
navigator.vendor = "Google Inc.";
navigator.vendorSub = "";

plugins = [{
    'description': "APlayer III ActiveX hosting plugin for Firefox",
    'filename': "npaplayer.dll",
    'length': 1,
    'name': "APlayer ActiveX hosting plugin"
}, {
    'description': "ASUS Update",
    'filename': "npAsusUpdate3.dll",
    'length': 1,
    'name': "ASUS Update"
}];

any_plugins = true;

if (any_plugins) {
    for (var i = 0; i < 10; i++) {
        var p = {
            'description': randomString(parseInt(Math.random() * 20)),
            'filename': randomString(parseInt(Math.random() * 20)) + ".dll",
            'length': 1,
            'name': randomString(parseInt(Math.random() * 10))
        };

        plugins.push(p)
    }
}

navigator.plugins = plugins;

window.navigator = navigator;

location = new Object();
location.port = "";
location.protocol = "http:";

window.location = location;

history = new Object();
history.length = 5;
history.scrollRestoration = "auto";
history.state = null;
window.history = history;

screen = new Object();
screen.availHeight = 1040;
screen.availLeft = 2560;
screen.availTop = 0;
screen.availWidth = 1920;
screen.colorDepth = 24;
screen.height = 1080;
screen.pixelDepth = 24;
screen.width = 1920;
screen.orientation = {
    angle: 0,
    onchange: null,
    type: "landscape-primary"
};

window.getComputedStyle = function() {
    debugger
};

window.screen = screen;

window.parent = window;

window.top = window;

window.self = window;
window.window = window;
瀏覽器存儲環(huán)境
var sessionStorage = {};
window.sessionStorage = {
    'setItem': function (key, val) {
        sessionStorage[key] = val
    },
    'getItem': function (key) {
        return sessionStorage[key]
    }
}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末鲤遥,一起剝皮案震驚了整個濱河市币呵,隨后出現(xiàn)的幾起案子赏淌,更是在濱河造成了極大的恐慌腐螟,老刑警劉巖,帶你破解...
    沈念sama閱讀 222,252評論 6 516
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件徙歼,死亡現(xiàn)場離奇詭異酿矢,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)盔夜,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,886評論 3 399
  • 文/潘曉璐 我一進(jìn)店門负饲,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人喂链,你說我怎么就攤上這事返十。” “怎么了椭微?”我有些...
    開封第一講書人閱讀 168,814評論 0 361
  • 文/不壞的土叔 我叫張陵洞坑,是天一觀的道長。 經(jīng)常有香客問我蝇率,道長迟杂,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 59,869評論 1 299
  • 正文 為了忘掉前任本慕,我火速辦了婚禮排拷,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘锅尘。我一直安慰自己监氢,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,888評論 6 398
  • 文/花漫 我一把揭開白布藤违。 她就那樣靜靜地躺著浪腐,像睡著了一般。 火紅的嫁衣襯著肌膚如雪顿乒。 梳的紋絲不亂的頭發(fā)上议街,一...
    開封第一講書人閱讀 52,475評論 1 312
  • 那天,我揣著相機(jī)與錄音璧榄,去河邊找鬼特漩。 笑死,一個胖子當(dāng)著我的面吹牛犹菱,可吹牛的內(nèi)容都是我干的拾稳。 我是一名探鬼主播,決...
    沈念sama閱讀 41,010評論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼腊脱,長吁一口氣:“原來是場噩夢啊……” “哼访得!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,924評論 0 277
  • 序言:老撾萬榮一對情侶失蹤悍抑,失蹤者是張志新(化名)和其女友劉穎鳄炉,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體搜骡,經(jīng)...
    沈念sama閱讀 46,469評論 1 319
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡拂盯,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,552評論 3 342
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了记靡。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片谈竿。...
    茶點(diǎn)故事閱讀 40,680評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖摸吠,靈堂內(nèi)的尸體忽然破棺而出空凸,到底是詐尸還是另有隱情,我是刑警寧澤寸痢,帶...
    沈念sama閱讀 36,362評論 5 351
  • 正文 年R本政府宣布呀洲,位于F島的核電站,受9級特大地震影響啼止,放射性物質(zhì)發(fā)生泄漏道逗。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 42,037評論 3 335
  • 文/蒙蒙 一献烦、第九天 我趴在偏房一處隱蔽的房頂上張望滓窍。 院中可真熱鬧,春花似錦巩那、人聲如沸贰您。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,519評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至舶替,卻和暖如春令境,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背顾瞪。 一陣腳步聲響...
    開封第一講書人閱讀 33,621評論 1 274
  • 我被黑心中介騙來泰國打工舔庶, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人陈醒。 一個月前我還...
    沈念sama閱讀 49,099評論 3 378
  • 正文 我出身青樓惕橙,卻偏偏與公主長得像,于是被迫代替她去往敵國和親钉跷。 傳聞我的和親對象是個殘疾皇子弥鹦,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,691評論 2 361