function fingerprint() { | |
return [ | |
navigator.userAgent.replace(/;|::/g, ''), | |
[screen.height, screen.width, screen.colorDepth].join("x"), | |
(new Date()).getTimezoneOffset(), | |
!!window.sessionStorage, | |
!!window.localStorage, | |
Array.prototype.map.call(navigator.plugins, function(p) { | |
return [ | |
p.name.replace(/;|::/g, ''), | |
p.description.replace(/;|::/g, ''), | |
Array.prototype.map.call(p, function(mt) { | |
if (typeof mt === 'object') { | |
return [mt.type, mt.suffixes].join("~").replace(/;|::/g, ''); | |
} | |
}).join(",") | |
].join("::"); | |
}).join(";"), | |
getCookie("__P__wuid"), | |
window.location.hostname, | |
document.referrer.split('/')[2] | |
].join("###"); | |
function getCookie(cname) { | |
var name = cname + "="; | |
var ca = document.cookie.split(';'); | |
for (var i = 0; i < ca.length; i++) { | |
var c = ca[i]; | |
while (c.charAt(0) == ' ') { | |
c = c.substring(1); | |
} | |
if (c.indexOf(name) == 0) { | |
return c.substring(name.length, c.length); | |
} | |
} | |
return ""; | |
} | |
} | |
if (!Array.prototype.map) { | |
Array.prototype.map = function(callback, thisArg) { | |
var T, A, k; | |
if (this == null) { | |
throw new TypeError(' this is null or not defined'); | |
} | |
var O = Object(this); | |
var len = O.length >>> 0; | |
if (typeof callback !== 'function') { | |
throw new TypeError(callback + ' is not a function'); | |
} | |
if (arguments.length > 1) { | |
T = thisArg; | |
} | |
A = new Array(len); | |
k = 0; | |
while (k < len) { | |
var kValue, mappedValue; | |
if (k in O) { | |
kValue = O[k]; | |
mappedValue = callback.call(T, kValue, k, O); | |
A[k] = mappedValue; | |
} | |
k++; | |
} | |
return A; | |
}; | |
} | |
function getXmlHttp() { | |
var xmlhttp; | |
try { | |
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); | |
} catch (e) { | |
try { | |
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); | |
} catch (E) { | |
xmlhttp = false; | |
} | |
} | |
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { | |
xmlhttp = new XMLHttpRequest(); | |
} | |
return xmlhttp; | |
} | |
(function() { | |
var acctId = document.getElementsByName('acctId')[0].value; | |
var xmlhttp = getXmlHttp(); | |
xmlhttp.open('POST', 'https://secure.tinkoff.ru/acs/browser/data/collect.do?acctId=' + acctId, false); | |
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
xmlhttp.send('data=' + encodeURIComponent(fingerprint())); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment