Hi..
This code was inserted into the html files by someone gaining access to our small website. I have some basic programming knowledge, but don’t know much about js. Variables k1 and k2 appear to be random text in the original script, which I have replaced below, because I suspect it is later decoded in the while statements. I don’t want to post the original text, since I don’t know what it is when decoded. Can someone explain to me how to decode this? What is the purpose of this? There were also two inappropriate links added the html file, but I don’t think they are related to the script below.
Thanks in advance..
<script language=”javascript” type=”text/javascript”>
var k1=’Thisis89charactersofvarioustextincluding”$?>@thathavebeenremovedbecauseIdontknowhatitdoes’,
k2=’Thisis136charactersofvarioustextincluding”$?>@thathavebeenremovedbecauseIdontknowhatitdoesfillerfillerfillerfillerfillerfillerfillerfill’,
t1=0,
t2=0,
h=”;
while(t1<=k1.length-1){h=h+String.fromCharCode(k1.charCodeAt(t1++)-3);}
h=h+’bdjgazzazbzbbe’;
while(t2<=k2.length-1){h=h+String.fromCharCode(k2.charCodeAt(t2++)-2);}
document.write(h);
</script>