var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, // public method for decoding decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = Base64._utf8_decode(output); return output; }, // private method for UTF-8 encoding _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } }; if(typeof(Murmur3)==='undefined'){ class Murmur3{ rotl(number, bits){ if (number[0] == 0 && number[1] == 0) return number; var high_shifted = (number[0] << bits) >>> 0, high_rotated = (number[0] >>> (32 - bits)) >>> 0; var low_shifted = (number[1] << bits) >>> 0, low_rotated = (number[1] >>> (32 - bits)) >>> 0; var high = (high_shifted | low_rotated) >>> 0, low = (low_shifted | high_rotated) >>> 0; return [high, low]; } shiftl(number, bits){ var data = number; if (number[0] == 0 && number[1] == 0) return number; if (bits == 64) return [0, 0]; if (bits > 31) { data[0] = data[1]; data[1] = 0; bits -= 32; } var high_shifted = (data[0] << bits) >>> 0, low_shifted = (data[1] << bits) >>> 0, low_carry = (data[1] >>> (32 - bits)) >>> 0; var high = (high_shifted | low_carry) >>> 0, low = low_shifted; return [high, low]; } shiftr(number, bits){ var data = number; if (number[0] == 0 && number[1] == 0) return number; if (bits == 64) return [0, 0]; if (bits > 31) { data[1] = data[0] >>> 0; data[0] = 0; bits -= 32; } var high_shifted = (data[0] >>> bits) >>> 0, low_shifted = (data[1] >>> bits) >>> 0, high_carry = (data[0] << (32 - bits)) >>> 0; var high = high_shifted, low = (low_shifted | high_carry) >>> 0; return [high, low]; } xor64(a, b){ return [(a[0] ^ b[0]) >>> 0, (a[1] ^ b[1]) >>> 0]; } add64(a, b){ if (a[0] == 0 && a[1] == 0) return b; if (b[0] == 0 && b[1] == 0) return a; var low = (a[1] + b[1]); var carry = low > 0xFFFFFFFF ? (Math.floor(low / Math.pow(2,32)) >>> 0) : 0; var high = (a[0] + b[0] + carry); return [(high >>> 0), (low >>> 0)]; } mult64(a, b){ a = [a[0] >>> 16, a[0] & 0xffff, a[1] >>> 16, a[1] & 0xffff]; b = [b[0] >>> 16, b[0] & 0xffff, b[1] >>> 16, b[1] & 0xffff]; var o = [0, 0, 0, 0]; o[3] += a[3] * b[3]; o[2] += o[3] >>> 16; o[3] &= 0xffff; o[2] += a[2] * b[3]; o[1] += o[2] >>> 16; o[2] &= 0xffff; o[2] += a[3] * b[2]; o[1] += o[2] >>> 16; o[2] &= 0xffff; o[1] += a[1] * b[3]; o[0] += o[1] >>> 16; o[1] &= 0xffff; o[1] += a[2] * b[2]; o[0] += o[1] >>> 16; o[1] &= 0xffff; o[1] += a[3] * b[1]; o[0] += o[1] >>> 16; o[1] &= 0xffff; o[0] += (a[0] * b[3]) + (a[1] * b[2]) + (a[2] * b[1]) + (a[3] * b[0]); o[0] &= 0xffff; o[0] = o[0] >>> 0; o[1] = o[1] >>> 0; o[2] = o[2] >>> 0; o[3] = o[3] >>> 0; var result = [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; return result; } // Hashing Functions // //----------------------------------------------------------------- fmix64(number){ number = this.xor64(number, [0, number[0] >>> 1]); number = this.mult64(number, [0xff51afd7, 0xed558ccd]); number = this.xor64(number, [0, number[0] >>> 1]); number = this.mult64(number, [0xc4ceb9fe, 0x1a85ec53]); number = this.xor64(number, [0, number[0] >>> 1]); return number; } raw (){ return this.hash_raw; } hex (){ return this.hash_raw[0].toString(16) + '' + this.hash_raw[1].toString(16) + '' + this.hash_raw[2].toString(16) + '' + this.hash_raw[3].toString(16); } hash128 (key, seed){ key = key || ''; seed = seed || 0; var remainder = key.length % 16; var blocks = Math.floor(key.length / 16); var h1 = [0, seed]; var h2 = [0, seed]; var k1 = [0, 0]; var k2 = [0, 0]; var c1 = [0x87c37b91, 0x114253d5]; var c2 = [0x4cf5ad43, 0x2745937f]; for (var i = 0; i < blocks; i += 16) { k1 = [((key.charCodeAt(i + 4) & 0xff)) | ((key.charCodeAt(i + 5) & 0xff) << 8) | ((key.charCodeAt(i + 6) & 0xff) << 16) | ((key.charCodeAt(i + 7) & 0xff) << 24), ((key.charCodeAt(i) & 0xff)) | ((key.charCodeAt(i + 1) & 0xff) << 8) | ((key.charCodeAt(i + 2) & 0xff) << 16) | ((key.charCodeAt(i + 3) & 0xff) << 24)]; k2 = [((key.charCodeAt(i + 12) & 0xff)) | ((key.charCodeAt(i + 13) & 0xff) << 8) | ((key.charCodeAt(i + 14) & 0xff) << 16) | ((key.charCodeAt(i + 15) & 0xff) << 24), ((key.charCodeAt(i + 8) & 0xff)) | ((key.charCodeAt(i + 9) & 0xff) << 8) | ((key.charCodeAt(i + 10) & 0xff) << 16) | ((key.charCodeAt(i + 11) & 0xff) << 24)]; k1 = this.mult64(k1, c1); k1 = this.rotl(k1, 31); k1 = this.mult64(k1, c2); h1 = this.xor64(h1, k1); h1 = this.rotl(h1, 27); h1 = this.add64(h1, h2); h1 = this.add64(this.mult64(h1, [0, 5]), [0, 0x52dce729]); k2 = this.mult64(k2, c2); k2 = this.rotl(k2, 33); k2 = this.mult64(k2, c1); h2 = this.xor64(h2, k2); h2 = this.rotl(h2, 31); h2 = this.add64(h2, h1); h2 = this.add64(this.mult64(h2, [0, 5]), [0, 0x38495ab5]); } k1 = [0, 0]; k2 = [0, 0]; switch(remainder) { case 15: k2 = this.xor64(k2, this.shiftl([0, key.charCodeAt(i + 14)], 48)); case 14: k2 = this.xor64(k2, this.shiftl([0, key.charCodeAt(i + 13)], 40)); case 13: k2 = this.xor64(k2, this.shiftl([0, key.charCodeAt(i + 12)], 32)); case 12: k2 = this.xor64(k2, this.shiftl([0, key.charCodeAt(i + 11)], 24)); case 11: k2 = this.xor64(k2, this.shiftl([0, key.charCodeAt(i + 10)], 16)); case 10: k2 = this.xor64(k2, this.shiftl([0, key.charCodeAt(i + 9)], 8)); case 9: k2 = this.xor64(k2, [0, key.charCodeAt(i + 8)]); k2 = this.mult64(k2, c2); k2 = this.rotl(k2, 33); k2 = this.mult64(k2, c1); h2 = this.xor64(h2, k2); case 8: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 7)], 56)); case 7: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 6)], 48)); case 6: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 5)], 40)); case 5: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 4)], 32)); case 4: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 3)], 24)); case 3: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 2)], 16)); case 2: k1 = this.xor64(k1, this.shiftl([0, key.charCodeAt(i + 1)], 8)); case 1: k1 = this.xor64(k1, [0, key.charCodeAt(i)]); k1 = this.mult64(k1, c1); k1 = this.rotl(k1, 31); k1 = this.mult64(k1, c2); h1 = this.xor64(h1, k1); } h1 = this.xor64(h1, [0, key.length]); h2 = this.xor64(h2, [0, key.length]); h1 = this.add64(h1, h2); h2 = this.add64(h2, h1); h1 = this.fmix64(h1); h2 = this.fmix64(h2); h1 = this.add64(h1, h2); h2 = this.add64(h2, h1); // this.hash_raw = [h1[1] >>> 0, h1[0] >>> 0, h2[1] >>> 0, h2[0] >>> 0]; this.hash_raw = h1[0] >>> 0; return this.hash_raw; }; } var uuid=new Murmur3().hash128('imp_'+new Date().getTime()+"_"+Math.random(0,100000000)); } var fpdata=[]; var fingerPrintData={}; function logDeviceData(){ var property = Array('text-decoration-color','text-justify','text-orientation','nav-index'); for (var i = 0; i < property.length; i++) { try{ this.fpdata['CSSSupportedProperties_'+property[i].replace('-','_').replace('-','_').replace(',',' ')]=property[i] in document.body.style ?1:0; }catch(e){ } } try{ this.fpdata.push(navigator.platform.replace('-','_').replace(',',' ')); }catch(e){} try{ this.fpdata.push(navigator.userAgent.replace('-','_').replace(',',' ')); }catch(e){} var plugins=''; if(typeof(navigator.plugins)!=='undefined'){ for (var i = 0; i < navigator.plugins.length; i++) { try{ plugins+=navigator.plugins[i].name.replace('-','_').replace(',',' ')+'-'; }catch(e){} } try{ this.fpdata.push(plugins); }catch(e){} } try{ this.fpdata.push(navigator.vendor.replace('-','_').replace(',',' ')); }catch(e){} // var languages=''; // if(typeof(navigator.languages)!=='undefined'){ // for (var i = 0; i < navigator.languages.length; i++) { // try{ // languages+=navigator.languages[i].replace('-','_').replace(',',' ')+'-'; // }catch(e){} // } // try{ // this.fpdata.push(languages); // }catch(e){} // } // var mediaDevices=''; // if(typeof(navigator.mediaDevices)!=='undeifned'){ // for (var i = 0; i < navigator.mediaDevices.length; i++) { // try{ // mediaDevices+=navigator.mediaDevices[i].replace('-','_').replace(',',' ')+'-'; // }catch(e){} // } // try{ // this.fpdata.push(mediaDevices); // }catch(e){} // } try{ this.fpdata.push(navigator.appVersion); }catch(e){} try{ this.fpdata.push(navigator.cookieEnabled==1?1:0); }catch(e){} try{ this.fpdata.push(navigator.doNotTrack==1?1:0); }catch(e){} // if(typeof(navigator.language)!=='undefined'){ // try{ // this.fpdata.push(navigator.language.replace('-','_').replace(',',' ')); // }catch(e){} // } // if(typeof(navigator.mimeTypes)!=='undefined'){ // var mimeTypes=''; // for (var i = 0; i < navigator.mimeTypes.length; i++) { // try{ // mimeTypes+=navigator.mimeTypes[i].type.replace('-','_').replace(',',' ')+'-'; // }catch(e){} // } // try{ // this.fpdata.push(mimeTypes); // }catch(e){} // } try{ this.fpdata.push(navigator.product.replace('-','_').replace(',',' ')); }catch(e){} try{ this.fpdata.push(navigator.productSub); }catch(e){} try{ this.fpdata.push(screen.availHeight); }catch(e){} try{ this.fpdata.push(screen.availWidth); }catch(e){} try{ this.fpdata.push(screen.colorDepth); }catch(e){} try{ this.fpdata.push(screen.pixelDepth); }catch(e){} try{ this.fpdata.push(screen.orientation.type.replace('-','_').replace(',',' ')); }catch(e){} try{ this.fpdata.push(screen.orientation.angle); }catch(e){} try{ this.fpdata.push(screen.width); }catch(e){} try{ this.fpdata.push(screen.height); }catch(e){} try{ this.fpdata.push(screen.availTop); }catch(e){} try{ this.fpdata.push(((typeof navigator.plugins !== "undefined" && typeof navigator.plugins["Shockwave Flash"] === "object") || (window.ActiveXObject && (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) !== false))?1:0); }catch(e){} var canvas=document.createElement('canvas'); if(canvas.getContext('2d') || canvas.getContext){ try{ this.fpdata.push(1); }catch(e){} }else{ try{ this.fpdata.push(0); }catch(e){} } if(navigator.userAgent.indexOf('Chrome')!=-1){ try{ this.fpdata.push('Chrome'); }catch(e){} }else if(navigator.userAgent.indexOf('Opera')!=-1){ try{ this.fpdata.push('Opera'); }catch(e){} }else if(navigator.userAgent.indexOf('MSIE')!=-1){ try{ this.fpdata.push('Microsoft Internet Explorer'); }catch(e){} }else if(navigator.userAgent.indexOf('Safari')!=-1){ try{ this.fpdata.push('Safari'); }catch(e){} }else if(navigator.userAgent.indexOf('Firefox')!=-1){ try{ this.fpdata.push('Firefox'); }catch(e){} } try{ this.fpdata.push(new Date().getTimezoneOffset()); }catch(e){} try{ this.fpdata.push(!!window.localStorage?1:0); }catch(e){} try{ this.fpdata.push(!!window.sessionStorage?1:0); }catch(e){} try{ this.fpdata.push(!!window.indexDB?1:0); }catch(e){} try{ this.fpdata.push(!!window.webSQL?1:0); }catch(e){} // this.fireData(this.fpdata); return hashMyStyle(this.fpdata.join('###')); } function hashMyStyle(key){ try{ var remainder, bytes, h1, h1b, c1, c2, k1, i; remainder = key.length & 3; // key.length % 4 bytes = key.length - remainder; h1 = 31; c1 = 0xcc9e2d51; c2 = 0x1b873593; i = 0; while (i < bytes) { k1 = ((key.charCodeAt(i) & 0xff)) | ((key.charCodeAt(++i) & 0xff) << 8) | ((key.charCodeAt(++i) & 0xff) << 16) | ((key.charCodeAt(++i) & 0xff) << 24); ++i; k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff; k1 = (k1 << 15) | (k1 >>> 17); k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff; h1 ^= k1; h1 = (h1 << 13) | (h1 >>> 19); h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff; h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16)); } k1 = 0; switch (remainder) { case 3: k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16; case 2: k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8; case 1: k1 ^= (key.charCodeAt(i) & 0xff); k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff; k1 = (k1 << 15) | (k1 >>> 17); k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff; h1 ^= k1; } h1 ^= key.length; h1 ^= h1 >>> 16; h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff; h1 ^= h1 >>> 13; h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff; h1 ^= h1 >>> 16; return h1 >>> 0; }catch(e){ return 9999; } } var komentboxIframeId = NLPOptions['komentboxIframeId']; var myKbIframe=document.getElementById(komentboxIframeId); //var myKbIframe=document.getElementById('nlpcommentiframe'); var myray={lld:0,bl:0,fc:0,scrl:0,mmt:0}; var head=document.getElementsByTagName('head')[0]; var firyfire=document.createElement('SCRIPT'); var det=NLPOptions; det.rl=encodeURIComponent(window.location.href); det.dfp=logDeviceData(); det.uuid=uuid; console.log(det.dfp); det.NLPbot=0; try{ if(window.location.href.indexOf('NLPBot')!=-1){ det.NLPbot=1; } }catch(e){ } // window.localStorage.setItem('dfp',det.dfp); det.source='komentbox'; det.firstimpression=1; //console.log('KommentBox Impresssion'); firyfire.setAttribute('src','http://komentbox.nlpcaptcha.in/index.php/humanity/'+new Date().getTime()+"/"+Base64.encode(JSON.stringify(det))); head.appendChild(firyfire); det.kbfirstimpression=0; var nt = setInterval(function(){ if (window["fireSome"]){ clearInterval(nt); fireSome(det); } }, 1000); document.addEventListener('scroll',function(){ myray.scrl=1; myray.top=myKbIframe.getBoundingClientRect().top; myray.width=myKbIframe.clientWidth; myray.height=myKbIframe.clientHeight; myray.viswin=window.innerHeight; myKbIframe.contentWindow.postMessage(JSON.stringify(myray),'*'); myray.scrl=0; }); window.addEventListener('focus',function(){ myray.fc=1; myray.top=myKbIframe.getBoundingClientRect().top; myray.width=myKbIframe.clientWidth; myray.height=myKbIframe.clientHeight; myray.viswin=window.innerHeight; myKbIframe.contentWindow.postMessage(JSON.stringify(myray),'*'); myray.fc=0; }); window.addEventListener('blur',function(){ myray.bl=1; myray.viswin=window.innerHeight; myKbIframe.contentWindow.postMessage(JSON.stringify(myray),'*'); myray.bl=0; }); window.addEventListener('message',function(e){ try{ var dd=JSON.parse(e.data); if(typeof(dd) ==="number"){ myray.lld=1; myray.top=myKbIframe.getBoundingClientRect().top; myray.width=myKbIframe.clientWidth; myray.height=myKbIframe.clientHeight; myray.viswin=window.innerHeight; myray.url=window.location.href; myray.totHeight=screen.availHeight; myray.totWidth=screen.availWidth; myKbIframe.contentWindow.postMessage(JSON.stringify(myray),'*'); myray.lld=0; } }catch(e){ } }); document.addEventListener('mousemove',function(e){ try{ myray.mmt=1; myray.top=myKbIframe.getBoundingClientRect().top; myray.x=e.clientX; myray.y=e.clientY; myKbIframe.contentWindow.postMessage(JSON.stringify(myray),'*'); myray.mmt=0; }catch(e){ } });