FoxRefire / wvg

Chrome/Firefox extension for pen-testing to retrieve encryption keys of Widevine protected content !DON'T DECRYPT CONTENT UNLESS YOU HAVE THE RIGHT TO DO IT!
GNU Affero General Public License v3.0
234 stars 54 forks source link

canal+(alt) not work #38

Closed ningsibuqu closed 2 months ago

ningsibuqu commented 2 months ago

dlfaanjlapjclccpkcpnlhdofmndbeif-1720947942372.log

Click on the guess and the mouse will keep circling around and getting stuck. 8222c70b6e949b3756a4c186b28a8f3

TPD94 commented 2 months ago

Line 6 of your log

GET chrome-extension://dlfaanjlapjclccpkcpnlhdofmndbeif/device.wvd net::ERR_FILE_NOT_FOUND

add a CDM correctly.

FoxRefire commented 2 months ago

@ElCap13 I don't have a C+ account so I can't test it, could you please check the requirements for this license server?

Since you provided the schema file by e-mail, I think you have confirmed that it works there.

The three main things to check are whether a physical device key pair is required, whether it depends on a particular browser, and whether additional operations such as license request blocking are necessary.

@TPD94 That log is not the problem, just a fallback to using key pairs in blobs format instead of wvd.

@ningsibuqu Please write down response of failed license request made from extension The response of a failed request is crucial for problems caused only by a specific license server, and looking only at the console logs does not provide any important information.

ElCap13 commented 2 months ago

@FoxRefire the response from the licence server is successful but the the licence response parsing is not correct. In CanalPlus2.py, its currently this: licence = base64.b64decode(re.search(".*(.*)<\/license>", str(res))[2].encode()) but it should be this: licence = base64.b64decode(re.search(".*<license contentid=\"(.*)\">(.*)<\/license>", str(res))[2].encode()) heres the format of the licence response if you want to test the regex: <licenseresponse deviceid="blah" expirationdate="08/11/2024 01:31:52" expirationafterfirstuse="P31D" xmlns="http://www.canal-plus.com/DRM/V1"><clientresponse statuscode="200"><license contentid="BEL_11111111.c">CAIS...</license></clientresponse></licenseresponse>

FoxRefire commented 2 months ago

Thanks for response. I have changed it to parse XML using ElementTree instead of using regex. Could you please confirm that this works?

import xml.etree.ElementTree as ET
b64challenge = base64.b64encode(challenge).decode()
res = await corsFetch(licUrl, "POST", licHeaders, b64challenge, "str")

licence = ET.XML(res)[0][0].text
ElCap13 commented 2 months ago

Thanks for response. I have changed it to parse XML using ElementTree instead of using regex. Could you please confirm that this works?

import xml.etree.ElementTree as ET
b64challenge = base64.b64encode(challenge).decode()
res = await corsFetch(licUrl, "POST", licHeaders, b64challenge, "str")

licence = ET.XML(res)[0][0].text

Yep that works Image 761