PDA

View Full Version : how to decrypt and decode png files to real file (.ass)


gaaara
11-10-2013, 11:53 PM
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.

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++

KSV
11-11-2013, 10:14 AM
you can use the following php script to decode the subtitles file.

<?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.

gaaara
11-11-2013, 11:35 AM
resolved !! tx

KSV
11-11-2013, 10:42 PM
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.

gaaara
11-12-2013, 07:06 AM
sorry I did not think about it .... and I can remove all on your request :(

KSV
11-12-2013, 10:50 AM
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.

karlo2105
11-23-2013, 04:39 AM
Without KSV many streams wouldn't work on VLC, so give him at least credit on what he does. ;)

gaaara
11-23-2013, 06:14 PM
Hello

<?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

Liluy
04-15-2014, 05:16 AM
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.

gaaara
04-16-2014, 12:51 AM
I am looking for the solution :)

links that may be useful
http://stackoverflow.com/questions/8356893/how-do-i-crack-into-this-encrypted-xml
http://stackoverflow.com/questions/2448256/php-mcrypt-encrypting-decrypting-file/2448441#2448441
http://stackoverflow.com/questions/19473535/aes-decryption-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

Liluy
04-16-2014, 06:57 AM
Thanks, for links.
I am also looking for the solution.

Zackangel
04-17-2014, 12:24 AM
the encoding method is different.
I look swf file in the site and here is the new code on the site...

May be :p

public static function decrypt(param1:String, param2:String) : String {
var _loc9_:* = NaN;
var _loc10_:* = NaN;
var _loc14_:* = NaN;
if(param1.length == 0)
{
return "";
}
var _loc3_:Array = charsToLongs(hexToChars(param1));
var _loc4_:Array = charsToLongs(strToChars(param2.substr(0,16)));
var _loc5_:Number = _loc3_.length;
var _loc6_:Number = _loc3_[_loc5_-1];
var _loc7_:Number = _loc3_[0];
var _loc8_:Number = 2.654435769E9;
var _loc11_:Number = Math.floor(6 + 52 / _loc5_);
var _loc12_:Number = _loc11_ * _loc8_;
while(_loc12_ != 0)
{
_loc10_ = _loc12_ >>> 2 & 3;
_loc14_ = _loc5_-1;
while(_loc14_ >= 0)
{
_loc6_ = _loc3_[_loc14_ > 0?_loc14_-1:_loc5_-1];
_loc9_ = (_loc6_ >>> 5 ^ _loc7_ << 2) + (_loc7_ >>> 3 ^ _loc6_ << 4) ^ (_loc12_ ^ _loc7_) + (_loc4_[_loc14_ & 3 ^ _loc10_] ^ _loc6_);
_loc7_ = _loc3_[_loc14_] = _loc3_[_loc14_] - _loc9_;
_loc14_--;
}
_loc12_ = _loc12_ - _loc8_;
}
var _loc13_:Array = longsToChars(_loc3_);
return charsToStr(_loc13_);
}

private static function charsToLongs(param1:Array) : Array {
var _loc2_:Array = new Array(Math.ceil(param1.length / 4));
var _loc3_:Number = 0;
while(_loc3_ < _loc2_.length)
{
_loc2_[_loc3_] = param1[_loc3_ * 4] + (param1[_loc3_ * 4 + 1] << 8) + (param1[_loc3_ * 4 + 2] << 16) + (param1[_loc3_ * 4 + 3] << 24);
_loc3_++;
}
return _loc2_;
}

private static function longsToChars(param1:Array) : Array {
var _loc2_:Array = new Array();
var _loc3_:Number = 0;
while(_loc3_ < param1.length)
{
_loc2_.push(param1[_loc3_] & 255,param1[_loc3_] >>> 8 & 255,param1[_loc3_] >>> 16 & 255,param1[_loc3_] >>> 24 & 255);
_loc3_++;
}
return _loc2_;
}

private static function longToChars(param1:Number) : Array {
var _loc2_:Array = new Array();
_loc2_.push(param1 & 255,param1 >>> 8 & 255,param1 >>> 16 & 255,param1 >>> 24 & 255);
return _loc2_;
}

private static function charsToHex(param1:Array) : String {
var _loc2_:String = new String("");
var _loc3_:Array = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
var _loc4_:Number = 0;
while(_loc4_ < param1.length)
{
_loc2_ = _loc2_ + (_loc3_[param1[_loc4_] >> 4] + _loc3_[param1[_loc4_] & 15]);
_loc4_++;
}
return _loc2_;
}

private static function hexToChars(param1:String) : Array {
var _loc2_:Array = new Array();
var _loc3_:Number = param1.substr(0,2) == "0x"?2:0;
while(_loc3_ < param1.length)
{
_loc2_.push(parseInt(param1.substr(_loc3_,2),16));
_loc3_ = _loc3_ + 2;
}
return _loc2_;
}

private static function charsToStr(param1:Array) : String {
var _loc2_:String = new String("");
var _loc3_:Number = 0;
while(_loc3_ < param1.length)
{
_loc2_ = _loc2_ + String.fromCharCode(param1[_loc3_]);
_loc3_++;
}
return _loc2_;
}

private static function strToChars(param1:String) : Array {
var _loc2_:Array = new Array();
var _loc3_:Number = 0;
while(_loc3_ < param1.length)
{
_loc2_.push(param1.charCodeAt(_loc3_));
_loc3_++;
}
return _loc2_;
}
}
}

gaaara
04-17-2014, 11:55 AM
or is the code I do not see ?

Zackangel
04-17-2014, 12:00 PM
In player-licensed.swf.

I decode the swf file and in scripts/wowza/encryptionAS3/TEA.
sceach decrypt function.

but I'm not sure that it is used for subtitles. :D

gaaara
04-17-2014, 12:12 PM
tx men ^^

KSV
04-17-2014, 11:32 PM
if you want me to take a look at it provide a working VPN and login information if required.

gaaara
04-18-2014, 08:33 AM
ksv pm :)

Liluy
04-20-2014, 02:38 AM
Thanks, KSV, gaaara.

KSV
04-20-2014, 05:56 AM
As someone pointed out in PM it seems another guy has already solved the problem so you can just use the solution provided by him (http://www.wareziens.net/forum/topic-21273-aesdecrypt-php-files-page-1.html#16). i will try to provide a faster version when i got some free time. but in the mean time above method is sufficient to convert the subtitles.

gaaara
04-20-2014, 12:09 PM
i forgot to post the link thank you ksv :)


one more thing for a perfect script

downloading video with script is possible ?

Zackangel
04-21-2014, 08:19 AM
thank you KSV XD

KSV
04-21-2014, 02:02 PM
so as promised here is the shorter and faster version of AnimeDigital script. it uses the mcrypt module to do the actual decryption so it's lot faster than pure php implementation. make sure you have mcrypt module installed and enabled on your system (enabled by default on windows).

AnimeDigital.php (https://github.com/K-S-V/Scripts/blob/master/AnimeDigital.php)

Liluy
04-21-2014, 02:31 PM
Thanks you ! KSV !

gaaara
04-21-2014, 11:26 PM
tx ksv :)

Liluy
04-24-2014, 04:04 PM
Adn has a new protection (htacsess redirection ) how to bypass this protection is on the picture?

gaaara
05-23-2014, 12:07 AM
site begins to ban ip loll

FRino
06-02-2014, 02:35 PM
Hi, can i send you a mp, to have more information gaara ? :D

denobis
06-08-2014, 04:39 AM
Hi, i'm working in adding this channel to atresdownloader. First tests works good, incrusting the subtitles too, but need premium account to make it more robust.

denobis
06-08-2014, 11:38 AM
For anyone interested, atresdownloader v15.7 finds and download streams from animedigital.fr with subtitle-decryption-incrustation implemented.

For those in France don't use proxies or use it for anonymity. Outside France the used free proxies not always returns valid data so the streams are limited to 5 min's. You can login and maybe get the premium links, but I don't have tested it.

Cheers!

nyan-nyan
07-06-2014, 09:54 PM
Hi Denobis.

Did you manage to get the whole subtitles file? When I try by myself I get just a small PNG file (around 6kb).

deltasebz
09-08-2014, 08:07 PM
Hi, I use the php script of KSV and my .ass can't be open in aegisub.

Pictures :
http://www.hostingpics.net/viewer.php?id=383912aegisub.jpg

http://www.hostingpics.net/viewer.php?id=836038notepad.jpg


Png files are around 30 ko and .ass around 25.

Any ideas ?
Thanks ;)

blurg
09-09-2014, 01:16 PM
me too, i think adn change crypt in png files
we need you KSV :p
http://puu.sh/btmLY/dd736e520a.png

package com.wowza.encryptionAS3
{

public class TEA extends Object
{

public function TEA()
{
return;
}// end function

public static function encrypt(param1:String, param2:String) : String
{
var _loc_9:Number = NaN;
var _loc_10:Number = NaN;
var _loc_14:Number = NaN;
if (param1.length == 0)
{
return "";
}
var _loc_3:* = charsToLongs(strToChars(param1));
if (_loc_3.length <= 1)
{
_loc_3[1] = 0;
}
var _loc_4:* = charsToLongs(strToChars(param2.substr(0, 16)));
var _loc_5:* = _loc_3.length;
var _loc_6:* = _loc_3[(_loc_5 - 1)];
var _loc_7:* = _loc_3[0];
var _loc_8:Number = 2654435769;
var _loc_11:* = Math.floor(6 + 52 / _loc_5);
var _loc_12:Number = 0;
while (_loc_11-- > 0)
{

_loc_12 = _loc_12 + _loc_8;
_loc_10 = _loc_12 >>> 2 & 3;
_loc_14 = 0;
while (_loc_14 < _loc_5)
{

_loc_7 = _loc_3[(_loc_14 + 1) % _loc_5];
_loc_9 = (_loc_6 >>> 5 ^ _loc_7 << 2) + (_loc_7 >>> 3 ^ _loc_6 << 4) ^ (_loc_12 ^ _loc_7) + (_loc_4[_loc_14 & 3 ^ _loc_10] ^ _loc_6);
var _loc_15:* = _loc_3[_loc_14] + _loc_9;
_loc_3[_loc_14] = _loc_3[_loc_14] + _loc_9;
_loc_6 = _loc_15;
_loc_14 = _loc_14 + 1;
}
}
var _loc_13:* = longsToChars(_loc_3);
return charsToHex(_loc_13);
}// end function

public static function decrypt(param1:String, param2:String) : String
{
var _loc_9:Number = NaN;
var _loc_10:Number = NaN;
var _loc_14:Number = NaN;
if (param1.length == 0)
{
return "";
}
var _loc_3:* = charsToLongs(hexToChars(param1));
var _loc_4:* = charsToLongs(strToChars(param2.substr(0, 16)));
var _loc_5:* = _loc_3.length;
var _loc_6:* = _loc_3[(_loc_5 - 1)];
var _loc_7:* = _loc_3[0];
var _loc_8:Number = 2654435769;
var _loc_11:* = Math.floor(6 + 52 / _loc_5);
var _loc_12:* = Math.floor(6 + 52 / _loc_5) * _loc_8;
while (_loc_12 != 0)
{

_loc_10 = _loc_12 >>> 2 & 3;
_loc_14 = _loc_5 - 1;
while (_loc_14 >= 0)
{

_loc_6 = _loc_3[_loc_14 > 0 ? ((_loc_14 - 1)) : ((_loc_5 - 1))];
_loc_9 = (_loc_6 >>> 5 ^ _loc_7 << 2) + (_loc_7 >>> 3 ^ _loc_6 << 4) ^ (_loc_12 ^ _loc_7) + (_loc_4[_loc_14 & 3 ^ _loc_10] ^ _loc_6);
var _loc_15:* = _loc_3[_loc_14] - _loc_9;
_loc_3[_loc_14] = _loc_3[_loc_14] - _loc_9;
_loc_7 = _loc_15;
_loc_14 = _loc_14 - 1;
}
_loc_12 = _loc_12 - _loc_8;
}
var _loc_13:* = longsToChars(_loc_3);
return charsToStr(_loc_13);
}// end function

private static function charsToLongs(param1:Array) : Array
{
var _loc_2:* = new Array(Math.ceil(param1.length / 4));
var _loc_3:Number = 0;
while (_loc_3 < _loc_2.length)
{

_loc_2[_loc_3] = param1[_loc_3 * 4] + (param1[_loc_3 * 4 + 1] << 8) + (param1[_loc_3 * 4 + 2] << 16) + (param1[_loc_3 * 4 + 3] << 24);
_loc_3 = _loc_3 + 1;
}
return _loc_2;
}// end function

private static function longsToChars(param1:Array) : Array
{
var _loc_2:* = new Array();
var _loc_3:Number = 0;
while (_loc_3 < param1.length)
{

_loc_2.push(param1[_loc_3] & 255, param1[_loc_3] >>> 8 & 255, param1[_loc_3] >>> 16 & 255, param1[_loc_3] >>> 24 & 255);
_loc_3 = _loc_3 + 1;
}
return _loc_2;
}// end function

private static function longToChars(param1:Number) : Array
{
var _loc_2:* = new Array();
_loc_2.push(param1 & 255, param1 >>> 8 & 255, param1 >>> 16 & 255, param1 >>> 24 & 255);
return _loc_2;
}// end function

private static function charsToHex(param1:Array) : String
{
var _loc_2:* = new String("");
var _loc_3:* = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _loc_4:Number = 0;
while (_loc_4 < param1.length)
{

_loc_2 = _loc_2 + (_loc_3[param1[_loc_4] >> 4] + _loc_3[param1[_loc_4] & 15]);
_loc_4 = _loc_4 + 1;
}
return _loc_2;
}// end function

private static function hexToChars(param1:String) : Array
{
var _loc_2:* = new Array();
var _loc_3:* = param1.substr(0, 2) == "0x" ? (2) : (0);
while (_loc_3 < param1.length)
{

_loc_2.push(parseInt(param1.substr(_loc_3, 2), 16));
_loc_3 = _loc_3 + 2;
}
return _loc_2;
}// end function

private static function charsToStr(param1:Array) : String
{
var _loc_2:* = new String("");
var _loc_3:Number = 0;
while (_loc_3 < param1.length)
{

_loc_2 = _loc_2 + String.fromCharCode(param1[_loc_3]);
_loc_3 = _loc_3 + 1;
}
return _loc_2;
}// end function

private static function strToChars(param1:String) : Array
{
var _loc_2:* = new Array();
var _loc_3:Number = 0;
while (_loc_3 < param1.length)
{

_loc_2.push(param1.charCodeAt(_loc_3));
_loc_3 = _loc_3 + 1;
}
return _loc_2;
}// end function

}
}

gaaara
09-13-2014, 02:41 PM
out to date

KSV
09-14-2014, 04:21 AM
They have only updated the decryption key. i have updated the script (https://github.com/K-S-V/Scripts/blob/master/AnimeDigital.php) accordingly.

blurg
09-14-2014, 04:57 AM
the key have 1 more time change but........=>MP

gaaara
09-14-2014, 07:24 AM
résolv

KSV
09-14-2014, 08:45 AM
i don't understand what you guys are trying to say. why you are replacing new key with something else and then asking why it's not working? i have tested the script on following sample and it works as expected.

http://www.filedropper.com/m321

gaaara
09-14-2014, 08:55 AM
the new key in files swf

blurg
09-14-2014, 09:30 AM
KSV i know, but ADN have 1 more time changing the key since last time

KSV
09-14-2014, 09:47 AM
hmm.. either it was a pure coincidence or they are changing keys on some rotational basis. anyway i have pushed the new key.

gaaara
09-14-2014, 10:35 AM
Tomorrow we'll see if that changes or not :)

KSV
09-14-2014, 08:08 PM
so my suspicion was correct. they are changing keys on rotational basis. anybody trying to use my script should extract new key from mulutibu.swf file (AES.iv function) and replace the same in my script before doing the decryption.

gaaara
09-14-2014, 08:22 PM
how to download the swf files on my pc is not possible i use this website temporarily http://www.showmycode.com/

I would like to create a script to automatically download and decompile the files

denobis
09-15-2014, 09:00 AM
You could try something like

$video ="http://animedigitalnetwork.fr/video/nabari/1209-episode-1-l-eveille";
$mulutibu="http://animedigitalnetwork.fr/components/com_vodvideo/mediaplayer/plugins/mulutibu/mulutibu_v4_3.swf?2014-9-15";

$cookie="18acd9b63ecbf50de0b8c010c2b7289f=scr7v5sbl1cigjea4 r34t1o164; _gat=1; 029c45c1dfee71ebf42bcb3e469d93a8=192723e9683e7be6f e590f5e2cea5495; YWRuLWF1dGhfNTY0XzA=5416ddb290d49389328251; a2506a7b1c9f80a536e0f254bf8c954d=424441415146+A+5+ B55465917+7425D595D141D1111+344444E5642+6415F404A+ A5B465146+01D+D1219; _ayl_ga=GA1.2.979632947.1410784725; 4447d1d3085bd19536e003183aa51b5f=aa9fd9fdebdc9c032 c71330332060f8d; _ga=GA1.2.884074519.1410784653; YWRuLWF1dGhfMTIwOV85Nzk1Mg=5416dea5ec396591227138";

$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>
"User-Agent: stagefright/1.2 (Linux;Android 4.2.2)\r\n".
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n".
"Connection: keep-alive\r\n".
"Accept-Encoding: gzip,deflate\r\n".
"Cookie: $cookie\r\n".
"Referer: $video\r\n",
//'proxy' => "tcp://$prox",
)
);

$context = stream_context_create($opts);
$swf = file_get_contents($mulutibu, false, $context);

$swf=bin2hex(gzuncompress(substr($swf,8)));

$iv=explode("24",extrae($swf,"62052404d3a215d3ffff620848","d030","5620"));

$key="";

foreach ($iv as $c)
{
$actual=chr(hexdec(substr($c,0,2)));
$key.=$actual;
if (strlen($c)>2)
$key.=$actual;
}

echo $key;

The cookies and the url of mulutibu can change, but the extractor seems fine if only changes the key inside the swf.

gaaara
09-15-2014, 11:43 AM
how to use this script ?

denobis
09-15-2014, 01:45 PM
Copy & save the next to adnivkey.php in the php directory

<?php
$video ="http://animedigitalnetwork.fr/video/nabari/1209-episode-1-l-eveille";
$mulutibu="http://animedigitalnetwork.fr/components/com_vodvideo/mediaplayer/plugins/mulutibu/mulutibu_v4_3.swf?2014-9-15";

$cookie="18acd9b63ecbf50de0b8c010c2b7289f=scr7v5sbl1cigjea4 r34t1o164; _gat=1; 029c45c1dfee71ebf42bcb3e469d93a8=192723e9683e7be6f e590f5e2cea5495; YWRuLWF1dGhfNTY0XzA=5416ddb290d49389328251; a2506a7b1c9f80a536e0f254bf8c954d=424441415146+A+5+ B55465917+7425D595D141D1111+344444E5642+6415F404A+ A5B465146+01D+D1219; _ayl_ga=GA1.2.979632947.1410784725; 4447d1d3085bd19536e003183aa51b5f=aa9fd9fdebdc9c032 c71330332060f8d; _ga=GA1.2.884074519.1410784653; YWRuLWF1dGhfMTIwOV85Nzk1Mg=5416dea5ec396591227138";

$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>
"User-Agent: stagefright/1.2 (Linux;Android 4.2.2)\r\n".
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n".
"Connection: keep-alive\r\n".
"Accept-Encoding: gzip,deflate\r\n".
"Cookie: $cookie\r\n".
"Referer: $video\r\n",
//'proxy' => "tcp://213.174.124.185:3128",
)
);

$context = stream_context_create($opts);

$swf = file_get_contents($mulutibu, false, $context);

$swf=bin2hex(gzuncompress(substr($swf,8)));

$iv=explode("24",explode("5620",explode("d030",explode("62052404d3a215d3ffff620848",$swf)[1])[1])[0]);

$key="";

foreach ($iv as $c)
{
$actual=chr(hexdec(substr($c,0,2)));
$key.=$actual;
if (strlen($c)>2)
$key.=$actual;
}

echo $key;
file_put_contents("adnivkey.txt", $key);
?>

and run it with php.exe. The result in the archive adnivkey.txt. I think it works if you are in France, but with vpn i dont know. Try.

gaaara
09-15-2014, 02:03 PM
i don not have any text files sorry im on linux

blurg
09-16-2014, 05:44 AM
with windows i have this message in CMD

C:\php>php teste.php

Warning: gzuncompress(): data error in C:\php\teste.php on line 25

denobis
09-16-2014, 02:04 PM
The problem are the cookies.

Try this

http://www.mediafire.com/view/jmx257waccgmkc0/adnextractkey.php

with login

php adnextractkey.php --login=login --pass=password

If you dont want proxies pass --noproxy too.

gaaara
09-16-2014, 10:54 PM
hello

it is not necessary to use cookie for downloads this swf test this smal script :)


<?php
$swffile = file_get_contents('http://animedigitalnetwork.fr/components/com_vodv$
file_put_contents('mulutibu_v4_3.swf', $swffile);
?>


it works :) is an exemple :)

denobis
09-17-2014, 03:22 AM
The script works and the key is now

a446fc7f58805dbc1472105773367dac

Can you confirm it?

For me i need to get the call with the cookies and the returned swf seems corrupt, and then the correction changes.

blurg
09-17-2014, 07:13 AM
i tryint whith an proxy "FR" (work to watch swf on adn.fr)

but i have message :

c:\php\php adnextractkey.php --login=XXXXXX --pass=XXXXX

trying init
c:\

and have not created txt file

denobis
09-17-2014, 08:25 AM
Try the compiled exe

http://www.mediafire.com/download/o7l1aoqn8cenpc2/adnivkey.exe

Use without login if you're in France:

simply run the program.

Use login outside.

blurg
09-17-2014, 10:17 AM
i have the same key but i insert in animedigital.php but the .ass is not decrypt
:/

denobis
09-17-2014, 10:51 AM
I think you've substituted

$key = pack("C*", 48, 99, 101, 102, 56, 56, 56, 101, 56, 48, 99, 51, 49, 48, 57, 49, 54, 102, 55, 101, 97, 98, 100, 97, 54, 100, 51, 97, 51, 98, 57, 52);

to

$key="a446fc7f58805dbc1472105773367dac";

gaaara
09-17-2014, 11:04 AM
denobis you have skype

blurg
09-17-2014, 11:05 AM
i tried
$key = pack('H*', "a446fc7f58805dbc1472105773367dac");

and
$key = pack('C*', "a446fc7f58805dbc1472105773367dac");

i will try
$key="a446fc7f58805dbc1472105773367dac"; <= worked

jojos23
09-17-2014, 11:07 AM
Thanks Denobis. It's worked for me :).

gaaara
09-17-2014, 03:32 PM
denobis you speek french


edit

french poste
http://stream-recorder.com/forum/extraction-et-d-cryption-fichier-png-adn-t18809.html?p=70676#post70676

is not easy for everyone to speek english :)

blurg
10-02-2014, 11:23 AM
i have found a program to decompile swf in dos shell
and put je sentence key in txt
with FFdec64

baka.shinji
10-02-2014, 02:59 PM
I tried several Times with denobis hints without result.
I 'can't get the decryption Key :/

denobis
10-02-2014, 04:50 PM
Try http://www.mediafire.com/download/o7l1aoqn8cenpc2/adnivkey.exe

Usage

adnivkey --login=login --pass=pass

if you are in France add --noproxy

The ivkey now is 73e13fae869893a5d9d1bc7d9cb96836

baka.shinji
10-03-2014, 12:53 AM
I works!
Thank you very much Denobis, for your work and your patience :)

blurg
10-03-2014, 06:21 AM
@denobis : i have test your key but i have another problem

$key = 73e13fae869893a5d9d1bc7d9cb96836

shell dos :

error ligne xx e13fae869893a5d9d1bc7d9cb96836

denobis
10-03-2014, 07:43 AM
@denobis : i have test your key but i have another problem

$key = 73e13fae869893a5d9d1bc7d9cb96836

shell dos :

error ligne xx e13fae869893a5d9d1bc7d9cb96836

$key = "73e13fae869893a5d9d1bc7d9cb96836";

gaaara
10-12-2014, 04:50 PM
hello

i have a probleme with key générated of your script dénobis

is a good key is not a probleme juste but it works randomly

on the script
$open = fopen("php\key\keyfile.txt", "r");
$okey=fgets($open,255);
$td = mcrypt_module_open('rijndael-128', '', 'ecb', '');
$iv = str_repeat("\x00", 16);

$key = pack("A*",$okey); ## **not working**

$key = $key . str_repeat("\x00", 32 - strlen($key));
mcrypt_generic_init($td, $key, $iv);
$key = mcrypt_generic($td, $key);
$key = str_repeat(substr($key, 0, 16), 2);
mcrypt_generic_deinit($td);

the key is readable

test code
<?php
$key = pack('A*', 'b8e3c43ee882b09ec4e7ace525dfd45');
echo "$key"
?>


résult
[gaaara@localhost adn]$ php test
b8e3c43ee882b09ec4e7ace525dfd45

jus actualy not works

denobis
10-12-2014, 04:53 PM
hello

i have a probleme with key générated of your script dénobis

is a good key is not a probleme juste but it works randomly

on the script
$open = fopen("php\key\keyfile.txt", "r");
$okey=fgets($open,255);
$td = mcrypt_module_open('rijndael-128', '', 'ecb', '');
$iv = str_repeat("\x00", 16);

$key = pack("A*",$okey); ## **not working**

$key = $key . str_repeat("\x00", 32 - strlen($key));
mcrypt_generic_init($td, $key, $iv);
$key = mcrypt_generic($td, $key);
$key = str_repeat(substr($key, 0, 16), 2);
mcrypt_generic_deinit($td);

the key is readable

test code
<?php
$key = pack('A*', 'b8e3c43ee882b09ec4e7ace525dfd45');
echo "$key"
?>


résult
[gaaara@localhost adn]$ php test
b8e3c43ee882b09ec4e7ace525dfd45

jus actualy not works

$key = $okey; ## **working**

The key is 'b8e3c43ee882b09ec4e7ace525dfd45', dont repack it, but adjust it to 32 bytes

0b8e3c43ee882b09ec4e7ace525dfd45

change the script anyway to

$iv=array_slice(explode("24",explode("5620",explode("d030",explode("62052404d3a215d3ffff620848",$swf)[1])[1])[0]),1);

$key="";

foreach ($iv as $c)
{
$actual=sprintf("%02x",chr(hexdec(substr($c,0,2))));
$key.=str_repeat($actual,strlen($c)/2);

}

gaaara
10-12-2014, 05:44 PM
What I have to replace exactl

<?php

//get the encryption key
$swf=file_get_contents("mulutibu_v4_3.swf");
$swf = bin2hex(gzuncompress(substr($swf,8)));
if (!strpos($swf,"62052404d3a215d3ffff620848")) die("bad");

$iv=explode("24",explode("5620",explode("d030",explode("62052404d3a215d3ffff620848",$swf)[1])[1])[0]);

$key1="";

foreach ($iv as $c)
{
$actual=chr(hexdec(substr($c,0,2)));
$key1.=$actual;
if (strlen($c)>2)
$key1.=$actual;
}

echo "\r\nivkey:".trim($key1);
echo "\r\nThe key is in the file adnivkey.txt";
file_put_contents("adnivkey.txt", trim($key1));

?>


this part ?
$iv=explode("24",explode("5620",explode("d030",explode("62052404d3a215d3ffff620848",$swf)[1])[1])[0]);

$key1="";

foreach ($iv as $c)
{
$actual=chr(hexdec(substr($c,0,2)));
$key1.=$actual;
if (strlen($c)>2)
$key1.=$actual;
}

i have edited the files and get this
ivkey:06090709040108010000000009000505060102020606 00040003070000070800

and test not working

I do not understand why the script can not decrypt the file

denobis
10-12-2014, 06:52 PM
Send me a valid mulutibu.swf

gaaara
10-12-2014, 06:58 PM
mp :)

gaaara
10-19-2014, 09:04 AM
Hi everyone !

I need help with Python, I would like to be able to connect to a web page and then retrieve the cookies from it and then put them in a text file.
Thanks !

baka.shinji
10-25-2014, 04:43 PM
Hello.
Now I have an error message when executing denobis script:

Checking login.OK

Login activo
Trying mulutibu.OK
Garbage found. Trying to recover
FATAL: erealloc(): Unable to allocate 1169326080 bytes

FRino
10-26-2014, 10:23 AM
same problem

denobis
10-26-2014, 12:02 PM
e9427317608d2db13a35b7d4e7c756b5

baka.shinji
10-26-2014, 02:51 PM
Thank you denobis.

baka.shinji
11-02-2014, 02:33 PM
Did anyone manage to find a new solution ? ^^;

baka.shinji
11-11-2014, 12:03 PM
I guess no :(

Informatoque
11-12-2014, 10:55 AM
Yeah please if anyone finds a new solution...

Denobis, it'd be great if you could help. I'm not asking for all the work to be done because I've researched the problem myself but now I'm stuck:

It seems to not be possible to access the mulutibu_v4_3.swf file anymore but I've done some research and decompiling and I found a file called mediaplayer.js (I've attached it) and here's what seems interesting:

var today = new Date();
var todayString = today.getFullYear() + "-" + (today.getMonth()+1) + "-" + today.getDate();
var mulutibu = mediaPlayerDirectory + "plugins/mulutibu/mulutibu_v4_3.swf?" + todayString;
if (this.get("simpleMode")) {
mulutibu = mediaPlayerDirectory + "plugins/mulutibu/mulutibu_v4_3.simple.swf?" + todayString;
}
if (this.get("fan")) {
mulutibu = mediaPlayerDirectory + "plugins/mulutibu/mulutibu_v4_3.fan.swf?" + todayString;
}
plugins[mulutibu] = {
back: false,
cc: this.get("login")
};


So from that I tried the mulutibu_v4_3.simple.swf file and there seems to be no AES.as file.
So then I tried the mulutibu_v4_3.fan.swf file and there was an AES.as file (which I've also attached).
But now I'm stuck and can't go any further so any help is appreciated :)

Thanks

Stream Ripper
11-12-2014, 10:52 PM
Did this work for you?

Informatoque
11-13-2014, 04:00 AM
Did this work for you?
I never had a chance to try the technique given on this thread because as it was stated, the key changes on a rotational basis, presumably every day. And something was changed on the websites because I can't seem to download the previously stated swf file containing the key. I tried both php scripts, the exe, the by hand technique and reproducing part of the php script actions by hand with no success. Which is why I posted here...

blurg
11-17-2014, 08:00 AM
i have take the ksv script with little adapt to decompile mulutibu swf and it work perfectly
aes.as is present inside with this fucking key XD

kojiro
11-19-2014, 05:45 AM
Adapt what?
Send the KSV please.

baka.shinji
11-20-2014, 10:38 PM
@blurg: could you share your script with us please ?

locobastos
12-16-2014, 01:05 PM
Can someone learn to us how to find the key plz ?

On the last AnimeDigital.php script of KSV, I thank I just had to replace

$key = pack("C*", 48, 99, 101, 102, 56, 56, 56, 101, 56, 48, 99, 51, 49, 48, 57, 49, 54, 102, 55, 101, 97, 98, 100, 97, 54, 100, 51, 97, 51, 98, 57, 52);

by what I found in

http://xxxxxxxxx.fr/components/com_vodvideo/mediaplayer/plugins/mulutibu/mulutibu_v4_3.fan.swf
In which we have :
scripts/com/longtailvideo/plugins/mulutibu/AES :


private static function iv() : String
{
var _loc1_:Array = [99,99,57,102,99,51,50,50,54,51,57,100,54,100,50,51 ,57,97,54,50,97,50,99,99,48,101,102,54,100,53,55,9 8];
var _loc2_:* = "";
var _loc3_:* = 0;
while(_loc3_ < _loc1_.length)
{
_loc2_ = _loc2_ + String.fromCharCode(_loc1_[_loc3_]);
_loc3_++;
}
return _loc2_;
}


After ASCII to CHAR :
Their var _loc1_ = cc9fc322639d6d239a62a2cc0ef6d57b (it's right ?)

But it's not their decrypt key, isn't it ? How to find it ?

on the adnivkey.php this topic gave to us, we have


$video = the url of the vide;
$mulutibu = "http://animedigitalnetwork.fr/components/com_vodvideo/mediaplayer/plugins/mulutibu/mulutibu_v4_3.swf?2014-12-16";
$cookie="18acd9b63ecbf50de0b8c010c2b7289f=scr7v5sbl1cigjea4 r34t1o164; _gat=1; 029c45c1dfee71ebf42bcb3e469d93a8=192723e9683e7be6f e590f5e2cea5495; YWRuLWF1dGhfNTY0XzA=5416ddb290d49389328251; a2506a7b1c9f80a536e0f254bf8c954d=424441415146+A+5+ B55465917+7425D595D141D1111+344444E5642+6415F404A+ A5B465146+01D+D1219; _ayl_ga=GA1.2.979632947.1410784725; 4447d1d3085bd19536e003183aa51b5f=aa9fd9fdebdc9c032 c71330332060f8d; _ga=GA1.2.884074519.1410784653; YWRuLWF1dGhfMTIwOV85Nzk1Mg=5416dea5ec396591227138";

...

$iv=explode("24",explode("5620",explode("d030",explode("62052404d3a215d3ffff620848",$swf)[1])[1])[0]);


I don't have this so long cookie...
And the 62052404d3a215d3ffff620848 is the key ? I don't think so...

To be clear on what i'm asking for, how to find the latest decrypt key, and with which script can we decrypt these png ?

Thx in advance for answers !

blurg
12-24-2014, 09:49 AM
the better is extract base64 key code directly in swf with ffdecode

***.fr have change the protocole cookie to take the information automatiquely

gaaara
12-24-2014, 10:43 PM
blurg skype

baka.shinji
12-30-2014, 01:24 PM
Well, since nobody seems to want to share the script, could someone give me the current encryption key please?
Thank you!

locobastos
01-04-2015, 01:22 PM
Sleepingofrest, please help us, i don't want to steal your work, i just want to do what you are don't doing (i'm interrested in 23 series of their catalog you are don't doing)

gaaara
02-24-2015, 09:20 PM
wath the f**** is impossible to access on the site with any vpn .... ip is not ban

gaaara
03-20-2015, 09:27 PM
for the moment is not possible to get png a new protection is added ...

Liluy
03-25-2015, 01:02 PM
New ADN protection.
AES in multibu greatly changed.

Legremlins_Keitaro
03-25-2015, 01:37 PM
Nothing change, AES is still the same, no difference between september 2014 multibu and march 2015 multibu in the AES function.

But yes, protection change, and now they can block IP to get subtitle => you can show the video but not the subtitle.

blurg
03-26-2015, 07:00 AM
they are another protection inside swf

aes.as (base script)
and aes_constantes.as (new script)

and a few ligne in aes.as script are change
(exemple ligne 147 to 171)

Liluy
03-26-2015, 10:25 AM
Yes, if you want to see the difference between the old and the new here.

AES constantes :
package com.longtailvideo.plugins.mulutibu6
{
import mx.core.ByteArrayAsset;

public class AES_Constantes extends ByteArrayAsset
{

public function AES_Constantes()
{
super();
}
}
}

and

public static function d(param1:String, param2:int, param3:int = 63) : String
{

The number after param3: int = changes every day

KSV
03-26-2015, 12:59 PM
it was just a minor change in key retrieval. rest of the algorithm is still same. i will push the update to my repository soon.

KSV
03-26-2015, 01:21 PM
update pushed to the repository (https://github.com/K-S-V/Scripts/blob/master/AnimeDigital.php). if they only change third parameter on rotational basis then you can update the $start variable to new one to decrypt successfully. if someone can confirm that they don't change AES constants regularly then script can be further refined to work without requiring any changes at all. i have tested this script on this file (http://www.filedropper.com/adn).

Liluy
03-26-2015, 01:27 PM
Thanks you ! KSV !
It works perfectly !

blurg
03-26-2015, 02:17 PM
thx KSV you're the best

but i have just a question about the key in your update script

$key = substr("eab023e7fdc6e8c6908e116bc550aa7099d46f866436c5a763 b0fbfb73a23eceb8d313f7722af47d4530bdbd96d970d8821d 0707d284b585ff5"....

how do you have this because the ligne 135 in aes.as change everyday too


03/27/2015 00H20
the new mulutibu swf

doesn't work even when i change $start variable

KSV
03-27-2015, 12:53 AM
aes constants are embedded as binary data in swf file. you just have to get the new constants and starting number from updated swf file. i have amended the previous commit (https://github.com/K-S-V/Scripts/commit/3cc8ca9de346089b673b803cd6233e8c0bca3871) so you can directly copy paste that data with minimal changes (replace '0x' with '\x') into script.

gaaara
03-27-2015, 06:47 AM
how to get this information automatically with a script ? exemple denobis script


<?php

//get the encryption key
$swf=file_get_contents("mulutibu_v4_3.swf");
$swf = bin2hex(gzuncompress(substr($swf,8)));
if (!strpos($swf,"62052404d3a215d3ffff620848")) die("bad");

$iv=explode("24",explode("5620",explode("d030",explode("62052404d3a215d3ffff620848",$swf)[1])[1])[0]);

$key1="";

foreach ($iv as $c)
{
$actual=chr(hexdec(substr($c,0,2)));
$key1.=$actual;
if (strlen($c)>2)
$key1.=$actual;
}

echo "\r\nivkey:".trim($key1);
echo "\r\nThe key is in the file adnivkey.txt";
file_put_contents("adnivkey.txt", trim($key1));

?>

and how to décompile swf files on linux

blurg
03-27-2015, 08:45 AM
KSV you're a god
the old iv function are not used XD

essaiedf
03-28-2015, 04:32 PM
aes constants are embedded as binary data in swf file. you just have to get the new constants and starting number from updated swf file. i have amended the previous commit (https://github.com/K-S-V/Scripts/commit/3cc8ca9de346089b673b803cd6233e8c0bca3871) so you can directly copy paste that data with minimal changes (replace '0x' with '\x') into script.

Hello, I find the binary data replace '0x' with '\x' but not the starting number.
"param3:int = 59" where 59 is the starting number for today ( $start = 59; ) ?

because it's not work for me
:(

KSV
03-29-2015, 12:10 AM
Hello, I find the binary data replace '0x' with '\x' but not the starting number.
"param3:int = 59" where 59 is the starting number for today ( $start = 59; ) ?

because it's not work for me
:(

make sure that you grabbed the mulutibu.swf file from same session as the subtitles file and their own player was able to decrypt and display those subtitles.

essaiedf
03-29-2015, 01:17 AM
???

on ADN.fr videos and subtitles play fine!

mulutibu.swf and png are from same session (28/03/2015) but can't decrypt it

I do a other session 29/03/2015 but mulu and png from this session but can't decrypt it to!

Can I post you a private message with 1 png, the mulu and your modified php from the same session?

KSV
03-29-2015, 03:22 AM
Can I post you a private message with 1 png, the mulu and your modified php from the same session?

you can send the files via pm.

essaiedf
03-29-2015, 06:39 AM
private message send

gaaara
03-29-2015, 07:09 AM
it works fine :) test your ip on website adn it is probable that your IP is ban



to see if this is the case watching a video if it does not subtitled you is banned

essaiedf
03-29-2015, 07:32 AM
it works fine :) test your ip on website adn it is probable that your IP is ban



to see if this is the case watching a video if it does not subtitled you is banned

I can play video and I have subtitle on the site, I think I do a mistake on the script but where?

I hope KSV can answer me

essaiedf
03-29-2015, 09:02 AM
I do some tests:
the result are the same!

I can play video subbed in chrome and ie

but I can't decrypt png (mulutibu from chrome and ie are egal...same crc32)

I dump my system memory and I can find subtitle text when play video subbed but I can do nothing with it because text is not as .ass format and text are everywhere in memory :mad:

KSV
03-29-2015, 09:44 AM
i have checked your provided files and you are modifying the script file in correct way. how are you saving the png file? i strongly suspect that you are probably issuing the new request to download the subtitle file. i suggest you try with fiddler to save the png file originally requested by browser. if some other user can share the png file for 28 and 29 march then it would be easy to compare if you got the correct file.

gaaara
03-29-2015, 10:06 AM
the png files is compress with a http gzip :) fiddler is the solution

ksv i have a question for you i send a pm :)

essaiedf
03-29-2015, 10:20 AM
i have checked your provided files and you are modifying the script file in correct way. how are you saving the png file? i strongly suspect that you are probably issuing the new request to download the subtitle file. i suggest you try with fiddler to save the png file originally requested by browser. if some other user can share the png file for 28 and 29 march then it would be easy to compare if you got the correct file.

It's work now!!!
Thank you!!! I download png as usual (directly in browser) but it's maybe a new protection
but with fiddler it's ok

Thank!!!!

KSV
03-29-2015, 11:28 AM
the png files is compress with a http gzip :) fiddler is the solution

his png file contains properly encoded base64 data so it's not due to http compression.

I download png as usual (directly in browser) but it's maybe a new protection
but with fiddler it's ok

Most probably they are sending either junk data or data encrypted with different key when the png request doesn't contain proper authentication data.

blurg
03-30-2015, 11:18 AM
to catch the png you would take it with fiddler

the png are gzip/deflate compress after use the ksv script to decrypt it

denobis
04-02-2015, 08:34 AM
New constants

0x340x610x340x630x370x340x350x300x310x340x300x360x 340x640x350x660x300x300x370x330x660x340x350x390x63 0x660x380x630x620x370x630x360x380x360x380x340x660x 320x330x360x620x320x320x350x360x620x610x360x620x38 0x640x310x310x390x660x340x650x630x360x660x300x390x 610x360x320x650x340x340x620x330x630x640x620x640x64 0x320x310x630x380x360x660x640x620x620x370x620x610x 640x300x360x340x660x370x340x620x370x350x390x310x30 0x660x390x360x310x310x630x620x630x640x620x380x660x 390x620x370x650x300x620x380x640x650x340x340x650x32 0x350x610x620x330x320x620x390x310x370x660x370x300x 310x390x640x320x370x330x660x380x650x350x380x310x33 0x610x350x630x350x390x350x650x300x37

start 63

denobis
04-02-2015, 10:33 AM
To get the key simply search mulutibu in adownloader.

edit:

Put the png in atres's folder under name adn.png

denobis
04-10-2015, 04:56 AM
Adn is again working on adownloader with de automatic decryption of the subtitles.

I've checked it with free videos. You need anyway login's parameters.

Check it.

Tested with

http://animedigitalnetwork.fr/video/angel_sanctuary/3158-oav-1-rencontre

kojiro
06-08-2015, 01:23 AM
I absolutely do not understand what you say.
Someone could make a clear and simple tutorial please.

Note: adownloader not function at all with me.

Thanks in advance

denobis
06-08-2015, 02:57 AM
I absolutely do not understand what you say.
Someone could make a clear and simple tutorial please.

Note: adownloader not function at all with me.

Thanks in advance

Simply search "mulutibu" and you'll get the key. The downloading of the videos worked some time ago but now i dont know.

kojiro
06-08-2015, 03:35 AM
Simply search "mulutibu" and you'll get the key. The downloading of the videos worked some time ago but now i dont know.

Could you explain step by step what I need to do, how to do and where to find what I need.
And how to use the script ksv
I know, I'm an idiot.
Only ass interested, videos are easily found on the web.
A big thank you in advance.

kojiro
06-08-2015, 04:59 AM
I do not understand absolutely nothing.
Only half response everywhere it has become incomprehensible.
Can somebody explain everything from A to Z (how retrieve PNG, what and how to decrypt use etc ...)
Explain everything step by step in one post, please.
Thank you in advance.

(If anyone could do it in French post also it would be nice, it's been dead for a while)

-lolo666-
06-19-2015, 05:00 PM
Thank you guys!

For those who are still searching, read posts from page 10 to now carefully. Answers are given, you just need to open your eyes. :)


// FRENCH //
Merci les gars !

Pour ceux qui cherchent encore, lisez attentivement les messages de la page 10 jusqu'a maintenant. Les réponses sont dedans, il n'y a qu'a ouvrir les yeux. :)

blurg
06-25-2015, 05:33 AM
new modification of mulutibu

need you ksv ^^

Legremlins_Keitaro
06-29-2015, 12:10 AM
Yep new mulutibu, .bin file has been enamed 5.bin to 31.bin, it seems to have the same content, but the AES.as have changed

blurg
06-29-2015, 12:59 AM
i have sent a mp to KSV
waiting now ^^

KSV
07-01-2015, 04:14 AM
i don't have the sufficient time to look into it right now but probably later this weekend.

blurg
07-01-2015, 08:48 AM
thx a lot for helping us

gaaara
07-06-2015, 08:54 PM
no news ?

blurg
07-06-2015, 10:23 PM
nop
or ksv is very busy or the news script are strong (but i don't think so:D )

KSV
07-09-2015, 12:39 AM
i have looked into this today. they have changed few things but nothing too drastic. i have pushed the update to the repo (https://github.com/K-S-V/Scripts/blob/master/AnimeDigital.php).

blurg
07-09-2015, 07:28 AM
Great thx KSV
your're our god

IzayoiSk
07-09-2015, 08:17 AM
Hello ! I'm new here ! Someone can explain from A to Z ? How can I use THIS (https://github.com/K-S-V/Scripts/blob/master/AnimeDigital.php) ?

If I have understood correctly, it's to recover the subtitles video from ADN ?

THANKS !

ps : si y'a des frenchies dans le coin ^^

baka.shinji
07-09-2015, 10:29 AM
No need of mulutibu anymore ?

blurg
07-09-2015, 10:50 AM
always need constant and start variable in mulutibu sxf

baka.shinji
07-09-2015, 10:57 AM
It became too difficult for me.

Liluy
07-09-2015, 11:25 AM
Thanks you, KSV.
Where is the start in the mulutibu now ?

blurg
07-09-2015, 11:33 AM
Thanks you, KSV.
Where is the start in the mulutibu now ?
it is in mulutibu.as

Liluy
07-09-2015, 11:38 AM
it is in mulutibu.as
http://puu.sh/iT1QX/e5c4e7c4c0.png
Unfortunately, I can not find mulutibu.as
French : Je ne trouve pas le as dans le mulutibu.

kuroYaka
07-09-2015, 11:43 AM
Hi

$start is 60 :)

blurg
07-09-2015, 12:07 PM
http://puu.sh/iT1QX/e5c4e7c4c0.png
Unfortunately, I can not find mulutibu.as
French : Je ne trouve pas le as dans le mulutibu.

je le vois moi (1ier dans la liste)

Liluy
07-09-2015, 12:09 PM
je le vois moi (1ier dans la liste)
Oui, c'est bon j'ai trouvé, merci pour ton aide.

IzayoiSk
07-09-2015, 01:10 PM
Apparently my post went unnoticed ^^

Hello ! I'm new here ! Someone can explain from A to Z ? How can I use THIS ?

If I have understood correctly, it's to recover the subtitles video from ADN ?

THANKS !

Fr : Apparemment mon post est passé inaperçu ^^

je voudrais juste savoir si c'est bel et bien une méthode pour avoir les .ass des vidéo de chez ADN ? Si oui pourrait-on m'expliquer la marche a suivre ?
Merci ! :)

baka.shinji
07-10-2015, 05:49 AM
One last thing. How to decompil the mulutibu please ?

Paradox
07-10-2015, 09:07 AM
Hello !

How to get the *correct* constants format, please ?

In the swf file, the constants are an array of numbers, but how to convert them to the hex form ? I tried many converters, changed 0x to \x, but it doesn't work. :(

Thanks for your help !

blurg
07-10-2015, 09:19 AM
Hello !

How to get the *correct* constants format, please ?

In the swf file, the constants are an array of numbers, but how to convert them to the hex form ? I tried many converters, changed 0x to \x, but it doesn't work. :(

Thanks for your help !

import os,sys,urllib,time,binascii
# -*- coding: utf-8 -*-

testfile = urllib.URLopener()
testfile.retrieve("url mulutibu_v4_3.swf", "mulutibu_v4_3.swf")
time.sleep(5)
cmd1='.\\video\\ffdec -export binaryData \\com\\longtailvideo\\plugins\\mulutibu6\\binaryDa ta\\ mulutibu_v4_3.swf'
os.system(cmd1)
time.sleep(10)
data=open('.\\com\\longtailvideo\\plugins\\mulutib u6\\binaryData\\31.bin','r').read()
data1=binascii.a2b_hex(data.replace('0x', '').strip())
final=open('constanteskeys.txt','w')
final.write(data1)


try this with python script and JPEXS Free Flash Decompiler

edit = replace url of mulutibu by the correct url

Paradox
07-10-2015, 10:24 AM
Thanks a lot ! ;)

Paradox
07-11-2015, 06:12 PM
I re-wrote blurg's python script and changed a few K-S-V's php script (thanks to them), to get automatically the constants and the start variable.


#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os, urllib, datetime, time, re

dirName = os.path.dirname(os.path.abspath(__file__))
mulutibuFile = "mulutibu_v4_3.swf"

command = "ffdec -export script \"%s\" %s" % (dirName, mulutibuFile)
os.system(command)

time.sleep(10)

with open(dirName + "\\com\\longtailvideo\\plugins\\mulutibu6\\Mulutibu .as", "r") as startFile:
start = re.findall("d1\([0-9]{2}\)", startFile.read())

command = "ffdec -export binaryData \"%s\" %s" % (dirName, mulutibuFile)
os.system(command)

time.sleep(10)

with open(dirName + "\\31.bin", "r") as fo:
binary = fo.read()

phpFile = '''<?php
if ( $argc < 2 )
die( "Usage: php adn.php <encrypted_subtitles>" );

// Read encrypted subtitles
$file = file_get_contents( $argv[1] );
$file = base64_decode( $file );

// Get decryption key from aes constants
$constants = "{CONSTANTS}";
$start = {START};
$key = substr( $constants, $start, 32 );
$salt = substr( $file, 8, 8 );
$key = $key . $salt;
$hash1 = md5( $key, true );
$hash2 = md5( $hash1 . $key, true );
$iv = md5( $hash2 . $key, true );
$key = $hash1 . $hash2;
// Decrypt subtitles
$td = mcrypt_module_open( "rijndael-128", "", "cbc", "" );
mcrypt_generic_init( $td, $key, $iv );

$decrypted = mdecrypt_generic( $td, $file );
$decrypted = substr( $decrypted, 32 );
mcrypt_generic_deinit( $td );
mcrypt_module_close( $td );

// Detect and remove PKCS#7 padding
$padded = true;
$len = strlen( $decrypted );
$pad = ord( $decrypted[$len - 1] );

for ( $i = 1; $i <= $pad; $i++ )
$padded &= ( $pad == ord( substr( $decrypted, -$i, 1 ) ) ) ? true : false;
if ( $padded )
$decrypted = substr( $decrypted, 0, $len - $pad );

// Save decrypted subtitles
$file = pathinfo( $argv[1], PATHINFO_FILENAME ) . ".ass";
file_put_contents( $file, $decrypted );
?>'''
phpFile = re.sub("\{CONSTANTS\}", binary.replace("0x", "\\x").strip(), phpFile)
phpFile = re.sub("\{START\}", re.findall(r"\d+", start[0])[1], phpFile)

with open("adn.php", "w") as out:
out.write(phpFile)


Assuming you will save the script as adn.py, put :

adn.py

in your console and it will generate an adn.php file, then put:

php adn.php "picture_file"


P.S : You will need to get the picture file using fiddler.
P.S2 : When you finish, delete : 31.bin, mulutibu6.as and mulutibu_v4_3.swf files. Delete also com and mx folders.
P.S3 : Be sure to have the path of the JPEXS Free Flash Decompiler folder in your environment path variable, e.g : C:\Programe Files\FFDec

Hope it helps !

EDIT : You MUST download the mulutibu file with fiddler or from your browser to get the valid file and rename it to mulutibu_v4_3.swf, then put it in the same folder as adn.py and run the script !

baka.shinji
07-12-2015, 08:29 AM
@ Paradox : I tried your method but I get this message:

C:\adn.py
Traceback (most recent call last):
File "C:\adn.py", line 21, in <module>
with open(dirName + "\\com\\longtailvideo\\plugins\\mulutibu6\\Mulutibu .as",
"r") as startFile:
IOError: [Errno 2] No such file or directory: 'C:\\com\\longtailvideo\\plugin
s\\mulutibu6\\Mulutibu.as'

blurg
07-12-2015, 09:30 AM
don't try anymore
they have change 1 more time the methode of decryptage

plz don't indicate url or anything because they change every time

Paradox
07-12-2015, 04:43 PM
@ Paradox : I tried your method but I get this message:

C:\adn.py
Traceback (most recent call last):
File "C:\adn.py", line 21, in <module>
with open(dirName + "\\com\\longtailvideo\\plugins\\mulutibu6\\Mulutibu .as",
"r") as startFile:
IOError: [Errno 2] No such file or directory: 'C:\\com\\longtailvideo\\plugin
s\\mulutibu6\\Mulutibu.as'

If you have this error, delete all generated files and run adn.py again.

don't try anymore
they have change 1 more time the methode of decryptage

plz don't indicate url or anything because they change every time

Hum... Now, if the mulutibu file is downloaded with a script(python, php, whatever) we get a non-valid file. I edited my previous post.

The script has been revised BTW.

Legremlins_Keitaro
07-13-2015, 01:46 PM
Hmm where is the new $start in the multibu.as ? someone can give me the sample of the line please ?

Edit: is the line is this one => var _loc2_:String = AES.dec(param1,d1(20),false);
in this case 20 ?

NoWay
09-18-2015, 01:25 PM
Can someone make a script to get the multibu file and the .png please ?

NoWay
09-28-2015, 01:23 PM
They have changed their method another time , can we have an update please ?

KSV
12-04-2015, 03:00 AM
People keep PM'ing me to ask if this script currently works or not because most of them don't bother to read few pages to know what needs to be done exactly. The short answer is Yes this script still works as expected and doesn't require any other update except the two values ($constants and $start) which they keep changing on rotational basis (probably daily).

1. First you need to grab the mulutibu swf file and encrypted png file correctly. I recommend using Fiddler to save both the swf file and encrypted png file. When you try to grab the file otherwise server may send you wrong file and decryption won't work even if you follow other steps correctly.

2. Now grab a good swf decompiler (JPEXS Free Flash Decompiler (https://www.free-decompiler.com/flash/)) and extract new constants which are embedded as binary data in swf file. in the saved file replace all 0x with \x.

http://i.imgur.com/5rWtSQ4.jpg

\x61\x65\x63\x64\x61\x35\x33\x30\x65\x38\x36\x65\x 61\x63\x33\x65\x64\x64\x36\x63\x38\x66\x66\x65\x61 \x38\x36\x31\x64\x35\x32\x64\x39\x34\x31\x30\x65\x 39\x39\x34\x37\x35\x38\x37\x38\x31\x62\x61\x34\x38 \x63\x32\x64\x33\x36\x65\x31\x31\x36\x34\x61\x66\x 35\x36\x65\x65\x37\x65\x32\x65\x36\x39\x31\x63\x38 \x64\x36\x64\x62\x30\x34\x37\x62\x64\x65\x38\x63\x 64\x33\x35\x63\x31\x34\x63\x37\x30\x36\x63\x30\x61 \x62\x39

3. To get the start value you need to find the call to AES function as shown in following image. it's 61 in this case.

http://i.imgur.com/CH5vuPb.jpg

4. after updating those two values in the script you can now use it to decrypt the png file to ass file.

php AnimeDigital.php encrypted.png

it will save the decrypted file with .ass extension.

Tewx
12-13-2015, 11:36 AM
Hello

WHen i start the php, i have this error http://i.imgur.com/4jOzFdo.png

What's the problem ?

Tewx
12-15-2015, 01:30 PM
Hey

Any News ?

Cordialy

Legremlins_Keitaro
01-09-2016, 06:42 AM
In this new year, new protection :) Doesn't work anymore ;)

KSV
01-09-2016, 10:01 AM
I will look into it in a day or two and provide the update.

Legremlins_Keitaro
01-09-2016, 10:14 AM
Ok thanks, I have MP you what I find on this update ;)

blurg
01-09-2016, 01:33 PM
I will look into it in a day or two and provide the update.

do you see my MP

KSV
01-10-2016, 10:47 AM
I have checked it today. They haven't made any major changes except the $start value is now found at line 51 of SubtitleLoader file. although I have updated the script but it was for an unrelated issue. rest of the procedure still works as described in post #154 (http://stream-recorder.com/forum/showpost.php?p=81406&postcount=154).

deltasebz
01-10-2016, 06:12 PM
http://i.imgur.com/4jOzFdo.png same error here, some tips about it ?

Tewx
03-03-2016, 09:47 AM
Any news ?

Congroo
03-14-2016, 05:26 PM
Waiting for some update...

kojiro
04-19-2016, 09:13 PM
Apparently ADN is passed to HTML5, it is feared that the videos are in hardsub now.

anonyme02
04-19-2016, 10:52 PM
In HTML5, I managed to extract the video, the encrypted sub-title, and the JS seems to be related to the decoding but unfortunately I know nothing about encryption ><
I sent a message (3 in fact XD) to KSV with all files, I hoped he could find a solution, it would be great!

baka.shinji
04-20-2016, 10:16 AM
What's the encrypted subtitle file now ?

anonyme02
04-20-2016, 10:56 PM
Here now: http://animedigitalnetwork.fr/index.php?option=com_vodvideo&task=player.subtitles&format=raw&video={video_id}

Legremlins_Keitaro
04-25-2016, 01:02 PM
It seems video in HTML5 are now activated on all video, how can we can download the video now ?

beckoun23
04-25-2016, 01:47 PM
Any news about new subtitles file encryption ?

Legremlins_Keitaro
04-26-2016, 03:28 PM
Is it always possible to see the encrypted subtitle (the png file) without downloading it ?

beckoun23
04-27-2016, 04:22 AM
With the new player , there is no image file, encrypted subtitles can be recovered when you inspect the code. You should see a line like below :
(ex: for MY HERO ACADEMIA episode 01)
http://animedigitalnetwork.fr/index.php?option=com_vodvideo&task=player.subtitles&format=raw&video=7214

kuroYaka
04-27-2016, 09:08 AM
It does not work, when you refresh, the content of this link change, and the code is different, the decrypt doesnt work.

The method for decrypt the png, is the same as before, only the method for get the png is different.

Personally i can only get the 5min png, and i have a premium account =/, so if annyone can post how they get the full png, that would be nice =)

beckoun23
04-27-2016, 09:31 AM
@kuroYaka, can you share your method to get the png ?
Perhaps, we can have a beginning to look how to get the full encrypted png file.

kuroYaka
04-27-2016, 09:51 AM
Yeah sure, i use "curl" for get the png

beckoun23
04-27-2016, 10:56 AM
How do you get the ID of picture_ID.png ?

kuroYaka
04-27-2016, 11:30 AM
Url of video.


http://###.##/video/endride_tv/"""7354"""-episode-2-endora

beckoun23
04-27-2016, 11:38 AM
Ok thank you.

--data "version=5%%2E0%%2E1"

-> This parameter never changes or is it to change following the image we wish to recover

kuroYaka
04-27-2016, 11:50 AM
Honestly, i really dont know, im not the author of this script, but i never change this to get the 5min png

I guess you can try, to change it.

beckoun23
04-27-2016, 12:05 PM
I've tested this script, I get the adn.png file but this file is empty. I don't have any data :/

kuroYaka
04-27-2016, 12:09 PM
Yeah, some people have this probleme, try to login before use the script.
Did you change something ?

Your problem probably come from the cookies.

beckoun23
04-27-2016, 12:32 PM
I tried after logout and login but picture file is always empty.

My cookies file
# Netscape HTTP Cookie File
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

.animedigitalnetwork.fr TRUE / FALSE 0 18acd9b63ecbf5xxxxxxxxx ff67122b5a43cbaf30a9xxxxxxxxx


I don't really understand why the file is empty if you have already obtained it with data.

kuroYaka
04-27-2016, 12:47 PM
I have no idea, you can maybe try to change the "user-agent"

Legremlins_Keitaro
04-27-2016, 12:48 PM
PNG can be fully downloaded, but if you do that, ADN can see it and after that your IP address will be ban and you can't access anymore to the siteweb.

kuroYaka
04-27-2016, 12:56 PM
They ban people since 3 years, not really new

beckoun23
04-27-2016, 12:57 PM
I am conscious of risks, that I want knowledge it is how to get back this image.

ps: To protect you from the ban, you can use a VPN

Legremlins_Keitaro
04-27-2016, 12:58 PM
I use VPN / proxy, but ADN block ip range like ovh etc..., and for downloading the full png you need to start the video so you need an ip from french country or other country allowed.

kuroYaka
04-27-2016, 01:01 PM
Well, not working for me, keep getting, the 5min

beckoun23
04-27-2016, 01:05 PM
Not work for me too. I have always an empty file. (I have an IP from France)

beckoun23
04-27-2016, 01:15 PM
@kuroYaka I just put the curl command line in a batch file and now it's work, I get the file with 5 first minutes.

Now we can find how to get full data...

blurg
04-27-2016, 03:29 PM
come on dude they are inside

kuroYaka
04-28-2016, 02:50 AM
@beckoun23, @blurg, go check your pm.

blurg
04-28-2016, 09:22 AM
@beckoun23, @blurg, go check your pm.

too late dude i think they have already seen the post with script :o

NoWay
04-28-2016, 11:44 AM
Do you have an automated script that was works before the new update ?

Barbapapa
04-28-2016, 01:46 PM
Up to now, all I have is the result of this link : http:// animedigitalnetwork.fr/index.php?option=com_vodvideo&task=player.subtitle s&format=raw&video={video_id}
It changes every time but the whole body of it has two different parts : at the beginning of it we can see a bunch of characters before "==" and after there is the longest part. Is it possible that the subtitles are coded using the first part as a key ?
I didn't saw how it could be decoded in the javascript files that are send by the website.

Anybody has an idea about it ?

Legremlins_Keitaro
04-28-2016, 02:37 PM
The last time I check (3 days ago) I can get the full subtitle.

anonyme02
05-01-2016, 03:34 AM
no news ?:(

ShineIsBeauti
05-01-2016, 08:18 AM
I have a solution for that, please contact me.

beckoun23
05-01-2016, 11:27 AM
Thank you ShineIsBeauti. You can check your PM.

baka.shinji
05-02-2016, 01:57 PM
Why ask PM if it is not to answer?

beckoun23
05-03-2016, 10:54 AM
@baka.shinji @anonyme02, we have been trolled by ShineIsBeauti.
If it's to do that, he should be banished from this forum.

Legremlins_Keitaro
05-03-2016, 12:25 PM
No news ?

ShineIsBeauti
05-03-2016, 01:33 PM
@beckoung
Im not a trollin you,

@all
sorry guys ADN threatened me, so i cant tell anything, hope you guys found a solution.

beckoun23
05-03-2016, 01:47 PM
OK , sorry for you but if you know in advance that you will say nothing , do not we hope for nothing :(

So we all returned to the base pending a solution...

baka.shinji
05-03-2016, 03:30 PM
@ShineIsBeauti: where did they threat you ? I'm really curious about that.

ShineIsBeauti
05-03-2016, 05:51 PM
@ShineIsBeauti: where did they threat you ? I'm really curious about that.

By pm, if you not believe me that's not my prob.
And I really have the solution but can't share, sorry for that.:(
please understand that i can't trust anybody here and maybe they will change their secure after sharing this solution...

blurg
05-04-2016, 05:51 AM
By pm, if you not believe me that's not my prob.
And I really have the solution but can't share, sorry for that.:(
please understand that i can't trust anybody here and maybe they will change their secure after sharing this solution...

true
+1111111111111111111111111111111111111111111111111 111111111 :cool:

anonyme02
05-04-2016, 11:01 AM
By pm, if you not believe me that's not my prob.
And I really have the solution but can't share, sorry for that.:(
please understand that i can't trust anybody here and maybe they will change their secure after sharing this solution...

Yes, we understand.
But, in this case, so say nothing.

So, is there anyone to help us AND who is willing to tell us (MP or other)?

ShineIsBeauti
05-04-2016, 12:44 PM
Yes, we understand.
But, in this case, so say nothing.

So, is there anyone to help us AND who is willing to tell us (MP or other)?

Lol, I say what I want, and you don't deserve it.
Anyway, a solution exists.

anonyme02
05-04-2016, 01:16 PM
if you speak of the method of PNG, it inevitably leads to ban of the account.
Otherwise I don't know.

gaaara
05-05-2016, 10:06 PM
Méthode impossible sorry

blurg
05-06-2016, 08:41 AM
thx we searching another methode

Barbapapa
05-08-2016, 05:30 PM
Nobody has worked on http:// animedigitalnetwork.fr/index.php?option=com_vodvideo&task=player.subtitle s&format=raw&video={video_id} ?

I don't find where the body of this url is used by adn. Also, is the "player" mentionned in this url reffers to some js sent by the website ?

Tewx
05-22-2016, 12:02 PM
Any News ?

gaaara
05-31-2016, 08:52 PM
No I no have a news for the moment ksv pleez help us :)