Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 11-11-2013, 12:53 AM
gaaara gaaara is offline
Member
 
Join Date: Nov 2013
Posts: 63
gaaara is on a distinguished road
Default

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


Hi,

I have an coded and encrypted .png file that I would like to decrypt and decode using an « ActionScript » fonction.

I know it’s coded using « basse64 » but I have no ideas what it is encrypted with. This fonction has what it takes to decrypt and decode and I want to use it to get the original .ass file.

I don’t have all the informations but I really am looking forward to make this all work.

Step #1 : Discovery of the encryption
Step #2 : Make the modifications to use the fonction to grab the .ass file.

Quote:
public static function decryptSubtitle(param1:String, param2:String = "5463201897") : String {
var _loc_7:String = null;
var _loc_8:int = 0;
var _loc_9:int = 0;
var _loc_10:int = 0;
var _loc_3:* = new ByteArray();
var _loc_4:String = "";
var _loc_5:int = 0;
while (_loc_5 < param1.length)
{

_loc_7 = param1.substr(_loc_5, 1);
_loc_8 = parseInt(param2.substr(_loc_5 % param2.length - 1, 1));
_loc_9 = _loc_7.charCodeAt(0);
_loc_10 = _loc_9 - _loc_8;
_loc_7 = String.fromCharCode(_loc_10);
_loc_4 = _loc_4 + _loc_7;
_loc_5++;
}
var _loc_6:* = Base64.decode(_loc_4).replace(/?»?""?»?/, "");
_loc_3.writeMultiByte(_loc_6, "iso-8859-1");
return _loc_3.toString();
}// end function
link for this files animedigitalnetwork dot fr/picture_3615.png
A++
Reply With Quote
  #2  
Old 11-11-2013, 11: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
  #3  
Old 11-11-2013, 12:35 PM
gaaara gaaara is offline
Member
 
Join Date: Nov 2013
Posts: 63
gaaara is on a distinguished road
Default

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


resolved !! tx
Reply With Quote
  #4  
Old 11-11-2013, 11:42 PM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Angry

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


you have posted my decryption script to several websites without mentioning the original author or this thread. this is not how it's supposed to be. you can't present someone else's work as your own. i have wasted time to look at your problem and come up with a working solution. so atleast give the credit where it's due.
Reply With Quote
  #5  
Old 11-12-2013, 08:06 AM
gaaara gaaara is offline
Member
 
Join Date: Nov 2013
Posts: 63
gaaara is on a distinguished road
Default

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


sorry I did not think about it .... and I can remove all on your request
Reply With Quote
  #6  
Old 11-12-2013, 11:50 AM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Lightbulb

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


Quote:
Originally Posted by gaaara View Post
sorry I did not think about it .... and I can remove all on your request
i am not against sharing of the script. but atleast you could have mentioned the original thread.
Reply With Quote
  #7  
Old 11-23-2013, 05:39 AM
karlo2105 karlo2105 is offline
Senior Member
 
Join Date: Sep 2011
Posts: 318
karlo2105 is on a distinguished road
Default

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


Without KSV many streams wouldn't work on VLC, so give him at least credit on what he does.
Reply With Quote
  #8  
Old 11-23-2013, 07:14 PM
gaaara gaaara is offline
Member
 
Join Date: Nov 2013
Posts: 63
gaaara is on a distinguished road
Default

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


Hello

Quote:
<?php
$formulaire = $_GET['formulaire'];
If ($formulaire==1)
{
$ID = strip_tags(substr($_POST['ID'],0, 100));
$safeID = mysql_escape_string($ID);
$nomfic = strip_tags(substr($_POST['nomfic'],0,100));
$safenomfic = mysql_escape_string($nomfic);
$verif = $_POST['parpost'];

if ($verif == "jeverifiequecapasseparformulaire")
{

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($safenomfic, decryptSubtitle(file_get_contents("http://animedigitalnetwork.fr/picture_".$safeID.".png")));
}
else
{
print "Erreur pas de formulaire détecté";
}
}
else
{
?>
<html>
<head><title>Get ADN Subtitles</title>
<body>
<form action="index.php?formulaire=1" method="post">
ID : <input type="text" name="ID">
Nom fichier : <input type="text" name="nomfic">
<input type="hidden" name="parpost" value="jeverifiequecapasseparformulaire">
<input type="submit" value=" Submit ">
</form>
</body>
</head>
</html>
<?php
}
?>
I want to make a form to retrieve the file but I can not manage to do what am
a pop to download the file

and would like to center the form in the center of the image http://i.imgur.com/dkHJSZR.png

sorry for my english

tx
Reply With Quote
  #9  
Old 04-15-2014, 06:16 AM
Liluy Liluy is offline
Junior Member
 
Join Date: Apr 2014
Posts: 14
Liluy is on a distinguished road
Default

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


Thanks, KSV, for the script.
The Key 5463201897 no longer works.
Do you have the solution for the new key?

http://animedigitalnetwork.fr/picture_4916.png

PS : Sorry if my English is not perfect.
Reply With Quote
  #10  
Old 04-16-2014, 01:51 AM
gaaara gaaara is offline
Member
 
Join Date: Nov 2013
Posts: 63
gaaara is on a distinguished road
Default

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


I am looking for the solution

links that may be useful
http://stackoverflow.com/questions/8...-encrypted-xml
http://stackoverflow.com/questions/2...448441#2448441
http://stackoverflow.com/questions/1...ryption-in-php

aes in swf
http://pastebin.com/71rD0KNb
xml
http://pastebin.com/QHxsX20H

the encrypted code possibly this code im not sure yet

50,52,115,98,117,109,54,100,122,102,56,114,101

Last edited by gaaara : 04-16-2014 at 03:44 AM.
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 03:17 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons