SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2005
    Location
    Edmonton, AB
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What does this javascript code do?

    I found this code on my site this morning. Not sure what it does, and whether it's something my CMS put in or something else.

    Could you tell me what this does, and whether or not it's malicious?

    Code:
    <script type="text/javascript">
    //<![CDATA[
    var l=new Array();
    l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]=' 97';l[5]=' 99';l[6]=' 46';l[7]=' 98';l[8]=' 97';l[9]=' 46';l[10]=' 97';l[11]=' 109';l[12]=' 97';l[13]=' 64';l[14]=' 115';l[15]=' 116';l[16]=' 115';l[17]=' 101';l[18]=' 116';l[19]=' 110';l[20]=' 111';l[21]=' 67';l[22]=' 46';l[23]=' 100';l[24]=' 108';l[25]=' 114';l[26]=' 111';l[27]=' 119';l[28]=' 116';l[29]=' 115';l[30]=' 101';l[31]=' 87';l[32]='>';l[33]='\"';l[34]=' 97';l[35]=' 99';l[36]=' 46';l[37]=' 98';l[38]=' 97';l[39]=' 46';l[40]=' 97';l[41]=' 109';l[42]=' 97';l[43]=' 64';l[44]=' 115';l[45]=' 116';l[46]=' 115';l[47]=' 101';l[48]=' 116';l[49]=' 110';l[50]=' 111';l[51]=' 67';l[52]=' 46';l[53]=' 100';l[54]=' 108';l[55]=' 114';l[56]=' 111';l[57]=' 119';l[58]=' 116';l[59]=' 115';l[60]=' 101';l[61]=' 87';l[62]=':';l[63]='o';l[64]='t';l[65]='l';l[66]='i';l[67]='a';l[68]='m';l[69]='\"';l[70]='=';l[71]='f';l[72]='e';l[73]='r';l[74]='h';l[75]='a ';l[76]='<';
    for (var i = l.length-1; i >= 0; i=i-1){ 
    if (l[i].substring(0, 1) == ' ') document.write("&#"+unescape(l[i].substring(1))+";"); 
    else document.write(unescape(l[i]));
    }
    //]]>
    </script></a>.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by JohnnFour View Post
    I found this code on my site this morning. Not sure what it does, and whether it's something my CMS put in or something else.

    Could you tell me what this does, and whether or not it's malicious?
    It creates an email link on your page to Westworld.Contests@ama.ab.ca
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Oct 2005
    Location
    Edmonton, AB
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome. Much appreciated, Paul.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •