Or: How Billy hacked Zombie Hooker Nightmare to get his name on TV during [adult swim].
public static function submit(arg0:String, arg1:Number) : String
{
strURI = null;
nGameId = null;
nScore = NaN;
nTime = NaN;
strTime = null;
strN1 = null;
strN2 = null;
n1 = NaN;
n2 = NaN;
nAlgo = NaN;
strToPass = null;
encrypted_data = null;
submission_data = null;
variables = null;
request = null;
gameID = arg0;
score = arg1;
try {
strURI = ExternalInterface.call("getLittleServer");
nGameId = gameID;
nScore = score;
nTime = ExternalInterface.call("getSrvrTime");
strTime = toString();
strN1 = substr(253, 3);
strN2 = substr(252, 3);
n1 = parseInt(strN1);
n2 = parseInt(strN2);
nAlgo = n1 * n2 * nScore + nScore;
strToPass = nGameId + "," + nScore + "," + nTime + "," + nAlgo;
//**********************
//**********************
//**********************
encrypted_data = MD5.hash(strToPass);
submission_data = "score=" + nScore + "|gameId=" + nGameId + "|timestamp=" + nTime + "|key=" + encrypted_data;
//**********************
//**********************
//**********************
variables = new URLVariables();
variables.attr1 = submission_data;
request = new URLRequest(strURI);
request.data = variables;
navigateToURL(request, "_self");
return submission_data;
} catch (e:Error) {
var loc1:* = e;
gameID = null;
}
return null;
}
|