SHARE
TWEET

Untitled

a guest May 15th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // decrypt payload here
  2.  
  3. // figure out key
  4. $key = 0;
  5. for ($i = 0; $i<strlen($name); $i++)  {
  6.     $key = $key + ord(substr($name, $i,1));
  7. }
  8. $key = $key + 702;
  9.  
  10. // decrypt payload
  11.  
  12. $decrypted = "";
  13. $skey=strval($key);
  14. $klen=strlen($skey);
  15. $k = 0;
  16. $payload = stripslashes($payload);
  17. for ($i = 0; $i<strlen($payload); $i++) {
  18.   $c = substr($payload,$i,1);
  19.   $result = (substr($skey,$k,1) ^ $c);
  20.   $decrypted = $decrypted.$result;
  21.   $k++;
  22.   if($k+1>$klen) { $k = 0; }
  23. }
  24.  
  25. // ok, now we have $decrypted, split into component parts
  26. list($dname, $dscore, $did) = explode(':', $decrypted);
  27. if((!$did) or ($dname != $name)) {
  28. system("/bin/echo '$ip: cheater - name:$name dname:$dname' >> /home/kyung/kertong.com/html/kiwikick/scoreboard/log.debug 2>&1");
  29. print "<HTML><BODY>Hey!  No cheating!</BODY></HTML>";
  30. exit;
  31. } else
  32. {
  33.   // data is good!  start updating score
  34.   // first, check if user's UDID exists already
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top