VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 64
Thread
  1. 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
    Image
    [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
    Image
    [Attachment 67105 - Click to enlarge]


    as a poor guy i dont even know how to deal with this
    pls help me crack this encryption
    Quote Quote  
  2. 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.
    Quote Quote  
  3. Ok will concentrate here only bro!!!
    Quote Quote  
  4. 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/
    hence we may be able to use

    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.
    Quote Quote  
  5. Getting error incorrect aes length 48 bytes
    Failed to create decryptor
    Quote Quote  
  6. 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.
    Quote Quote  
  7. 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
    Quote Quote  
  8. Can someone pls help on howbto decode timestamp url
    Quote Quote  
  9. Pls somebody share some hints how to get the decryption key
    Quote Quote  
  10. k/timestamp returning blank
    Last edited by DrQaatil; 11th Oct 2022 at 13:56.
    Quote Quote  
  11. This code is not working it needs some modification , unfortunately I am not a python developer
    Quote Quote  
  12. k/timestamp
    Last edited by DrQaatil; 11th Oct 2022 at 13:54.
    Quote Quote  
  13. 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:
    Image
    [Attachment 67156 - Click to enlarge]
    Last edited by zackmark29; 9th Oct 2022 at 19:01.
    Quote Quote  
  14. Originally Posted by zackmark29 View Post
    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:
    Image
    [Attachment 67156 - Click to enlarge]
    I know this function decrypting the key , but this code is obfuscated and i am not a javascript developer, the only solution is to write a javascript or python code to override this decrptor function
    Quote Quote  
  15. 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.
    Quote Quote  
  16. i replaced spka although no output was on cmd how can i do this???
    Quote Quote  
  17. 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
    https://mega.nz/file/Jdpx0BQT#z4kUWm6qmsChjd5gGaN9YzY7lhWj4PDR1qPgWuDe1lc
    Last edited by dark125; 10th Oct 2022 at 03:52.
    Quote Quote  
  18. Same error I already specified the directory for this and saved spayee.py into that still error
    Image Attached Thumbnails Click image for larger version

Name:	16653885466946206089646834002975.jpg
Views:	491
Size:	5.10 MB
ID:	67161  

    Quote Quote  
  19. 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 ...

    Image
    [Attachment 67167 - Click to enlarge]
    Quote Quote  
  20. nxhda
    Join Date
    Sep 2022
    Location
    United States
    Search Comp PM
    look here ,go to js search decryptkey
    Image Attached Thumbnails Click image for larger version

Name:	微信截图_20221010221917.png
Views:	807
Size:	51.3 KB
ID:	67168  

    Quote Quote  
  21. 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
    Quote Quote  
  22. psaframe
    Join Date
    Mar 2021
    Location
    Algeria
    Search PM
    Originally Posted by whs912km View Post
    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.
    Quote Quote  
  23. @ naim
    thanks but your code have error

    Image
    [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!
    Quote Quote  
  24. psaframe
    Join Date
    Mar 2021
    Location
    Algeria
    Search PM
    Originally Posted by anandgpt75 View Post
    Same error I already specified the directory for this and saved spayee.py into that still error
    I get the same error as well ."Failed to create decryptor: Incorrect AES key length (48 bytes)"
    What i missing here?!
    Quote Quote  
  25. psaframe
    Join Date
    Mar 2021
    Location
    Algeria
    Search PM
    Originally Posted by whs912km View Post
    @ naim
    thanks but your code have error

    Image
    [Attachment 67170 - Click to enlarge]


    anyway i've found another working code. thanks so much NBA456017 for your amazing tip
    all work fine now!
    Use code as python script man not put it in browser
    Quote Quote  
  26. Great Work guys, i appreciate and thank you all deeply for your amazing support
    Quote Quote  
  27. nxhda
    Join Date
    Sep 2022
    Location
    United States
    Search Comp PM
    use this

    Array.prototype.map.call(new Uint8Array(i.frag._decryptdata.key), x => ('00' +
    x.toString(16)).slice(-2)).join('')
    Image Attached Thumbnails Click image for larger version

Name:	微信截图_20221011004309.png
Views:	591
Size:	20.4 KB
ID:	67171  

    Quote Quote  
  28. Originally Posted by naim2007 View Post
    Use code as python script man not put it in browser
    my code work from browser console


    @ NBA456017
    thanks again. i have another code for console tab. anyway also your code work great. thanks
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!