Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (http://stream-recorder.com/forum/forumdisplay.php?f=4)
-   -  

Decrypting ts files from m3u8

(http://stream-recorder.com/forum/showthread.php?t=16686)

No_Miaus 10-28-2013 01:59 PM

Decrypting ts files from m3u8


 
Hello! I'm trying to decrypt a m3u8 that contains a lot ts files. The key (m3u8 files says it's AES 128) is on a php and the content looks like this and there isn't IV (so..?):



The content of that php page change each time I refresh it so i imagine it uses some clock to encrypt it but... What kind of key is it? Should I use wget to get that key to a txt file and then use openssl to decrypt it? Would It be enough to decrypt it or how can I do it?

Thank you :)

peterpan 10-28-2013 09:15 PM

Re: Decrypting ts files from m3u8


 
Post the actual link and someone may be able to help you out...Also provide a better description of what you're trying to do? Are trying to play or record this stream on VLC? What do you mean by "trying to decrypt a m3u8"?! Why?!

No_Miaus 10-29-2013 05:20 PM

Re: Decrypting ts files from m3u8


 
Quote:

Originally Posted by peterpan (Post 63752)
Post the actual link and someone may be able to help you out...Also provide a better description of what you're trying to do? Are trying to play or record this stream on VLC? What do you mean by "trying to decrypt a m3u8"?! Why?!

I mean ts files are encrypted.
http://www.atresplayer.com/televisio...102500011.html
m3u8 contains..

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="https://pulse.atresplayer.com/key.php"
#EXTINF:12.0,
media_b1348000_0.ts
#EXTINF:12.0,
media_b1348000_1.ts
etc...

peterpan 10-29-2013 11:02 PM

Re: Decrypting ts files from m3u8


 
Sorry Bro, I can't do much :( This one will need a REAL PRO ;)

Primero, the stream is geo-blocked! I had to proxy to Spain, and only then was able to view the vid :)



Segundo, looks like they use some "bad-ass" encryption with multiple key types :( Moreover, the final token is constantly changing, which leads me to believe you will eventually need to regex this baby :)

================================================== ==============
AtresPlayer-1/com/hurlant/crypto/%prng/ARC4.class.asasm:332: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/%prng/ARC4.class.asasm:334: refid "com.hurlant.crypto.prng:ARC4/decrypt"
AtresPlayer-1/com/hurlant/crypto/rsa/RSAKey.class.asasm:210: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/rsa/RSAKey.class.asasm:212: refid "com.hurlant.crypto.rsa:RSAKey/decrypt"
AtresPlayer-1/com/hurlant/crypto/rsa/RSAKey.class.asasm:237: callpropvoid QName(PrivateNamespace("*", "com.hurlant.crypto.rsa:RSAKey#0"), "_decrypt"), 6
AtresPlayer-1/com/hurlant/crypto/rsa/RSAKey.class.asasm:305: callpropvoid QName(PrivateNamespace("*", "com.hurlant.crypto.rsa:RSAKey#0"), "_decrypt"), 6
AtresPlayer-1/com/hurlant/crypto/rsa/RSAKey.class.asasm:411: trait method QName(PrivateNamespace("*", "com.hurlant.crypto.rsa:RSAKey#0"), "_decrypt")
AtresPlayer-1/com/hurlant/crypto/rsa/RSAKey.class.asasm:413: refid "com.hurlant.crypto.rsa:RSAKey/_decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/AESKey.class.asasm:478: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/AESKey.class.asasm:480: refid "com.hurlant.crypto.symmetric:AESKey/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/BlowFishKey.class.asasm:62: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/BlowFishKey.class.asasm:64: refid "com.hurlant.crypto.symmetric:BlowFishKey/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/BlowFishKey.class.asasm:84: callpropvoid QName(PrivateNamespace("*", "com.hurlant.crypto.symmetric:BlowFishKey#0"), "decryptBlock"), 4
AtresPlayer-1/com/hurlant/crypto/symmetric/BlowFishKey.class.asasm:847: trait method QName(PrivateNamespace("*", "com.hurlant.crypto.symmetric:BlowFishKey#0"), "decryptBlock")
AtresPlayer-1/com/hurlant/crypto/symmetric/BlowFishKey.class.asasm:849: refid "com.hurlant.crypto.symmetric:BlowFishKey/decryptBlock"
AtresPlayer-1/com/hurlant/crypto/symmetric/CBCMode.class.asasm:134: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/CBCMode.class.asasm:136: refid "com.hurlant.crypto.symmetric:CBCMode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/CBCMode.class.asasm:183: callpropvoid QName(Namespace("com.hurlant.crypto.symmetric:ISym metricKey"), "decrypt"), 2
AtresPlayer-1/com/hurlant/crypto/symmetric/CFB8Mode.class.asasm:145: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/CFB8Mode.class.asasm:147: refid "com.hurlant.crypto.symmetric:CFB8Mode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/CFBMode.class.asasm:157: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/CFBMode.class.asasm:159: refid "com.hurlant.crypto.symmetric:CFBMode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/CTRMode.class.asasm:67: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/CTRMode.class.asasm:69: refid "com.hurlant.crypto.symmetric:CTRMode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/DESKey.class.asasm:70: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/DESKey.class.asasm:72: refid "com.hurlant.crypto.symmetric:DESKey/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/ECBMode.class.asasm:175: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/ECBMode.class.asasm:177: refid "com.hurlant.crypto.symmetric:ECBMode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/ECBMode.class.asasm:244: callpropvoid QName(Namespace("com.hurlant.crypto.symmetric:ISym metricKey"), "decrypt"), 1
AtresPlayer-1/com/hurlant/crypto/symmetric/ICipher.class.asasm:22: trait method QName(Namespace("com.hurlant.crypto.symmetric:ICip her"), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/ICipher.class.asasm:24: refid "com.hurlant.crypto.symmetric:ICipher:decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/ISymmetricKey.class.asasm:25: trait method QName(Namespace("com.hurlant.crypto.symmetric:ISym metricKey"), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/ISymmetricKey.class.asasm:27: refid "com.hurlant.crypto.symmetric:ISymmetricKey:decryp t"
AtresPlayer-1/com/hurlant/crypto/symmetric/IVMode.class.asasm:374: pushstring "an IV must be set before calling decrypt()"
AtresPlayer-1/com/hurlant/crypto/symmetric/OFBMode.class.asasm:63: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/OFBMode.class.asasm:65: refid "com.hurlant.crypto.symmetric:OFBMode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/SimpleIVMode.class.asasm:143: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/SimpleIVMode.class.asasm:145: refid "com.hurlant.crypto.symmetric:SimpleIVMode/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/SimpleIVMode.class.asasm:188: callpropvoid QName(Namespace("com.hurlant.crypto.symmetric:ICip her"), "decrypt"), 1
AtresPlayer-1/com/hurlant/crypto/symmetric/TripleDESKey.class.asasm:301: trait method QName(PackageNamespace(""), "decrypt") flag OVERRIDE
AtresPlayer-1/com/hurlant/crypto/symmetric/TripleDESKey.class.asasm:303: refid "com.hurlant.crypto.symmetric:TripleDESKey/decrypt"
AtresPlayer-1/com/hurlant/crypto/symmetric/XTeaKey.class.asasm:202: trait method QName(PackageNamespace(""), "decrypt")
AtresPlayer-1/com/hurlant/crypto/symmetric/XTeaKey.class.asasm:204: refid "com.hurlant.crypto.symmetric:XTeaKey/decrypt"
=====================================

I think only KSV and few others on this forum may be able to help!

I couldn't even record it using RTMPDumpHelper :( Probably due ton the proxy!

Good Luck!

chap 11-10-2013 11:19 PM

Re: Decrypting ts files from m3u8


 

No_Miaus 11-12-2013 04:45 PM

Re: Decrypting ts files from m3u8


 
How did you do it? Explain it please!

chap 11-12-2013 11:20 PM

Re: Decrypting ts files from m3u8


 
Code:

ffmpeg -i "http://geodeswowa3player.antena3.com/vcg/_definst_/smil:assets2/2013/10/25/08D874B3-4B0D-4DB8-844B-1C29D70B1B31/free_es.smil/chunklist_b1348000.m3u8?pulse=assets2%2F2013%2F10%2F25%2F08D874B3-4B0D-4DB8-844B-1C29D70B1B31%2F%7C1384334301%7C4047eaf34d8f8b54a2f3277cc8f4ff44 " -c copy t.ts

hallucinogen 11-13-2013 11:22 PM

Re: Decrypting ts files from m3u8


 
Quote:

Originally Posted by chap (Post 63921)
Code:

ffmpeg -i "http://geodeswowa3player.antena3.com/vcg/_definst_/smil:assets2/2013/10/25/08D874B3-4B0D-4DB8-844B-1C29D70B1B31/free_es.smil/chunklist_b1348000.m3u8?pulse=assets2%2F2013%2F10%2F25%2F08D874B3-4B0D-4DB8-844B-1C29D70B1B31%2F%7C1384334301%7C4047eaf34d8f8b54a2f3277cc8f4ff44 " -c copy t.ts

Chap, how do you get that syntax? How to properly use ffmpeg dumping?

skyDude14 05-20-2014 06:26 PM

Re: Decrypting ts files from m3u8


 
chap thanks for your useful post. can you tell me instead of merging all those decrypted .ts to one big ts we just decrypt each ts file and copy the decrypted ts to diffrent folder ? in another word i want to all those .ts decrypted one by one without joining them .

furthermore after you merged the .ts to one big file why there is not duration shown while playing those .ts ?how to add duration to it?

Hope you help me with it.Thanks



Quote:

Originally Posted by chap (Post 63921)
Code:

ffmpeg -i "http://geodeswowa3player.antena3.com/vcg/_definst_/smil:assets2/2013/10/25/08D874B3-4B0D-4DB8-844B-1C29D70B1B31/free_es.smil/chunklist_b1348000.m3u8?pulse=assets2%2F2013%2F10%2F25%2F08D874B3-4B0D-4DB8-844B-1C29D70B1B31%2F%7C1384334301%7C4047eaf34d8f8b54a2f3277cc8f4ff44 " -c copy t.ts


surya987 05-20-2014 10:26 PM

Re: Decrypting ts files from m3u8


 
SKY... why you want to decrypt one by one.... its useless and really time consuming....FFMPEG download all ts files and than join auto to one ts playable file.....


All times are GMT -6. The time now is 11:01 AM.