VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 52
Thread
  1. I've been following this guide: https://cdm-project.com/How-To/Obtaining-keys-generic-services
    So far i got PSSH and license url, but all requests I send to license url are 400 Bad Request
    Yes I searched some old threads: https://www.videohelp.com/search?siteurl=forum.videohelp.com&q=drmtoday some said to put ?specConform=true at the end of license url however that did nothing...
    I tried to copy the request directly from DevTools and send it again, however I get 400 too (which is weird because dt-custom-data stays the same):
    (i did right click then copy as fetch and pasted in console)
    Here is all the information (i dont care about leaking credentials, i used a temp mail account)
    PSSH:
    Code:
    AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQMk/qxEg9OB+uANacuI/tKRoIY2FzdGxhYnMiGE1rL3F4RWc5T0IrdUFOYWN1SS90S1E9PTIHZGVmYXVsdA==
    License url:
    Code:
    https://lic.drmtoday.com/license-proxy-widevine/cenc/
    Headers (copied from browser dev tools):
    Code:
    dt-custom-data: eyJ1c2VySWQiOiI3NzM4OTU5Iiwic2Vzc2lvbklkIjoiSjJLSl84LWw5bC1oay0zdExaLUp6TnFwemptOWhWNUtYT2ZFc1RFSkhZc0xjTVc3QXRhendTdHIzOEFkblVNdUlkUk1ZLTJxWVR1RlZxY0hka19JYmcuLiIsIm1lcmNoYW50IjoiYXZpaW9uMiJ9
    And by the way, could anyone teach me how to use cdrm-project.com? What do i put inside the build info field?
    On a side note I got some data from wvdumper for android, here are logs: https://pastebin.mozilla.org/VnQ4duqx/raw

    Again, thanks anyone who can help me, I wish to know what I am doing wrong here
    Quote Quote  
  2. Have you tried License url: https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true And the pssh is the correct one
    Quote Quote  
  3. Originally Posted by Bonde View Post
    Have you tried License url: https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true And the pssh is the correct one
    Thanks for your reply. Yeah I double checked the pssh, and I tried that url too.
    Quote Quote  
  4. Originally Posted by stabbedbybrick View Post
    What site is it?
    I think the site is region locked to my country, here is MPD url:
    Code:
    https://cdn1.oiv.hr/hrtnpvrorigin/1203877064.smil/manifest.mpd
    This is code to get dt-custom-data, note you might have to manually put your ip address in the header:
    Code:
    import requests, base64, json
    
    headers = {
        'Accept': 'application/json, text/plain, */*',
        'Accept-Language': 'en-GB,en;q=0.9,hr-HR;q=0.8,hr;q=0.7,mk-MK;q=0.6,mk;q=0.5,en-US;q=0.4',
        'Authorization': 'Client 6Y8ZsSEtOkOG6PppWTEGsAxS47HrFEGE2jjII1eutjgA3gks1Zni4EenmRRKaPNrhQ',
        'DeviceId': '63944e94-0046-435f-ae71-b92c45bc4728',
        'DeviceTypeId': '6',
        'IPAddress': '123.45.67.89',  # this field
        'OperatorReferenceId': 'hrt',
        'Origin': 'https://hrti.hrt.hr',
        'Referer': 'https://hrti.hrt.hr/home',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
        'content-type': 'application/json',
    }
    json_data = {
        'ContentType': 'thepg',
        'ContentReferenceId': '1203877064',
        'ContentDrmId': 'hrtnpvrorigin_1203877064.smil',
        'VideostoreReferenceIds': None,
        'ChannelReferenceId': '40013',
        'StartTime': '/Date(1681229280000)/',
        'EndTime': '/Date(1681232280000)/',
    }
    def main():
        r = requests.post('https://hrti.hrt.hr/api/api/ott/AuthorizeSession', headers=headers, json=json_data)
        return {'dt-custom-data': base64.b64encode(json.dumps({"userId": "7738959", 'sessionId': r.json()['Result']['DrmId'], "merchant": "aviion2"}).replace(' ', '').encode()).decode())


    EDIT: I tried using WKS-KEY (from github), this is the output: unable to parse license - check protobufs (prior to that I had to set environment variable PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python because
    Code:
    TypeError: Descriptors cannot not be created directly.
    If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
    If you cannot immediately regenerate your protos, some other possible workarounds are:
     1. Downgrade the protobuf package to 3.20.x or lower.
     2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
    
    More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
    )
    Last edited by TheGreatUnknown90; 14th Apr 2023 at 04:34. Reason: added some info
    Quote Quote  

  5. Update: cdrm-project worked, which means I'm able to use it practically without any android cdm (device_client_id_blob and device_private_key)
    However I'm still unsure what I was doing wrong on my side
    Quote Quote  
  6. Nice. Sometimes it's just a matter of passing the right headers, which you obviously did since it worked. Just remember what headers you used for the next time.
    Quote Quote  
  7. All right, I saw what site you're using in your headers and checked it out.

    The only thing you have to do is to grab the dt-custom-data from the Headers tab in dev tools and run the request within 60 seconds and it'll work. I tried with a few videos and didn't experience any issues.
    Quote Quote  
  8. Originally Posted by stabbedbybrick View Post
    All right, I saw what site you're using in your headers and checked it out.

    The only thing you have to do is to grab the dt-custom-data from the Headers tab in dev tools and run the request within 60 seconds and it'll work. I tried with a few videos and didn't experience any issues.
    I made a script to generate the dt-custom-data header for me (using an account's auth token on that site) however I cannot get it working using locally dumped cdm device id from android studio virtual phone (I followed the sticky thread). The license server denies every request with 400 Bad Request. That's what I'm trying to fix, so I don't have to rely on a third party service for decryption
    Quote Quote  
  9. Using WKS (or any other tool) with "Jednostavno Raymond Blanc | E01"

    headers.py:

    Code:
    import requests
    
    headers = {
        'dt-custom-data': 'eyJ1c2VySWQiOiI4OTE3MDUxIiwic2Vzc2lvbklkIjoiZUExRjNoUk1pM2VLMEpGQnZWdm9uY3VNaENxRUVrTWlMbzBvVHZob3lUT0NnZHJfR2lKYVNZYVlfdVVaUFVXV2FkWEVfQU1STDhNY1pqa21QQm9fZkEuLiIsIm1lcmNoYW50IjoiYXZpaW9uMiJ9',
        
    }
    PSSH:

    Code:
    AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQBOQL8KeEM/qj16d5p1Eh2RoIY2FzdGxhYnMiGEJPUUw4S2VFTS9xajE2ZDVwMUVoMlE9PTIHZGVmYXVsdA==
    License url:

    Code:
    https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true
    Key:

    Code:
    --key 04e40bf0a78433faa3d7a779a75121d9:34535db56e83e5dd9594c3046a849e5c
    Make the request fast enough and it should work.
    Quote Quote  
  10. Originally Posted by stabbedbybrick View Post
    Using WKS (or any other tool) with "Jednostavno Raymond Blanc | E01"

    headers.py:

    Code:
    import requests
    
    headers = {
        'dt-custom-data': 'eyJ1c2VySWQiOiI4OTE3MDUxIiwic2Vzc2lvbklkIjoiZUExRjNoUk1pM2VLMEpGQnZWdm9uY3VNaENxRUVrTWlMbzBvVHZob3lUT0NnZHJfR2lKYVNZYVlfdVVaUFVXV2FkWEVfQU1STDhNY1pqa21QQm9fZkEuLiIsIm1lcmNoYW50IjoiYXZpaW9uMiJ9',
        
    }
    PSSH:

    Code:
    AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQBOQL8KeEM/qj16d5p1Eh2RoIY2FzdGxhYnMiGEJPUUw4S2VFTS9xajE2ZDVwMUVoMlE9PTIHZGVmYXVsdA==
    License url:

    Code:
    https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true
    Key:

    Code:
    --key 04e40bf0a78433faa3d7a779a75121d9:34535db56e83e5dd9594c3046a849e5c
    Make the request fast enough and it should work.
    Thanks, could you please tell me what to do with device_client_id_blob and device_private_key in order to make WKS work, if that matters at all? The output I get from WKS is:
    Code:
    unable to parse license - check protobufs
    . I tried with pip installing protobuf latest version and version ==3.20


    EDIT: nevermind, I fixed it. I used one of wks-key fork from github but unfortunately I lost the original link because i used incognito
    Thanks once again, and cheers
    Last edited by TheGreatUnknown90; 14th Apr 2023 at 13:22.
    Quote Quote  
  11. Hello, everyone.

    I followed the procedure shown in this video (use FIREFOX to open it): https://web.archive.org/web/20220301190239/https://streamable.com/umoszy

    but https://cdrm-project.com/ always returns me this error: Error 400: Custom Data is Required
    There's no mention of this error in the FAQ and the cdrm-project Discord server is dead.

    These are my values:

    PSSH: AAAATHBzc2gBAAAA7e+LqXnWSs6jyCfc1R0h7QAAAAE01F89WE RGurtJLER4sfTSAAAAGBIQNNRfPVhERrq7SSxEeLH00kjj3JWb Bg==

    License is:
    https://kms.watchcorridor.com/v1/widevine?cd=eyJCeXBhc3MiOm51bGwsIkV4cGlyeSI6IjIwMjMtM...9JZCI6NTMzMn0=

    but I wrote it as: https://kms.watchcorridor.com/v1/widevine

    Headers:
    accept-encoding: gzip, deflate, br
    accept-language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
    content-length: "4194"
    origin: https://www.corridordigital.com
    user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

    I feel that I'm next to the solution but I missed something.

    Any Help?

    Thanks.
    Quote Quote  
  12. edit: double post
    Last edited by corvo4791; 27th Apr 2023 at 12:04.
    Quote Quote  
  13. edit: moved to correct thread
    Quote Quote  
  14. Originally Posted by corvo4791 View Post
    but https://cdrm-project.com/ always returns me this error: Error 400: Custom Data is Required
    There's no mention of this error in the FAQ and the cdrm-project Discord server is dead.

    These are my values:

    PSSH: AAAATHBzc2gBAAAA7e+LqXnWSs6jyCfc1R0h7QAAAAE01F89WE RGurtJLER4sfTSAAAAGBIQNNRfPVhERrq7SSxEeLH00kjj3JWb Bg==

    License is:
    https://kms.watchcorridor.com/v1/widevine?cd=eyJCeXBhc3MiOm51bGwsIkV4cGlyeSI6IjIwMjMtM...9JZCI6NTMzMn0=
    1) double post. you can edit ... and delete text on first or second double post

    2) you're sure about your pssh ? i think is wrong pssh ... share here mpd or better video link

    3) cdrm-server isn't dead

    4) don't trim lic url. the token is included in the link, so need full lic url
    Quote Quote  
  15. Originally Posted by lomero View Post

    1) double post. you can edit ... and delete text on first or second double post

    2) you're sure about your pssh ? i think is wrong pssh ... share here mpd or better video link

    3) cdrm-server isn't dead

    4) don't trim lic url. the token is included in the link, so need full lic url
    1) Sorry for the double post. I didn't see it and now I don't know how to cancel it. I've just edited it to something different.

    2) I'm not sure but I followed this video step by step (use FIREFOX to open it): https://web.archive.org/web/20220301190239/https://streamable.com/umoszy
    I put here the links:
    This is the MPD: https://video.watchcorridor.com/2204f46a-2145-4045-9dfd-d1aa22874301/dash/68031d39-7d2...d6b93df0dc.mpd
    This is the mp4: https://video.watchcorridor.com/2204f46a-2145-4045-9dfd-d1aa22874301/dash/68031d39-7d2...df0dc_3840.mp4

    3) The Discord server in unaccessible.

    4) I used both trimmed and full link and it returns 2 different errors.

    Thanks for the help.
    Quote Quote  
  16. you have already had your goal in your second equal thread, but still the discord server works fine. maybe issue by your side only
    Quote Quote  
  17. Originally Posted by lomero View Post
    you have already had your goal in your second equal thread, but still the discord server works fine. maybe issue by your side only
    Hello.
    I solved on the other side thanks to you and the final help of another user.
    Thanks.

    If could help anybody, the other thread is here: https://forum.videohelp.com/threads/409388-Problems-with-cdrm-project-com#post2688087
    Quote Quote  
  18. Originally Posted by TheGreatUnknown90 View Post
    Originally Posted by stabbedbybrick View Post
    Using WKS (or any other tool) with "Jednostavno Raymond Blanc | E01"

    headers.py:

    Code:
    import requests
    
    headers = {
        'dt-custom-data': 'eyJ1c2VySWQiOiI4OTE3MDUxIiwic2Vzc2lvbklkIjoiZUExRjNoUk1pM2VLMEpGQnZWdm9uY3VNaENxRUVrTWlMbzBvVHZob3lUT0NnZHJfR2lKYVNZYVlfdVVaUFVXV2FkWEVfQU1STDhNY1pqa21QQm9fZkEuLiIsIm1lcmNoYW50IjoiYXZpaW9uMiJ9',
        
    }
    PSSH:

    Code:
    AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQBOQL8KeEM/qj16d5p1Eh2RoIY2FzdGxhYnMiGEJPUUw4S2VFTS9xajE2ZDVwMUVoMlE9PTIHZGVmYXVsdA==
    License url:

    Code:
    https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true
    Key:

    Code:
    --key 04e40bf0a78433faa3d7a779a75121d9:34535db56e83e5dd9594c3046a849e5c
    Make the request fast enough and it should work.
    Thanks, could you please tell me what to do with device_client_id_blob and device_private_key in order to make WKS work, if that matters at all? The output I get from WKS is:
    Code:
    unable to parse license - check protobufs
    . I tried with pip installing protobuf latest version and version ==3.20


    EDIT: nevermind, I fixed it. I used one of wks-key fork from github but unfortunately I lost the original link because i used incognito
    Thanks once again, and cheers
    Hi.

    I have tried same, but can not get keys with wks-keys.
    Always get error unable to parse license - check protobufs

    Do I need to add somethinf in l3.py?

    Can someone help to figure out this problem?

    Thanks
    Quote Quote  
  19. I have tried to change l3.py and add this in that dt_custom_data = input('\nCData: ') and WV_Function(pssh, lic_url, dt_custom_data)

    I got error like this failed to parse cert as SignedMessage
    failed to parse service certificate
    unable to parse license - check protobufs

    Can Anyone help me how to key?
    Quote Quote  
  20. Member
    Join Date
    Dec 2021
    Location
    england
    Search Comp PM
    video URL? so we can look at it
    Quote Quote  
  21. Stop PM.

    Post here and people who come here can follow this thread and find a solution

    Your site

    https://hrti.hrt.hr/live/tv

    The problem is your headers

    You just need "dt-custom-data"

    your key

    Code:
    edd08df18e523831bb1849eb897f20e0:5d936f87fd0aab2aba6578d1342d5041
    Quote Quote  
  22. Originally Posted by cedric8528 View Post
    Stop PM.

    Post here and people who come here can follow this thread and find a solution

    Your site

    https://hrti.hrt.hr/live/tv

    The problem is your headers

    You just need "dt-custom-data"

    your key

    Code:
    edd08df18e523831bb1849eb897f20e0:5d936f87fd0aab2aba6578d1342d5041
    Thanks for answer cedric.
    Yes, I know that need to have only dt-custom-data.

    I have this in header:

    import requests

    headers = {

    'dt-custom-data': 'eyJ1c2VySWQiOiJhbm9ueW1vdXNocnQiLCJzZXNzaW9uSWQiO iI3Z2xaYkNmVFAwVHUtQVdaYTEtTzJlSlIzZlZ4YU1peWNlQTB IU0FDc0puUEkzdDdqa1R4VW4zeDV6VFhCeGxKVmtmaXVxeDdpN jRyMUh6YzZIMkJwZy4uIiwibWVyY2hhbnQiOiJhdmlpb24yIn0 =',

    }

    But, always get errors.

    Do you use WKS and default l3.py or custom l3.py?
    If it is custom, can You share it?
    Which portobuf do You use? I have 3.20.4
    Quote Quote  
  23. Also, I tried to use some version like one member post:

    # -*- coding: utf-8 -*-
    # Module: KEYS-L3
    # Created on: 11-10-2021
    # Authors: -∞WKS∞-
    # Version: 1.1.0

    import base64, requests, sys, xmltodict
    import headers
    from pywidevine.L3.cdm import cdm, deviceconfig
    from base64 import b64encode
    from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt

    pssh = input('\nPSSH: ')
    lic_url = input('License URL: ')
    token = input('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)
    challengeb64 = str(b64encode(wvdecrypt.get_challenge()),"utf-8")
    data = {"token":token,"widevineBody":challengeb64}
    widevine_license = requests.post(url=lic_url, json=data, headers=headers.headers)
    print(widevine_license.request.body)
    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)

    print()
    for key in keys:
    print('--key ' + key)


    With that version, I get errors like this:

    Unexpected end-group tag: Not all data was converted
    license.ParseFromString(base64.b64decode(license_b 64))
    Traceback (most recent call last):
    File "l3_test.py", line 28, in <module>
    correct, keys = WV_Function(pssh, lic_url)
    File "l3_test.py", line 24, in WV_Function
    wvdecrypt.update_license(license_b64)
    File "C:\Test za kljuceve\Keys\WKS-KEYS\pywidevine\L3\decrypt\wvdecryptcustom.
    py", line 58, in update_license
    self.cdm.provide_license(self.session, license_b64)
    File "C:\Test za kljuceve\Keys\WKS-KEYS\pywidevine\L3\cdm\cdm.py", line 275, i
    n provide_license
    session.session_key = oaep_cipher.decrypt(license.SessionKey)
    File "C:\Users\PC\AppData\Local\Programs\Python\Python3 8-32\lib\site-packages\
    Cryptodome\Cipher\PKCS1_OAEP.py", line 167, in decrypt
    raise ValueError("Ciphertext with incorrect length.")
    ValueError: Ciphertext with incorrect length.
    Quote Quote  
  24. Education Student (Grad.) CrymanChen's Avatar
    Join Date
    Apr 2022
    Location
    Mainland China
    Search Comp PM
    Originally Posted by petar20 View Post
    Also, I tried to use some version like one member post:
    ...
    Wrong script, it can't parse the license.
    As @cedric8528 said, pass the dt-custom-data to the program and it should work.
    Image
    [Attachment 74122 - Click to enlarge]
    twitter @Cryman_Chen
    email crymanchen@gmail.com
    Quote Quote  
  25. Originally Posted by CrymanChen View Post
    Originally Posted by petar20 View Post
    Also, I tried to use some version like one member post:
    ...
    Wrong script, it can't parse the license.
    As @cedric8528 said, pass the dt-custom-data to the program and it should work.
    Image
    [Attachment 74122 - Click to enlarge]
    Thanks for the answer.

    I noticed one thing.

    dt-custom-data on your image have 136 characters.

    Mine has 200. I guess that could be problem.

    When I put mine dt-custom-data in base64decode, I get this value:
    {"userId":"anonymoushrt","sessionId":"Ozyqi_1tr_II dCAbWwrbknWb53R7iJDKLd5DHIOXiPKIkMcpPP0n7S852YwCeo 5XCzJTFwd8iDmgo5Fr-VaQhQ..","merchant":"aviion2"}

    What value do you get when put your dt-custom-data in base64decode?
    Quote Quote  
  26. this guy spam his issue for this link ... with PM to everybody. and the key is already available, thanks to cedric
    Quote Quote  
  27. Originally Posted by lomero View Post
    this guy spam his issue for this link ... with PM to everybody. and the key is already available, thanks to cedric
    Don't spam.
    I am not such guy.
    I have sent PM to you and cedric and I got answers from both of you that help will be in this topic.

    I am sorry if I disturb You with PM.

    It is easy to put x-dt-custom-data in header, but don't know where is problem.

    Is it possbile to get l3.py which work, because default l3.py give some issues?
    Quote Quote  
  28. maybe your cdm is dead

    try here
    Quote Quote  
  29. Originally Posted by lomero View Post
    maybe your cdm is dead

    try here
    No, cdm work - I tested other web site and got key.

    What do You get when put dt-custom-data in base64 decode?

    I got this:
    {"userId":"anonymoushrt","sessionId":"ms8g6TsOV6fm 9SGt6GabtR_OxkD-D3IBRrR2ZOCODq5HcHGW8gW34fwDyiLQuUpfW2kxt4SOJyLMIB-USSoJfQ..","merchant":"aviion2"}

    Also dt-custom-data which I got - have 200 characters, but CrymanChen image show that his data has 136 characters. Maybe that make problem - what do you think?
    Quote Quote  



Similar Threads

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