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.
+ Reply to Thread
Results 1 to 5 of 5
-
-
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) -
-
WidevineProxy2 works to get Keys from Canal+
[Attachment 89371 - Click to enlarge]
Similar Threads
-
Need help with getting the key (CDRM-Project 2.0)
By alexinho25 in forum Video Streaming DownloadingReplies: 2Last Post: 2nd Nov 2024, 15:11 -
Help for CDRM-Project 2.0
By Data2006 in forum Video Streaming DownloadingReplies: 14Last Post: 4th Oct 2024, 15:58 -
Need help Mediaset cdrm-project 2.0
By RacketWise in forum Video Streaming DownloadingReplies: 8Last Post: 22nd Sep 2024, 07:52 -
CDRM Project 2
By field3d in forum Video Streaming DownloadingReplies: 1Last Post: 12th Sep 2024, 12:02 -
Help to use cdrm-project.com
By vidsrme in forum Video Streaming DownloadingReplies: 6Last Post: 26th Mar 2023, 05:11



Quote