home *** CD-ROM | disk | FTP | other *** search
- function initSession()
- {
- session = "";
- while(session.length < 20)
- {
- session += charTable.charAt(Math.round(Math.random() * (charTable.length - 4)));
- }
- }
- function submit(pGame, pDisciple, pScore0, pScore1, pScore2)
- {
- urlSubmit = "http://www.neodelight.com/v4/high_enter.php";
- s = "g=" + pGame + "&";
- s += "d=" + pDisciple + "&";
- s += "s0=" + pScore0 + "&";
- s += "s1=" + pScore1 + "&";
- s += "s2=" + pScore2 + "&";
- s += "se=" + escape(session);
- s += "&c=42";
- urlSubmit += "?s=" + escape(encrypt(encrypt(s,keystring),"AnotherKey4You2FindOut4815jiagIOm30JK"));
- getURL(urlSubmit,"_blank");
- }
- function encrypt(pString, pKey)
- {
- text = pString;
- crypt = "";
- checkSum = 0;
- i = 0;
- while(i < text.length)
- {
- char = tableIndex(text.charCodeAt(i),charTable);
- shift = tableIndex(pKey.charCodeAt(i % pKey.length),charTable);
- code = char + shift + checkSum;
- code %= charTable.length;
- crypt += charTableCrypt.charAt(code);
- checkSum += code;
- i++;
- }
- checkSum %= charTable.length;
- return crypt + "" + charTableCrypt.charAt(checkSum);
- }
- function tableIndex(pCharCode, pTable)
- {
- j = 0;
- while(j < pTable.length)
- {
- if(pCharCode == pTable.charCodeAt(j))
- {
- return j;
- }
- j++;
- }
- }
- _name = "highscores";
- charTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
- charTableCrypt = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
- keystring = "whytheheckdoyouwasteyourtimehackingthishighscorelist";
- initSession();
-