VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hello
    Has anyone managed to get the keys from player.pl using WKS?
    From what I have seen, no tokoen is required.
    If you do not want the way to be public, write to priv
    Quote Quote  
  2. No headers needed, just PSSH and License url.
    You can use this code instead of l3.py

    Code:
    import base64, requests, sys, xmltodict
    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
    
    pssh = input('\nPSSH: ')
    lic_url = input('License URL: ')
    
    headers = {
    }
    
    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)
        print(widevine_license.content)
        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)
    Eme logger gives the long PSSH which I decode to file using base64.guru site, then I copy the hex starting from the 3 sets of zeroes that match the last mention of pssh, then I use that hex to convert to base64 to get the correct PSSH.
    Quote Quote  
  3. Member
    Join Date
    May 2022
    Location
    Chile
    Search PM
    Indeed what vegeta says is correct, you can also get the KID from the .mpd and generate the correct psh with https://tools.axinom.com
    Quote Quote  



Similar Threads

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