Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


	function _ba_punycode(){
	var l=2147483647,p=36,C=1,v=26,g=38,S=700,T=72,_=128,y="-",n=/^xn--/,r=/.|。|.|。/g,A=p-C,R=Math.floor,x=String.fromCharCode;
		function E(e,t){
		for(var n=e.length;
		n--;
		)e[n]=t(e[n]);
		return e
	}
		function o(e){
		var t,n,r,o,a,i,c,d=[],u=e.length,s=0,m=_,f=T,h=e.lastIndexOf(y);
		for(h<0&&(h=0),n=0;
		n<h;
			++n){
			if(128<=e.charCodeAt(n))return null;
			d.push(e.charCodeAt(n))
		}
		for(r=0<h?h+1:0;
		r<u;
			){
			for(o=s,a=1,i=p;;
				i+=p){
				if(u<=r)return null;
				if(c=e.charCodeAt(r++),p<=(c=c-48<10?c-22:c-65<26?c-65:c-97<26?c-97:p)||c>R((l-s)/a))return null;
				if(s+=c*a,c<(c=i<=f?C:f+v<=i?v:i-f))break;
				if(a>R(l/(c=p-c)))return null;
				a*=c
			}
				if(f=function(e,t,n){
				var r=0;
				for(e=n?R(e/S):e>>1,e+=R(e/t);
				A*v>>1<e;
				r+=p)e=R(e/A);
				return R(r+(A+1)*e/(e+g))
			}
			(s-o,t=d.length+1,0==o),R(s/t)>l-m)return null;
			m+=R(s/t),s%=t,d.splice(s++,0,m)
		}
			return E(d,function(e){
			var t="";
			return 65535<e&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)
		}
		).join("")
	}
		return{
			toUnicode:function(e){
				return t=function(e){
				return n.test(e)?o(e.slice(4).toLowerCase()):e
			}
			,E(e.split(r),t).join();
			var t
		}
	}
}
	!function(i){
		var c=2,n=("https:"==document.location.protocol?"https://":"http://")+"bitrix.info/bx_stat",d={
		host:null,aid:null
	}
		,u=function(e){
		if(!i._ba)return"";
		for(var t="",n=0;
		n<i._ba.length;
			n++){
			var r=i._ba[n];
			void 0!==e[r[0]]?e[r[0]]=r[1]:"function"==typeof r[1]?t+="&"+r[0]+"="+encodeURIComponent(r[1]()):t+="&"+r[0]+"="+encodeURIComponent(r[1])
		}
		return t
	}
		(d),s=function(){
		var e=i.performance;
		if(!e)return null;
			if(e.getEntriesByType){
			var t=e.getEntriesByType("navigation");
			if(t.length)return t[0]
		}
		if(e.timing)return e.timing;
		return null
	}
		(),t=function(){
			{
			if(i.XMLHttpRequest)return new XMLHttpRequest;
			if(i.ActiveXObject)return new i.ActiveXObject("Microsoft.XMLHTTP")
		}
		return null
	}
		(),m={
			_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){
			var t,n,r,o,a,i,c="",d=0;
			for(e=m._utf8_encode(e);
			d<e.length;
			)r=(i=e.charCodeAt(d++))>>2,o=(3&i)<<4|(t=e.charCodeAt(d++))>>4,a=(15&t)<<2|(n=e.charCodeAt(d++))>>6,i=63&n,isNaN(t)?a=i=64:isNaN(n)&&(i=64),c=c+this._keyStr.charAt(r)+this._keyStr.charAt(o)+this._keyStr.charAt(a)+this._keyStr.charAt(i);
			return c
		}
			,decode:function(e){
			var t,n,r,o,a,i="",c=0;
			for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");
			c<e.length;
			)t=this._keyStr.indexOf(e.charAt(c++))<<2|(r=this._keyStr.indexOf(e.charAt(c++)))>>4,n=(15&r)<<4|(o=this._keyStr.indexOf(e.charAt(c++)))>>2,r=(3&o)<<6|(a=this._keyStr.indexOf(e.charAt(c++))),i+=String.fromCharCode(t),64!=o&&(i+=String.fromCharCode(n)),64!=a&&(i+=String.fromCharCode(r));
			return i=m._utf8_decode(i)
		}
			,_utf8_encode:function(e){
			e=e.replace(/rn/g,"n");
			for(var t="",n=0;
			n<e.length;
				n++){
				var r=e.charCodeAt(n);
				r<128?t+=String.fromCharCode(r):(127<r&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))
			}
			return t
		}
			,_utf8_decode:function(e){
			for(var t="",n=0,r=c1=c2=0;
			n<e.length;
			)(r=e.charCodeAt(n))<128?(t+=String.fromCharCode(r),n++):191<r&&r<224?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((31&r)<<6|63&c2),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((15&r)<<12|(63&c2)<<6|63&c3),n+=3);
			return t
		}
	};
		i._baq=i._baq||{
	}
		,i._baq.setResponse=function(e){
		var t;
			null==function(e){
			e=document.cookie.match(new RegExp("(?:^|;
				 )"+e.replace(/([\.$?*|{
			}
			\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;
			]*)"));
			return e?decodeURIComponent(e[1]):void 0
		}
		("BX_USER_ID")&&e.uid&&(t=new Date((new Date).getTime()+31536e7),document.cookie="BX_USER_ID="+e.uid+";
		 path=/;
		 expires="+t.toUTCString())
	};
	var e,r,o,f="object"==typeof i.frameCacheVars;
		t&&s&&i.location.host&&function(e){
		if(null===e||i.location.host===e)return!0;
		var t=_ba_punycode();
		return i.location.host===t.toUnicode(e)
	}
		(d.host)&&null!==d.aid&&!(i.BX&&i.BX.admin)&&(f&&i.frameRequestStart&&2<=i.frameCacheVars.version?(e=!1,r=function(){
		i.BX&&!1===e&&(i.BX.addCustomEvent("onFrameDataProcessed",h),i.BX.addCustomEvent("onFrameDataRequestFail",h),e=!0)
	}
	,"loading"===document.readyState?document.addEventListener("readystatechange",r):((o=i.BX&&i.BX.frameCache?i.BX.frameCache:null)&&!0===o.frameDataInserted||i.frameRequestFail?h:r)()):0<s.domContentLoadedEventStart?h():document.addEventListener&&document.addEventListener("DOMContentLoaded",h,!1));
	var a=!1;
		function h(){
			a||(a=!0,"withCredentials"in t?(t.open("POST",n,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.withCredentials=!0,t.onreadystatechange=function(){
			var e;
			4==t.readyState&&200==t.status&&(e=JSON.parse(this.responseText),i._baq.setResponse(e))
		}
			,t.send(p())):function(){
			var e=document.createElement("script");
			e.type="text/javascript",e.async=!0,e.src=n+"?"+p();
			var t=document.getElementsByTagName("script")[0];
			t.parentNode.insertBefore(e,t)
		}
		())
	}
		function l(e){
			if(!e)return{
		};
		var t=e.navigationStart||e.startTime,n="";
		if(e.serverTiming&&0<e.serverTiming.length)for(var r=0;
		r<e.serverTiming.length;
			r++){
			var o=e.serverTiming[r];
			"string"==typeof o.name&&o.name.length&&(n+=(""===n?"":",")+o.name+":"+o.duration)
		}
			return{
			domContentLoaded:Math.ceil(e.domContentLoadedEventStart-t),connectionTime:Math.ceil(e.connectEnd-e.connectStart),domainLookup:Math.ceil(e.domainLookupEnd-e.domainLookupStart),serverRequestTime:Math.ceil(e.responseStart-e.requestStart),downloadTime:Math.ceil(e.responseEnd-e.responseStart),domInteractive:Math.ceil(e.domInteractive-t),redirectTime:Math.ceil(e.fetchStart-t),serverTiming:n
		}
	}
		function p(){
		var e=document.title,t=document.getElementsByTagName("h1")[0],n="";
			t&&(n=function(e){
			"string"==typeof e&&(e=e.replace(/^\s+|\s+$/g,""));
			return e
		}
		(t["textContent"in t?"textContent":"innerText"]));
		var r=0,o=i.performance.timing;
		o&&(r=o.domInteractive-o.domLoading);
		var a=null!==i.location.search.match("IFRAME=Y"),t=l(s),o="d="+encodeURIComponent(i.location.host)+"&ru="+encodeURIComponent(i.location.pathname)+"&dns="+t.domainLookup+"&tcp="+t.connectionTime+"&srt="+t.serverRequestTime+"&pdt="+t.downloadTime+"&rrt="+t.redirectTime+"&dit="+t.domInteractive+"&clt="+t.domContentLoaded+"&st="+t.serverTiming+"&prc="+r+"&sr="+i.screen.width+"x"+i.screen.height+"&com="+(f?"1":"0")+"&slr="+(a?"1":"0")+"&tmz="+(new Date).getTimezoneOffset()+"&xts="+(new Date).getTime()+"&ver="+c+"&aid="+encodeURIComponent(d.aid),r=i.BX&&i.BX.frameCache?i.BX.frameCache:null;
		return r?(o+="&lcp="+(0<r.lcp?r.lcp:t.domInteractive),(a=r.requestTiming)&&(r=l(a),o+="&xhr="+Math.ceil(a.duration)+","+r.domainLookup+","+r.connectionTime+","+r.serverRequestTime+","+r.downloadTime+","+r.redirectTime,o+="&xhr_st="+r.serverTiming)):o+="&lcp="+t.domInteractive,o+="&ptitle_64="+encodeURIComponent(m.encode(e)),o+="&ph1_64="+encodeURIComponent(m.encode(n)),o+=u
	}
}
(window);



© 2023 Quttera Ltd. All rights reserved.