i am trying to download this video
https://www.futurly.com/s/preview/courses/blender-architecture#6337f80fe4b05a534f0e3d5a
it is encrypted with aes 128 , i have gone through many post on videohelp , but there is no solution for this
the key uri is k/timestamp
#EXT-X-KEY:METHOD=AES-128,URI="k/timestamp",IV=0x496daa1c6914000e408c65cead91fc29
how to deal with this timestamp file , the response is encrypted too
[Attachment 67104 - Click to enlarge]
i am as a worst developer gone throuhg the javascript but found nothing but one of my freind send me this
[Attachment 67105 - Click to enlarge]
as a poor guy i dont even know how to deal with this
pls help me crack this encryption
+ Reply to Thread
Results 1 to 30 of 64
-
-
Ok, we have these two other posts
https://forum.videohelp.com/threads/391678-Decrypt-AES-128-key-m3u8
icebreaker101010 8th Jan 2019
https://forum.videohelp.com/threads/407218-How-to-decrypt-aes-128-encrypted-key
anandgpt75 6th Oct 2022
and possible this one
https://forum.videohelp.com/threads/407153-AES-128-Key-How-do-i-decrypt-or-find-the-key
GirlsGill 30th Sep 2022
all asking the same question
METHOD=AES-128,URI="k/timestamp",IV=0x496daa1c6914000e408c65cead91fc29
Is it possible that we can concentrate on only this thread. In this way efforts will not be duplicated.
code47 has done quite a bit of work on this topic.
In essence, the 32 character key required to decrypt the stream has been encrypted via the aes.js.
What is required is a decrypt function that takes the timestamp data as input and computes the 32 character decrypt key as the output.
@anandgpt75, please resist from from asking in any other threads and concentrate on this one. Thanks.Last edited by jack_666; 6th Oct 2022 at 13:12.
-
The closest that I have found with respect to an answer is this post by LZAA
https://forum.videohelp.com/threads/406394-Trying-to-download-an-encrypted-M3U8#post2662662
where he used streamlink --hls-segment-key-uri
streamlink --hls-segment-key-uri "https://www...." "hls://www......" best -o video.ts
timestamp url
Code:https://d2qny97nu4rj64.cloudfront.net/spees/w/o/6197321b0cf23d7cc6e572e1/v/6337f80fe4b05a534f0e3d5a/u/pu/t/87bb35a36b01e0943ef12fa4e6f5ef7c/p/assets/videos/6197321b0cf23d7cc6e572e1/2022/10/01/6337f80fe4b05a534f0e3d5a/
Code:--hls-segment-key-uri "https://d2qny97nu4rj64.cloudfront.net/spees/w/o/6197321b0cf23d7cc6e572e1/v/6337f80fe4b05a534f0e3d5a/u/pu/t/87bb35a36b01e0943ef12fa4e6f5ef7c/p/assets/videos/6197321b0cf23d7cc6e572e1/2022/10/01/6337f80fe4b05a534f0e3d5a/"
Last edited by jack_666; 6th Oct 2022 at 13:18.
-
LZAA has proven that it can be done.
https://forum.videohelp.com/threads/407218-How-to-decrypt-aes-128-encrypted-key#post2669326
So, it remains to us mere mortals to figure it out by our selves. -
I tried and also got three keys using curl command tried all of them not able to decrypt also keys changes everytime we use curl command in cmd
-
This code is not working it needs some modification , unfortunately I am not a python developer
-
LOL I'm not interested in the video but in the encryption (for future use)
Because of this interesting topic, I've tried to debug it and successfully found the solution. But of course I won't share since it's not that easy.
Good luck of finding it too
Just a hint for the method:
[Attachment 67156 - Click to enlarge]Last edited by zackmark29; 9th Oct 2022 at 19:01.
-
m3u8url:
https://d2qny97nu4rj64.cloudfront.net/spees/w/o/6197321b0cf23d7cc6e572e1/v/6337f80fe4b...d5a/index.m3u8
audio m3u8 url:
https://d2qny97nu4rj64.cloudfront.net/spees/w/o/6197321b0cf23d7cc6e572e1/v/6337f80fe4b...ls_audio_.m3u8
key
base64:KqxhYBPxh3YZr4rAGr/wpg==
Hex:2AAC616013F1877619AF8AC01ABFF0A6 -
key
base64: KqxhYBPxh3YZr4rAGr/wpg==
Hex :2AAC616013F1877619AF8AC01ABFF0A6
video url :
https://d2qny97nu4rj64.cloudfront.net/spees/w/o/6197321b0cf23d7cc6e572e1/v/6337f80fe4b...d5a/index.m3u8
Audio url :
https://d2qny97nu4rj64.cloudfront.net/spees/w/o/6197321b0cf23d7cc6e572e1/v/6337f80fe4b...d5a/index.m3u8 -
-
i think this works
Find the spka on Futurly web and replace it in the script:
Code:import re import logging import base64 import argparse from Crypto.Cipher import AES from streamlink import StreamError from streamlink.plugin import Plugin from streamlink.stream import HLSStream from streamlink.stream.hls import HLSStreamWriter, HLSStreamReader log = logging.getLogger(__name__) spka = "REPLACE" class FuturlyStreamWriter(HLSStreamWriter): def _decrypt_key(self,data): tmp1 = data[0:16] tmp2 = data[32:48] dec1 = AES.new(base64.b64decode(spka),AES.MODE_ECB) tmp3 = dec1.decrypt(tmp1) dec2 = AES.new(tmp3,AES.MODE_ECB) return dec2.decrypt(tmp2) def create_decryptor(self, key, sequence): if key.method != "AES-128": raise StreamError("Unable to decrypt cipher {0}", key.method) if not self.key_uri_override and not key.uri: raise StreamError("Missing URI to decryption key") key_uri = self.key_uri_override if self.key_uri_override else key.uri if self.key_uri != key_uri: res = self.session.http.get(key_uri, exception=StreamError, retries=self.retries, **self.reader.request_params) res.encoding = "binary/octet-stream" self.key_data = self._decrypt_key(res.content) self.key_uri = key_uri iv = key.iv or num_to_iv(sequence) # Pad IV if needed iv = b"\x00" * (16 - len(iv)) + iv return AES.new(self.key_data, AES.MODE_CBC, iv) class FuturlyStreamReader(HLSStreamReader): __writer__ = FuturlyStreamWriter class FuturlyStream(HLSStream): def open(self): reader = FuturlyStreamReader(self) reader.open() return reader class Futurly(Plugin): url_re = re.compile(r"""https://d2qny97nu4rj64.cloudfront.net/.*.m3u8""") def __init__(self, url): super(Futurly, self).__init__(url) @classmethod def can_handle_url(cls, url): return cls.url_re.match(url) is not None def _get_streams(self): return {"live":FuturlyStream(self.session,self.url)} __plugin__ = Futurly
Last edited by dark125; 10th Oct 2022 at 04:02.
-
It's my first time using streamlink, you can find more commands here:
https://streamlink.github.io/cli.html
I created a "plugins" folder and there I placed the python script called futurly.py
Code:E:\streamlink\bin\streamlink.exe --plugin-dirs E:\streamlink\plugins {URL} best --output file.mp4
Last edited by dark125; 10th Oct 2022 at 03:52.
-
Same error I already specified the directory for this and saved spayee.py into that still error
-
it seem you have found easy way to do. but my source tab it's different by yours.
i've only 1543 lines (you more than 6000) and i can't find key value ...
[Attachment 67167 - Click to enlarge] -
ok, found
now have trouble to convert unit8array(16) [42 172 97 .... ] to base64
i've found many script for console tab, but no understand how to put my unit8array value -
Code:
import binascii array_alpha = [ 42, 172, 97, 96, 19, 241, 135, 118, 25, 175, 138, 192, 26, 191, 240, 166 ] print(bytes(array_alpha).hex())
Code:You get direct hex key then simple site "https://base64.guru/converter/encode/hex" to convert hex to base64. eizy pizy.
-
@ naim
thanks but your code have error
[Attachment 67170 - Click to enlarge]
and yes, i know base64 site. but this site convert only base64 to hex. no unit8array(16) to hex or unit8array(16) to base 64 ...
anyway i've found another working code. thank you so much NBA456017 for your amazing tip
all work fine now! -
-
-
Great Work guys, i appreciate and thank you all deeply for your amazing support
-
use this
Array.prototype.map.call(new Uint8Array(i.frag._decryptdata.key), x => ('00' +
x.toString(16)).slice(-2)).join('') -
Similar Threads
-
Need help downloading HLS AES-128 encrytped video.
By radeon in forum Video Streaming DownloadingReplies: 33Last Post: 14th Nov 2022, 08:42 -
How do I download AES encrypted video streamed over HLS?
By Videogamer555 in forum Video Streaming DownloadingReplies: 1Last Post: 20th Jul 2022, 08:03 -
Help downloading AES-encrypted HLS video stream
By Woodswolf in forum Video Streaming DownloadingReplies: 26Last Post: 25th May 2019, 14:20 -
Help me with AES encrypted HLS downloading ?
By shraman in forum Video Streaming DownloadingReplies: 0Last Post: 30th Jul 2018, 06:54 -
Help downloading AES-encrypted HLS video stream
By vidder in forum Video Streaming DownloadingReplies: 3Last Post: 4th Jul 2018, 17:24