VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 14 of 14
  1. Hi

    I tried to uses WKS KEY in command line

    But when I start this commande I have :

    unable to parse license - check protobufs



    PSSH: AAAAMHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABAiCDE0MD MyODI5SOPclZsG
    License URL: https://widevine-proxy-m.prod.p.tf1.fr/proxy?id=14032829&rn=1&ssc=403cc620-f384-49b2-a...4&e=1698569221

    My URL of my mpd file is : https://vod-das.cdn-0.diff.tf1.fr/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaXAiOiI5MS4...m/14032829.mpd


    Thank you for your help
    Image Attached Thumbnails Click image for larger version

Name:	Capture d'écran 2023-10-29 073848.png
Views:	65
Size:	30.8 KB
ID:	74592  

    Quote Quote  
  2. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    And what is in headers.py? My guess would be nothing. Read information in the stickies at the top of this forum's page, especially https://forum.videohelp.com/threads/407216-Decryption-The-Dungeon-of-Despair
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  3. This is the content of my file headers.py

    Code:
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0',
        'Accept': '*/*',
        'Accept-Language': 'fr-FR,fr;q=0.5',
        # 'Accept-Encoding': 'gzip, deflate, br',
        'Referer': 'https://prod-player.tf1.fr/',
        'Origin': 'https://prod-player.tf1.fr',
        'Connection': 'keep-alive',
        'Sec-Fetch-Dest': 'empty',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Site': 'same-site',
        'Content-Type': 'application/x-www-form-urlencoded',
    }
    Quote Quote  
  4. It's probably missing a relevant header. What's the video URL? From mpd and license URL alone it's quite hard to verify.

    Edit: @cedric8528 obviously is right - should've tried that first by myself. In that case something more fundamentally is wrong at your side, because it doesn't matter what you put in headers here.
    Last edited by Obo; 29th Oct 2023 at 07:01.
    Quote Quote  
  5. keys

    Code:
    f80717ad5f6b54b0a9b519ffa86544b9:724ad7a8e885e341b2cadc2cea190965
    c5a1c1afdd395d80ab0f735247890545:7a497b56e157571f3d432f800e286d8e
    41b432c7a32353c28fa0ac27c6944fdd:fe18a223ff24b23fb669e850aa66cd76
    You don't need headers to get keys

    my headers.py

    Image
    [Attachment 74596 - Click to enlarge]


    Image
    [Attachment 74597 - Click to enlarge]
    Quote Quote  
  6. Originally Posted by cedric8528 View Post
    keys

    Code:
    f80717ad5f6b54b0a9b519ffa86544b9:724ad7a8e885e341b2cadc2cea190965
    c5a1c1afdd395d80ab0f735247890545:7a497b56e157571f3d432f800e286d8e
    41b432c7a32353c28fa0ac27c6944fdd:fe18a223ff24b23fb669e850aa66cd76
    You don't need headers to get keys

    my headers.py

    Image
    [Attachment 74596 - Click to enlarge]


    Image
    [Attachment 74597 - Click to enlarge]
    Hi Cedric

    Thank you but I have the same problem.

    How do you genrate key?

    What version of WIN-KEY do you need?
    Quote Quote  
  7. maybe your cdm is dead ...
    Quote Quote  
  8. works with all versions of WKS-Keys

    If you are not in france, maybe it's a problem of VPN....

    and as Lomero says ...also your Cdm..
    Quote Quote  
  9. I live in france. I have not a VPN

    How to reinstall CDM if he is dead ?
    Quote Quote  
  10. Works from outside France (at least from Germany)...
    Quote Quote  
  11. I have this version
    https://files.videohelp.com/u/301890/WKS-KEYS.zip

    Where do you find a new file for CDM ?
    Quote Quote  
  12. Look at the links in User @Karoolus signature.

    As an alternative to the wks-keys scripts "l3.py" script you could use the following standalone script, which utilizes the official pywidevine module (pip install pywidevine):

    Code:
    import requests, sys, headers
    from pywidevine import (
        Device,
        Cdm,
        PSSH
    )
    
    def obtain_keys(pssh, url, headers, params, cookies):
        device = Device.load('my.wvd')
        cdm = Cdm.from_device(device)
        session_id = cdm.open()
        challenge = cdm.get_license_challenge(session_id, PSSH(pssh))
        license = requests.post(url     = url,
                                data    = challenge,
                                headers = headers,
                                params  = params,
                                cookies = cookies)
        license.raise_for_status()
        cdm.parse_license(session_id, license.content)
        keys = cdm.get_keys(session_id)
        cdm.close(session_id)
        decryption_keys = [f'{key.kid.hex}:{key.key.hex()}' for key in keys if key.type == 'CONTENT']
        return decryption_keys
    
    if len(sys.argv) > 1:
        pssh = get_pssh(sys.argv[1])
    else:
        pssh = headers.pssh # input('\nPSSH: ')
    
    lic_url = headers.lic_url # input('License URL: ')
    try:
        params = headers.params
    except:
        params = {}
    
    try:
        cookies = headers.cookies
    except:
        cookies = {}
    
    keys = obtain_keys(pssh, lic_url, headers.headers, params, cookies)
    
    for key in keys:
        print('--key ' + key + ' \\')
    It also relies on the headers.py script containing the headers array along with possibly cookies, params and pssh variables. PSSH can be passed as command line parameter as well. You'd need to build your own my.wvd file by using the "pywidevine" script which gets installed by "pip install pywidevine". After that you can throw away the rest of the wks-keys scripts.

    You'll find more information about the pywidevine module here: https://forum.videohelp.com/threads/411862-Beyond-WKS-KEYS
    Last edited by Obo; 29th Oct 2023 at 08:21.
    Quote Quote  
  13. It work great.
    I changed cdm

    Thank for responses
    Quote Quote  



Similar Threads

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