I just wanted to post a quick PSA/consolidated little helping tutorial as I struggled with this for a couple hours the other day.
I want to thank the mentors on the site as I went from knowing virtually nothing about how to download DRM content (outside of all-in-one tools) before this afternoon and spending a couple hours here and on some other sites I was successfully able to get my content.
I struggled for a while as the content I was trying to access was licensed by the following URL:
https://lic.drmtoday.com/license-proxy-widevine/cenc/
I successfully grabbed a set of CDM keys using the stickies in this forum but tried several tools like WKS-KEYS as well as some other L3.py scripts I found here and on other sites but nothing was working for me. I realized that the issue must be with the headers and specifically the x-dt-auth-token, but try as I might I wasn't able to generate a key.
I had also tried on https://cdrm-project.com/ to get the key inputting in the header info and was unsuccessful. However, after my successful attempts using @karoolus DRMToday script, I was somehow able to also get a proper response on cdrm as well, so I'm not sure exactly what I was doing wrong there.
(It might have been specifying https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true as the license server instead of just https://lic.drmtoday.com/license-proxy-widevine/cenc)
Once I found @karoolus script, I still was having issues with dependencies on my Windows box (which was successfully running the other l3 scripts I was trying). I was getting dependency errors. This was most likely due to how my python environment was setup after installing dependencies for other scripts. Anyway, I found some help in this post here regarding the bare minimum required for DRMToday.
Using that, I would recommend if you have any issues with DRMToday that you go ahead and create a Python virtual environment, activate it, and then install just what is required. Here is a snippet of how to perform this:
First line creates the venv, second makes it active, and the next 3 lines install the required dependencies via pip. Then the DRMToday.py script should run no issues.Code:python -m venv DRMToday DRMToday\Scripts\activate pip install pycryptodomex==3.15.0 pip install protobuf==3.20.3 pip install requests==2.28.1
Hope this helps someone!
+ Reply to Thread
Results 1 to 5 of 5
-
-
i try this script and then show pssh and token, i have pssh but where i get token?
[Attachment 78111 - Click to enlarge] -
As for DRMToday system, this so-called "TOKEN" probably refers to something like "dt-custom-data" or "x-dt-auth-token".
You should try searching in the network traffic and see if there's anything like this. -
here is my python scrypt to have Key:KID DRM VIDEO.
Code:import base64, requests, sys, xmltodict, os, pyfiglet from pywidevine.L3.cdm import cdm, deviceconfig from base64 import b64encode from pywidevine.L3.getPSSH import get_pssh from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt path = "Key.txt" content = '' RED = '\x1b[38;5;160m' GREEN = '\x1b[38;5;46m' CYAN = '\x1b[38;5;14m' YELLOW = '\x1b[38;5;226m' END = '\x1b[0;0m' title = pyfiglet.figlet_format('Widevine Decryptor Keys', font='slant', width=150) print(f'{CYAN}{title}{END}') def psshLength(num): if len(num) >= 148: print(f"{RED}Le code PSSH est incorrect : {num}{END}") os.system("pause") os.system("py M6Replay.py") print(f"{YELLOW}Redémarrage...{END}") else: return num print(f'{RED}PUSSH:{END} {YELLOW}', end='') pssh = input() if psshLength(pssh): print(f'{RED}dt-auth-token:{END} {YELLOW}', end='') Token = input() lic_url = "https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true" headers = {'x-dt-auth-token': '{0}'.format(Token), } def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic) widevine_license = requests.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=headers) license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() if Correct: return Correct, keyswvdecrypt correct, keys = WV_Function(pssh, lic_url) def Save_Widevine(path, content): with open(path, "w") as f: f.write(content) for key in keys: wv = key.split(":") print(f'{GREEN}Widevine Decryptor : KEY:{END} {RED}{wv[1]}{END} {GREEN}KID:{END} {RED}{wv[0]}{END} {GREEN}') Save_Widevine(path,"{1}:{0}".format(wv[1],wv[0])) os.system("pause")
Similar Threads
-
Need help with lic.drmtoday.com license server
By TheGreatUnknown90 in forum Video Streaming DownloadingReplies: 51Last Post: 20th May 2024, 14:33 -
Script for drmtoday license ?
By pouki2 in forum Video Streaming DownloadingReplies: 4Last Post: 11th Mar 2024, 04:59 -
Script for fetching keys for MUBI (drmtoday series)
By CrymanChen in forum Video Streaming DownloadingReplies: 29Last Post: 5th Jan 2024, 16:22 -
Need help with drmtoday
By magixter in forum Video Streaming DownloadingReplies: 3Last Post: 8th Oct 2023, 18:44