I'm trying to get the keys for example this stream: https://www.npostart.nl/het-jaar-van-fortuyn/25-03-2022/AT_2156884
I have WKS-KEYS with Android CDM in place. In the headers.py I put the "'x-custom-data': " with the value that was given, which should be sufficient.
This method was working before, but now I'm getting this error:
python l3.py output:
What am I doing wrong? How to fix this error? Thanks in advanceCode:PSSH: AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwIARIQ43SFoLGVUEZ10kDXjsJl2RoIdXNwLWNlbmMiGDQzU0ZvTEdWVUVaMTBrRFhqc0psMlE9PSoAMgA= License URL: https://npo-drm-gateway.samgcloud.nepworldwide.nl/authentication D:\xxx\pywidevine\L3\cdm\cdm.py:260: RuntimeWarning: Unexpected end-group tag: Not all data was converted license.ParseFromString(base64.b64decode(license_b64)) Traceback (most recent call last): File "D:\xxx\l3.py", line 25, in <module> correct, keys = WV_Function(pssh, lic_url) File "D:\xxx\l3.py", line 21, in WV_Function wvdecrypt.update_license(license_b64) File "D:\xxx\pywidevine\L3\decrypt\wvdecryptcustom.py", line 58, in update_license self.cdm.provide_license(self.session, license_b64) File "D:\xxx\pywidevine\L3\cdm\cdm.py", line 275, in provide_license session.session_key = oaep_cipher.decrypt(license.SessionKey) File "C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\site-packages\Cryptodome\Cipher\PKCS1_OAEP.py", line 167, in decrypt raise ValueError("Ciphertext with incorrect length.") ValueError: Ciphertext with incorrect length.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.
+ Reply to Thread
Results 1 to 30 of 36
Thread
-
-
Any way to confirm?
I also tried this stream with the same method: https://bitmovin.com/demos/drm
And it would give me the keys -
Someone with more experience and still a spark for this will probably show up and tell you soon.
When was the last time you were able to get keys from npo?
If I'm not mistaken it needed modification some time ago.
So if you were able to get keys in the last few days, CDM probably toasted.
If you were able to get keys a somewhat long time ago, might just need some modification. -
-
Thanks but I'm hoping I could get a working method again so I can get the keys myself.
The CDM that I'm using seems to be working still. When I get the keys from this stream: https://bitmovin.com/demos/drm with a revoked key, it gives me "unable to parse license - check protobufs" error, but with my own L3 CDM, it's working, so there must be an issue with my WKS-KEYS.
edit: This stream for example is giving me the same error: https://www.rtlnieuws.nl/video/uitzendingen/video/5297771/rtl-nieuws-1930-uur
Code:PSSH: AAAAMnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABISEPxKFH8UT0EipRFvdLZbtB8= License URL: https://keydelivery.rtl.nl/widevine/?kid=fc4a147f-144f-4122-a511-6f74b65bb41f D:\xxx\pywidevine\L3\cdm\cdm.py:260: RuntimeWarning: Unexpected end-group tag: Not all data was converted license.ParseFromString(base64.b64decode(license_b64)) Traceback (most recent call last): File "D:\xxx\l3.py", line 25, in <module> correct, keys = WV_Function(pssh, lic_url) File "D:\xxx\l3.py", line 21, in WV_Function wvdecrypt.update_license(license_b64) File "D:\xxx\pywidevine\L3\decrypt\wvdecryptcustom.py", line 58, in update_license self.cdm.provide_license(self.session, license_b64) File "D:\xxx\pywidevine\L3\cdm\cdm.py", line 275, in provide_license session.session_key = oaep_cipher.decrypt(license.SessionKey) File "C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\site-packages\Cryptodome\Cipher\PKCS1_OAEP.py", line 167, in decrypt raise ValueError("Ciphertext with incorrect length.") ValueError: Ciphertext with incorrect length.
Last edited by StukBetonijzer; 26th Mar 2022 at 14:05.
-
obviously you have some problems ...
https://www.rtlnieuws.nl/video/uitzendingen/video/5297771/rtl-nieuws-1930-uur
Code:fc4a147f144f4122a5116f74b65bb41f:78e99545dcc09e6d1d5544c3970cce54
-
Getting the same error as OP using WKS-Keys but I'm able to get the KID:KEY on the getwv site... I wonder what am I doing wrong on WKS-Keys?
-
For which of the links?
Apparently for NPO, the problem is in the l3.py and how the x-custom-data is used. It was working fine late january but they must have changed something now. So far nobody wants to reveal the solution. There are more ppl that are having this problem. -
I updated all my pip packages recently. Errrors I had been getting, (unrelated to this admittedly), disappeared. Worth a try?
-
-
-
-
-
-
-
I found, eventually, that narrowvine-reborn collects this too.
I had errors of all kinds but the headers were wrong.
This narrowvine call worked for me:
Code:python narrowvine_reborn.py -mpd "https://cdn-rtlvod-d5.akamaized.net/27a97a1d-457b-4707-b55e-8f8c4104ee62/528773b2-bbaf-423f-9437-cd4ef31a4dd5.ism/manifest(format=mpd-time-csf,encryption=cenc,Filter=Quality).mpd" -lic "https://api.rtl.nl/watch/license/widevine/?kid=fc4a147f-144f-4122-a511-6f74b65bb41f" -k "{'Origin': 'https://www.rtlnieuws.nl', 'x-cluster': 'prdw', 'Authorization' : 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiNTI4NzczYjItYmJhZi00MjNmLTk0MzctY2Q0ZWYzMWE0ZGQ1IiwidGVuYW50IjoiWGwiLCJtZXRhLVVzZXJBZ2VudCI6Ik1vemlsbGEvNS4wIChYMTE7IEZlZG9yYTsgTGludXggeDg2XzY0OyBydjo5OC4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94Lzk4LjAiLCJtZXRhLVJlZmVyZXIiOiJodHRwczovL3d3dy5ydGxuaWV1d3MubmwvdmlkZW8vdWl0emVuZGluZ2VuL3ZpZGVvLzUyOTc3NzEvcnRsLW5pZXV3cy0xOTMwLXV1ciIsIm1ldGEtQ291bnRyeUNvZGUiOiJnZW9yZWdpb249Mixjb3VudHJ5X2NvZGU9R0IscmVnaW9uX2NvZGU9RU4sY2l0eT1TRUFGT1JELGxhdD01MC43Nyxsb25nPTAuMTAsdGltZXpvbmU9R01ULGNvbnRpbmVudD1FVSx0aHJvdWdocHV0PWxvdyxidz0xLG5ldHdvcms9YnQsYXNudW09Mjg1Nixsb2NhdGlvbl9pZD0wIiwibWV0YS1SZXF1ZXN0VGltZVV0YyI6IjIwMjItMDMtMjcgMTE6MjM6NTIuNTc1IiwibWV0YS1UZW5hbnQiOiJYbCIsIm1ldGEtRGV2aWNlIjoid2ViIiwibWV0YS1Ecm0iOiJXaWRldmluZSIsIm1ldGEtRm9ybWF0IjoiZGFzaCIsIm1ldGEtSXNEb3dubG9hZCI6IkZhbHNlIiwibmJmIjoxNjQ4MzgwMjMyLCJleHAiOjE2NDgzODM4MzIsImlhdCI6MTY0ODM4MDIzMiwiaXNzIjoiaHR0cHM6Ly9lbnRpdGxlbWVudC5ydGwubmwiLCJhdWQiOiJSVEwifQ.41IzDnaj1pHxlJw-AoL_du26GDC-wv4B7B7HdsrV6ZQ'}"
Code:headers = { 'User-Agent': 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0', 'Accept': '*/*', 'Accept-Language': 'en-GB,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'Referer': 'https://www.rtlnieuws.nl/video/uitzendingen/video/5297771/rtl-nieuws-1930-uur', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiNTI4NzczYjItYmJhZi00MjNmLTk0MzctY2Q0ZWYzMWE0ZGQ1IiwidGVuYW50IjoiWGwiLCJtZXRhLVVzZXJBZ2VudCI6Ik1vemlsbGEvNS4wIChYMTE7IEZlZG9yYTsgTGludXggeDg2XzY0OyBydjo5OC4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94Lzk4LjAiLCJtZXRhLVJlZmVyZXIiOiJodHRwczovL3d3dy5ydGxuaWV1d3MubmwvdmlkZW8vdWl0emVuZGluZ2VuL3ZpZGVvLzUyOTc3NzEvcnRsLW5pZXV3cy0xOTMwLXV1ciIsIm1ldGEtQ291bnRyeUNvZGUiOiJnZW9yZWdpb249Mixjb3VudHJ5X2NvZGU9R0IscmVnaW9uX2NvZGU9RU4sY2l0eT1TRUFGT1JELGxhdD01MC43Nyxsb25nPTAuMTAsdGltZXpvbmU9R01ULGNvbnRpbmVudD1FVSx0aHJvdWdocHV0PWxvdyxidz0xLG5ldHdvcms9YnQsYXNudW09Mjg1Nixsb2NhdGlvbl9pZD0wIiwibWV0YS1SZXF1ZXN0VGltZVV0YyI6IjIwMjItMDMtMjcgMTE6MjM6NTIuNTc1IiwibWV0YS1UZW5hbnQiOiJYbCIsIm1ldGEtRGV2aWNlIjoid2ViIiwibWV0YS1Ecm0iOiJXaWRldmluZSIsIm1ldGEtRm9ybWF0IjoiZGFzaCIsIm1ldGEtSXNEb3dubG9hZCI6IkZhbHNlIiwibmJmIjoxNjQ4MzgwMjMyLCJleHAiOjE2NDgzODM4MzIsImlhdCI6MTY0ODM4MDIzMiwiaXNzIjoiaHR0cHM6Ly9lbnRpdGxlbWVudC5ydGwubmwiLCJhdWQiOiJSVEwifQ.41IzDnaj1pHxlJw-AoL_du26GDC-wv4B7B7HdsrV6ZQ', 'content-type': 'application/octet-stream', 'Origin': 'https://www.rtlnieuws.nl', 'DNT': '1', 'Connection': 'keep-alive', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'cross-site', 'kid': 'fc4a147f-144f-4122-a511-6f74b65bb41f', # Requests doesn't support trailers # 'TE': 'trailers', }
Last edited by A_n_g_e_l_a; 27th Mar 2022 at 07:43. Reason: updated
-
-
'x-custom-data' in the header is JWT which is one time and should be generated from within the code itself
-
-
Last edited by ridibunda; 22nd Jun 2022 at 03:31.
-
if we're talking about rtlnieuws.nl, the x-custom-data token lasts for about 1 hour and its not one-time. it doesnt seem to be geo-restricted either.
if we're talking about npostart.nl, the 'x-custom-data' token is much shorter (maybe 1min) but its not one-time.
its enough time to copy it from the browser into a wks or getwvkeys.py script.
the token is restricted to your ip address too. -
In my case, it is not "x-custom-data".
There is a "dt-custom-data" under Request Headers. It is the same value on every stream and it doesn't change day to day, too.
Request URL is https://lic.drmtoday.com/license-proxy-widevine/cenc/
That modified lic server link does not work:
https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true
I convert cURL(bash) to Python, then it gives "not all data was converted" error.
How did it work on that Pakistani Discord Guy's website? I am unable to use it now. -
not sure what youre talking about....
neither of rtlnieuws.nl or npostart.nl use drmtoday as a license server
what site?
sample link? -
Yes, thanks Vegeta.
No problem with Python or modules. It was just about "headers.py" file.
"headers.py" must only include "dt-custom-data" lines in headers part. Other lines above must be deleted.
Otherwise, WKS is unable to send the correct request to that lic server.
Like that:
headers = {
'dt-custom-data':,
}
data = ....
response = ...Last edited by ridibunda; 25th Jun 2022 at 06:53.
-
Last edited by Baldrick; 25th Jun 2022 at 07:43.
Similar Threads
-
Widevine Content Key Decryption
By vfa1 in forum Video Streaming DownloadingReplies: 26Last Post: 12th Jan 2024, 05:23 -
What is the so-called 'working CDM' in the context of widevine DRM?
By adidaz in forum Video Streaming DownloadingReplies: 14Last Post: 15th Mar 2022, 04:05 -
widevine decryption help
By birbal1 in forum Video Streaming DownloadingReplies: 2Last Post: 5th Dec 2021, 10:11 -
Widevine guesser not working
By Hammer in forum Video Streaming DownloadingReplies: 13Last Post: 4th Oct 2021, 11:26 -
widevine decrypt extension for microsoft edge not working
By takheang303 in forum Video Streaming DownloadingReplies: 6Last Post: 3rd Apr 2021, 11:46