VideoHelp Forum
+ Reply to Thread
Page 3 of 5
FirstFirst 1 2 3 4 5 LastLast
Results 61 to 90 of 125
Thread
  1. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by zhoubo518 View Post
    Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by zhoubo518 View Post

    No device_private_key and the device_client_blob found and how to find device_private_key and a device_client_blob?
    Are you saying you do not have your own device_private_key and a device_client_blob
    Yes. How can I get these files?
    Well you can start by being a bit more awake. The very first post in the forum is https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio
    Thanks! I will read it.:p
    Quote Quote  
  2. Afternoon all. I've battled on and fully gone step-by-step as best I can. I have both device_private_key and device_client_id_blob via the excellent cedric guide. No apparant issues with that. I just can't for the life of me get the "pywidevine create-device -k device_private_key -c device_client_id_blob -t ANDROID -l3 -o WVD" step to work. I'm forever getting "Error: key: Not a path to a file, or it doesn't exist."

    I have tried all examples (including the basic folderA / folderB and still get the same result).

    Image
    [Attachment 78583 - Click to enlarge]

    Image
    [Attachment 78584 - Click to enlarge]


    The WVD directory is created. I'm running the command from the folder containg the x2 files (not WVD). Regardless of (env) or any type of attempt I get hit with the same error. Any ideas.

    Thanks all, sorry it's that question again !!
    Quote Quote  
  3. Originally Posted by F1sav28 View Post
    Afternoon all. I've battled on and fully gone step-by-step as best I can. I have both device_private_key and device_client_id_blob via the excellent cedric guide. No apparant issues with that. I just can't for the life of me get the "pywidevine create-device -k device_private_key -c device_client_id_blob -t ANDROID -l3 -o WVD" step to work. I'm forever getting "Error: key: Not a path to a file, or it doesn't exist."

    I have tried all examples (including the basic folderA / folderB and still get the same result).

    Image
    [Attachment 78583 - Click to enlarge]

    Image
    [Attachment 78584 - Click to enlarge]


    The WVD directory is created. I'm running the command from the folder containg the x2 files (not WVD). Regardless of (env) or any type of attempt I get hit with the same error. Any ideas.

    Thanks all, sorry it's that question again !!
    Since your files have extension you need to add them to your command:
    Code:
    pywidevine create-device -k device_private_key.pem -c device_client_id_blob.bin -t ANDROID -l3 -o WVD
    When those files are dumped they don't have any extension, so I guess you manually added those but still ran the standard command, hence the error.
    Last edited by white_snake; 2nd May 2024 at 11:45.
    Quote Quote  
  4. No way !!

    I barely ever have extensions visable, but needed to see some hidden things so only turned them on this morning, whilst I attempted this. First run after reading your obvious answer and I have a WVD file.

    Many thanks, sometimes it's right in front of you eh!

    Cheers
    Quote Quote  
  5. Hi A_n_g_e_l_a, I'm following this guide but when I run this command .\env\Scripts\activate I get this error

    .\env\Scripts\activate : The term '.\env\Scripts\activate' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or if a path was included,
    verify that the path is correct and try again.
    At line:1 char:1
    + .\env\Scripts\activate
    + ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (.\env\Scripts\activate:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    Thanks for the help
    Quote Quote  
  6. Originally Posted by kev043 View Post
    Hi A_n_g_e_l_a, I'm following this guide but when I run this command .\env\Scripts\activate I get this error

    .\env\Scripts\activate : The term '.\env\Scripts\activate' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or if a path was included,
    verify that the path is correct and try again.
    At line:1 char:1
    + .\env\Scripts\activate
    + ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (.\env\Scripts\activate:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    Thanks for the help
    Try to do this on regular cmd, not on PowerShell.
    Quote Quote  
  7. Originally Posted by ivanko362 View Post
    Use a raw string instead:
    Code:
    Device.load(r"C:\Users...
    Quote Quote  
  8. Member
    Join Date
    May 2024
    Location
    slovakia
    Search PM
    I am helpless

    https://www.youtube.com/watch?v=pLvS8bOCR6g

    Code:
    C:\Users\h96ma\Downloads
    λ l3.py
    AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEB27IdjcUyOzN/LrJaGmbXtI49yVmwY=
    Traceback (most recent call last):
      File "C:\Users\h96ma\Downloads\l3.py", line 14, in <module>
        pssh = PSSH(pssh)
               ^^^^^^^^^^
      File "C:\Users\h96ma\AppData\Local\Programs\Python\Python312\Lib\site-packages\pywidevine\pssh.py", line 67, in __init__
        raise ValueError("Data must not be empty.")
    ValueError: Data must not be empty.
    Quote Quote  
  9. Originally Posted by ivanko362 View Post
    I am helpless

    https://www.youtube.com/watch?v=pLvS8bOCR6g

    Code:
    C:\Users\h96ma\Downloads
    λ l3.py
    AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEB27IdjcUyOzN/LrJaGmbXtI49yVmwY=
    Traceback (most recent call last):
      File "C:\Users\h96ma\Downloads\l3.py", line 14, in <module>
        pssh = PSSH(pssh)
               ^^^^^^^^^^
      File "C:\Users\h96ma\AppData\Local\Programs\Python\Python312\Lib\site-packages\pywidevine\pssh.py", line 67, in __init__
        raise ValueError("Data must not be empty.")
    ValueError: Data must not be empty.
    Only change CDM path in that script with your CDM path and once you execute script you need to feed PSSH and LIC URL Manually to script via input in terminal like this. If everything is right, then keys will be printed on screen.

    Last edited by LittleSoldier; 8th May 2024 at 12:15. Reason: Added Screenshot
    Quote Quote  
  10. Member
    Join Date
    May 2024
    Location
    slovakia
    Search PM
    next error

    Image
    [Attachment 78946 - Click to enlarge]



    Image
    [Attachment 78947 - Click to enlarge]


    Code:
    C:\Users\h96ma\Downloads
    λ l3.py
    enter pssh AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEB27IdjcUyOzN/LrJaGmbXtI49yVmwY=
    enter licence url https://drm-widevine-licensing.axprod.net/AcquireLicense
    Traceback (most recent call last):
      File "C:\Users\h96ma\Downloads\l3.py", line 33, in <module>
        licence.raise_for_status()
      File "C:\Users\h96ma\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 400 Client Error: A DRM message must be provided in exactly one of the following: the "X-AxDRM-Message" HTTP header or the "AxDrmMessage" HTTP query string parameter for url: https://drm-widevine-licensing.axprod.net/AcquireLicense
    Quote Quote  
  11. Originally Posted by ivanko362 View Post
    next error

    Image
    [Attachment 78946 - Click to enlarge]



    Image
    [Attachment 78947 - Click to enlarge]


    Code:
    C:\Users\h96ma\Downloads
    λ l3.py
    enter pssh AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEB27IdjcUyOzN/LrJaGmbXtI49yVmwY=
    enter licence url https://drm-widevine-licensing.axprod.net/AcquireLicense
    Traceback (most recent call last):
      File "C:\Users\h96ma\Downloads\l3.py", line 33, in <module>
        licence.raise_for_status()
      File "C:\Users\h96ma\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 400 Client Error: A DRM message must be provided in exactly one of the following: the "X-AxDRM-Message" HTTP header or the "AxDrmMessage" HTTP query string parameter for url: https://drm-widevine-licensing.axprod.net/AcquireLicense
    Your license server needs additional header payload data in order to obtain keys.

    1. Reload video again

    2. Go to inspect > network and find Licence url by typing lic in search box

    3. In your case your licence url is this : https://drm-widevine-licensing.axprod.net/AcquireLicense

    4. Right click on it. Find copy > copy as cURL(bash) - as shown in image

    Image
    [Attachment 79359 - Click to enlarge]


    5. go to curlconverter.com and paste data in that text box

    6. After you paste the data in the text box, a result will be generated below that text box.

    7. Copy and paste that data in your script's header section.

    Code:
    headers = {
       
    }
    8. Keys will appear on the screen once you run the script again if everything is okay.
    Last edited by LittleSoldier; 25th May 2024 at 22:02. Reason: Added Screenshot for more easy understanding
    Quote Quote  
  12. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    hi, i get this error

    (env) C:\Temp\pywidevine>l3
    PSSH? AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGASEKxOQI 97ZnidoMAm43r9qoISECs+YosQVPHuLdsdz0XNnEcSEHFFCi0H RqfnDfEIzQW3nXoSEMMDy4vdx7Ry4nFVroUbtNMSEC1/4YB1ll8QTvOm/H6CqKJI49yVmwY=
    License URL? https://*****.com.br/widevine_proxy
    Traceback (most recent call last):
    File "C:\Temp\pywidevine\l3.py", line 52, in <module>
    licence.raise_for_status()
    File "C:\Python313\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 418 Client Error: Unknown status for url: https://****.com.br/widevine_proxy
    Quote Quote  
  13. picabuuu juan's Avatar
    Join Date
    May 2024
    Location
    Mars
    Search Comp PM
    Originally Posted by rafaelscs View Post
    hi, i get this error

    (env) C:\Temp\pywidevine>l3
    PSSH? AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGASEKxOQI 97ZnidoMAm43r9qoISECs+YosQVPHuLdsdz0XNnEcSEHFFCi0H RqfnDfEIzQW3nXoSEMMDy4vdx7Ry4nFVroUbtNMSEC1/4YB1ll8QTvOm/H6CqKJI49yVmwY=
    License URL? https://*****.com.br/widevine_proxy
    Traceback (most recent call last):
    File "C:\Temp\pywidevine\l3.py", line 52, in <module>
    licence.raise_for_status()
    File "C:\Python313\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 418 Client Error: Unknown status for url: https://****.com.br/widevine_proxy
    which site is that ? i think you need the correct header, @LittleSoldier had explained it [above] , and if you watch the video using a VPN , don't turn off your VPN when try to get the key .
    Quote Quote  
  14. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    Hi, i use the headers and header autentication, and the problem continues. I no use vpn because my ip is accept per provider. I can send to some the files to test if can.
    Quote Quote  
  15. Originally Posted by rafaelscs View Post
    Hi, i use the headers and header autentication, and the problem continues. I no use vpn because my ip is accept per provider. I can send to some the files to test if can.

    can you post the whole curl content here? if there is something you don't want other people to see, you can make a little modify, like authorization: eyJxxxx.

    also if you can't obtain keys, you should print the licence.content to debug. errors will point where you did wrong.
    Quote Quote  
  16. picabuuu juan's Avatar
    Join Date
    May 2024
    Location
    Mars
    Search Comp PM
    Originally Posted by rafaelscs View Post
    Hi, i use the headers and header autentication, and the problem continues. I no use vpn because my ip is accept per provider. I can send to some the files to test if can.
    just posted your whole curl and header here or maybe the whole script. from the response you got , clearly something wrong with the license .
    Quote Quote  
  17. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    oh ok, the data:

    AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGASEKxOQI 97ZnidoMAm43r9qoISECs+YosQVPHuLdsdz0XNnEcSEHFFCi0H RqfnDfEIzQW3nXoSEMMDy4vdx7Ry4nFVroUbtNMSEC1/4YB1ll8QTvOm/H6CqKJI49yVmwY=
    Last edited by rafaelscs; 12th Jun 2024 at 15:06.
    Quote Quote  
  18. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    i posted, i waiting for mod release the post
    Quote Quote  
  19. picabuuu juan's Avatar
    Join Date
    May 2024
    Location
    Mars
    Search Comp PM
    Originally Posted by rafaelscs View Post
    oh ok, the data:

    AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGASEKxOQI 97ZnidoMAm43r9qoISECs+YosQVPHuLdsdz0XNnEcSEHFFCi0H RqfnDfEIzQW3nXoSEMMDy4vdx7Ry4nFVroUbtNMSEC1/4YB1ll8QTvOm/H6CqKJI49yVmwY=
    'Host': 'mw.tvnsul.com.br',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0',
    'accept': '*/*',
    'accept-language': 'pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3',
    'referer': 'https://meuportal.tv/',
    'authorization': 'Bearer emynlokyfyv2vny4sqtfn79kd4m5e6qqsyga6x2b',
    'devicestype': 'd2ViIHBsYXllcg==',
    'profilesid': 'NjY4NzQ=',
    'version': 'NC4wLjg=',
    'origin': 'https://meuportal.tv',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'cross-site',
    'priority': 'u=4',
    # Requests doesn't support trailers
    # 'te': 'trailers',
    'Content-Type': 'application/x-www-form-urlencoded',
    wait , its android Android-based streaming app ?
    im try to create an account to see if I can watch with a free account , but the account must created using the app . but i cant find what app its . only found this "Meu Portal Corporativa Gestăo" which is a business type app .wkwkwkwk
    Last edited by juan; 28th May 2024 at 08:49.
    Quote Quote  
  20. <Response [418]> b'{"status":2603,"response":["Invalid JSON body"]}'

    so maybe this site use json challenge.
    Quote Quote  
  21. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    If anyone wants, call me privately, I'll give you more information
    Quote Quote  
  22. picabuuu juan's Avatar
    Join Date
    May 2024
    Location
    Mars
    Search Comp PM
    Originally Posted by rafaelscs View Post
    If anyone wants, call me privately, I'll give you more information
    what app did you use to create an account ? can we watch with free account ?
    there's something wrong with header , idk if the auth is correct
    Quote Quote  
  23. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    no have free account, i send my account if you can test
    Quote Quote  
  24. picabuuu juan's Avatar
    Join Date
    May 2024
    Location
    Mars
    Search Comp PM
    Originally Posted by rafaelscs View Post
    no have free account, i send my account if you can test
    what I mean is , if I created a free account . and what app that connected with this site .
    is this site geoblock ?
    Quote Quote  
  25. Member
    Join Date
    May 2024
    Location
    Brazil
    Search PM
    this is for provider, not have a free account or paid account, only autorized users
    Quote Quote  
  26. picabuuu juan's Avatar
    Join Date
    May 2024
    Location
    Mars
    Search Comp PM
    Originally Posted by rafaelscs View Post
    this is for provider, not have a free account or paid account, only autorized users
    just PM me
    Quote Quote  
  27. Originally Posted by A_n_g_e_l_a View Post
    WKS-KEYS was a fine means of learning to get keys but its time has come. More developers are producing scripts that use a WideVine Descriptor file (wvd) to locate your CDM key and blob.

    What follows is a method of getting and running a wvd file. Many will know and already use the method described below.

    Running python scripts in a special Python environment.

    Python has a problem. After lots of script downloads and installing all the necessary module or extra libraries to make the script run you can arrive at a situation where one script needs a 'pip install mybigmodule==10.2.21' but you have another script on your system that must use mybigmodule<=9.5.0. So if you follow the direction for one script it stops the other from working.

    The solution is to create a named python enviroment in which to run the first script and another named enviroment to run second.


    It is done like this and credit to Sorenb for the write-up:
    create a venv (a virtual environment) on Linux/Macos
    Code:
    python3 -m venv env
    - here the virtual environment is simply called 'env'
    For Windows
    Code:
    py -m venv env
    The the 'env' needs to be activated
    linux/Macos
    Code:
    source env/bin/activate
    Windows
    Code:
    .\env\Scripts\activate
    Now your terminal or command window will show 'env' to remind you that you are using a Python Environment.
    When you close the command window you close the environment. It is still there but next time you need to re-activate with activate command above.

    'venv creates a folder env there it stores all the 'extra' modules you download to run a script. If you no longer want the environment - just delete the 'env' folder.

    Now following the above method you can create as many environments as needed to keep each library of scripts safely apart from each other on your system.

    Just remember to start the necessary environment before running your script.

    WKS-KEYS is slowly being replaced in popularity by the use of a pip module 'pywidevine'
    Pywidevine works much the same as with WKS-KEYS except you can run your scripts from anywhere. The python commands to get the pywidevine module to cough-up keys is different but all that is transparent to most users who just want to run scripts.

    Instead of having to run your python scripts in the WKS-KEYS folder and use the path to pywidevine's decryption facilities within, you can now set up a means of using pywidevine from anywhere on your system.

    You do this by first creating a WideVine Descriptor file (wvd) which contains the details of where the device_private_key and the device_client_blob may be found.

    But first activate your python env or create a new one for pywidevine related scripts,

    Install pywidevine. Pywidevine omits to install yaml, a needed library, so we do that at the same time
    Code:
     pip install pywidevine pyaml
    Then, with your chosen env on the command prompt line, navigate to the folder where your key and blob are located.

    First make a folder where the descriptor file can be created
    Code:
     mkdir WVD
    then:-
    Code:
    pywidevine create-device -k device_private_key  -c device_client_id_blob -t ANDROID -l3 -o WVD
    for me it responded
    /home/angela/Programming/WKS-KEYS/pywidevine/L3/cdm/devices/emulator_1/WVD/google_aosp_on_ia_emulator_14.0.0_d6xxxxx4_l3.wvd
    Image
    [Attachment 74182 - Click to enlarge]

    It works the same on linux and Windows

    Now when you wish to run a script that does not use WKS-KEYS you activate the environment pywidevine is installed in and install any scripts plus its required modules. They are functionally separate from anything outside the env(ironment).
    Most scripts that use a wvd file to access your key and blob will need to know its location.

    Mine now looks like this for an emulator key/blob /home/angela/Programming/WKS-KEYS/pywidevine/L3/cdm/devices/emulator_1/WVD/google_aosp_on_ia_emulator_14.0.0_d6ixxxxxx64_l3.w vd

    Now you need an l3.py to use for simple keys
    PHP Code:
    from pywidevine.cdm import Cdm
    from pywidevine
    .device import Device
    from pywidevine
    .pssh import PSSH
    import requests
    #
    # enter special header values here  in the form  'token':  ' value',   each on one line -  remember the quotes and the comma!
    headers = {
        
    'Accept''*/*',
    }

    # prepare pssh
    #pssh = PSSH("AAAAVnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADYIARIQSOe5B5JcTV2gbw07SycC7xoNd2lkZXZpbmVfdGVzdCIIMTIzNDU2NzgyB2RlZmF1bHQ=")
    pssh input("PSSH? ")
    pssh PSSH(pssh)
    lic_url input("License URL? ")

    # load device
    # for example
    #device = Device.load(r"/home/angela/Programming/WKS-KEYS/pywidevine/L3/cdm/devices/emulator_1/WVD/google_aosp_on_ia_emulator_14.0.0_xxxxxc_4464_l3.wvd")
    device Device.load(r"<enter your path to the wvd file you have created, here>")

    # load cdm
    cdm Cdm.from_device(device)

    # open cdm session
    session_id cdm.open()

    # get license challenge
    challenge cdm.get_license_challenge(session_idpssh)

    # send license challenge (assuming a generic license server SDK with no API front)
    licence requests.post(lic_urlheaders headersdata=challenge)
    licence.raise_for_status()

    # parse license challenge
    cdm.parse_license(session_idlicence.content)

    # print keys
    for key in cdm.get_keys(session_id):

        if 
    key.type=='CONTENT':
            print(
    f"\n--key {key.kid.hex}:{key.key.hex()}")

    # close session, disposes of session data
    cdm.close(session_id
    [edit] I forgot to mention that you can now rename the wvd file created to something easier to type and you can copy it to anywhere in the system. The file contains data about your key and blob's location so be sure to never move your key and blob unless you want to do this process all over again. [/edit]

    I plan moving away from WKS-KEYS in future script releases.

    Should this perhaps be marked as Sticky Threads?
    If I was in politics I make sure you drink plenty of beer
    and watch plenty of TV to keep you busy. | Data is the new oil.
    Quote Quote  
  28. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by pssh View Post
    Should this perhaps be marked as Sticky Threads?
    Did you really need to re-post the entire message in post #1?

    I could just link to Beyond WKS-KEYS in one of the existing stickies.
    Now keydive exists, there is a good case for updating the CDM recovery method as well.
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  



Similar Threads

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