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 5 of 5
  1. Member
    Join Date
    Oct 2025
    Location
    France
    Search Comp PM
    Hello,

    I'm using cdrm-project to retrieve CanalPlus decryption keys.
    I enter the PSSH key, the license URL, and headers including the token.

    The error message returned by the license server is:
    service MDRM, Could not retrieve license: Missing Challenge

    How can I find the value of the challenge and how can I post it on cdrm-project ?

    Thank you very much for any help you can give me.
    Quote Quote  
  2. Hi,
    I am not sure if you can use the cdm-project for C+ (the challenge has to be sent in Base64 and the response is xml, don’t know if cdm-project can cope with this….)

    Below you will find the code I used (using pywidevine and adapted for C+ based on the widefrog tool).
    You’ll have to:
    1) Update your .wvd (see YOUR_DEVICE.wvd")
    2) Look for the mpd and extract the pssh (only support until 720p I guess)
    3) Find the licence url, make right click in dev tool, copy as bash and post it in curlconverter.com, then update the obtained headers AND the complete licence url in the code (see below, starting with 'https://secure-gen-hapi.canal-plus.com/conso)


    Code:
    import base64, json, os, time, re, requests, xmltodict
    from pywidevine.cdm import Cdm
    from pywidevine.device import Device
    from pywidevine.pssh import PSSH
    
    
    pssh = "YOUR PSSH"
    
    pssh = PSSH(pssh)
    device = Device.load("YOUR_DEVICE.wvd")
    cdm = Cdm.from_device(device)
    session_id = cdm.open()
    challenge = cdm.get_license_challenge(session_id, pssh)
    
    #######################################################
    headers = {
    PASTE YOUR HEADERS inclusive Token
    }
    
    ############################################################
    licence = requests.post(
    'https://secure-gen-hapi.canal-plus.com/conso/…………..,
        headers=headers,
        data=base64.b64encode(challenge).decode(),
    )
    
    licence.raise_for_status()
    license = xmltodict.parse(licence.content.decode())
    
    cdm.parse_license(session_id, license["licenseresponse"]["clientresponse"]["license"]["#text"])
    keys = []
    for key in cdm.get_keys(session_id):
        if key.type == 'CONTENT':
            keys.append(f"{key.kid.hex}:{key.key.hex()}")
    cdm.close(session_id)
    
    keyString = ""
    for key in keys:
        keyString += "--key " + str(key) + " "
    
    print(keyString)
    Quote Quote  
  3. Member
    Join Date
    May 2025
    Location
    Out their somewhere in the land of Kangaroos and Koalas.
    Search PM
    Paid service?
    Quote Quote  
  4. WidevineProxy2 works to get Keys from Canal+

    Image
    [Attachment 89371 - Click to enlarge]
    Quote Quote  



Similar Threads

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