View Single Post
  #2  
Old 11-11-2013, 10:14 AM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Cool

Re: how to decrypt and decode png files to real file (.ass)


you can use the following php script to decode the subtitles file.

Code:
<?php
  function decryptSubtitle($encrypted, $key = "5463201897")
    {
      $decrypted    = "";
      $encryptedLen = strlen($encrypted);
      $keyLen       = strlen($key);
      for ($i = 0; $i < $encryptedLen; $i++)
        {
          $dataCharCode = ord($encrypted[$i]);
          $keyInt       = substr($key, ($i % $keyLen) - 1, 1);
          $decodedChar  = chr($dataCharCode - $keyInt);
          $decrypted    = $decrypted . $decodedChar;
        }
      $decrypted = base64_decode($decrypted);
      return $decrypted;
    }

  file_put_contents("decrypted_subtitles.txt", decryptSubtitle(file_get_contents("http://animedigitalnetwork.fr/picture_3615.png")));
?>
PS: also don't ask the basic questions like how i can install php or use this script etc. it's trivial to rewrite this script to your language of choice.
Reply With Quote