Advertisement
Guest User

KSV - MosaikTV

a guest
Dec 10th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1. <?php
  2.   class Cryptage
  3.     {
  4.       public function decode($arg1)
  5.         {
  6.           $version = 1;
  7.           $cle     = "t4G3a9M0Zw7";
  8.           $loc1    = substr($cle, 0, 1);
  9.           $loc2    = 0;
  10.           $loc3    = strlen($arg1);
  11.           $loc4    = "";
  12.           $loc5    = "";
  13.           $loc8    = 0;
  14.           while ($loc2 < $loc3)
  15.             {
  16.               $loc7 = substr($arg1, $loc2, 1);
  17.               if ($loc7 != $loc1)
  18.                 {
  19.                   $loc8 = 1;
  20.                   while ($loc8 < strlen($cle))
  21.                     {
  22.                       $loc9 = substr($cle, $loc8, 1);
  23.                       if ($loc9 == $loc7)
  24.                         {
  25.                           if ($loc8 == 10)
  26.                               $loc8 = 0;
  27.                           $loc5 = $loc5 . $loc8;
  28.                           break;
  29.                         }
  30.                       $loc8++;
  31.                     }
  32.                 }
  33.               else
  34.                 {
  35.                   $loc4 = $loc4 . chr($loc5);
  36.                   $loc5 = "";
  37.                 }
  38.               $loc2++;
  39.             }
  40.           return $loc4;
  41.         }
  42.     }
  43.  
  44.   $crypt   = new Cryptage();
  45.   $decoded = $crypt->decode("encoded_xml_data_here");
  46.   file_put_contents("Decoded.xml", $decoded);
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement