VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Hi,

    Does anyone know how to get the key to decode material when site requires json format data in license request?
    Can someone please explain this to me?

    It's about the page:

    https://polsatgo.pl/ / https://polsatboxgo.pl/

    https://polsatgo.pl/wideo/programy/love-island-wyspa-milosci/5025605/sezon-1/5025650/l...7179fb1ce08784

    License / Request:

    https://b2c-www.redefine.pl/rpc/drm/

    Header after converting:

    https://throwbin.in/dz2q8j


    Tab ( Payload) : ^ (License / Request)

    https://throwbin.in/zbryg1

    Tab (Previev) : ^ (License / Request)

    https://throwbin.in/l2h4j7

    Payload tab [object: ,, CAES2h8SRQpD (...)] after uploading to the website:

    https://integration.widevine.com/diagnostics

    Result :

    https://throwbin.in/51fn8b


    MPD :

    https://ipla-e3-21.pluscdn.pl/p/vm2dash/55/5535b969aea4e22e62caf6599d2ce2777672626b/manifest.mpd



    If necessary, I will provide polsatbox account details.
    Last edited by Kadio; 25th Dec 2021 at 12:47.
    Quote Quote  
  2. If necessary, I will provide polsatbox account details.

    I think that you will have to
    Quote Quote  
  3. Please try this 15d6ac4ee1422729d569000000c 5b709:80b6c896c70eefb78332dec 3aa1af98b
    Quote Quote  
  4. @dale
    when you paste key please use code tag

    Image
    [Attachment 62547 - Click to enlarge]


    otherwise some space will be added 15d6ac4ee1422729d569000000c 5b709:80b6c896c70eefb78332dec 3aa1af98b
    Quote Quote  
  5. Can no one explain to me in a private message how to get the keys from this site? . I understand that not here publicly in the thread - because google sees everything.
    Quote Quote  
  6. Hi! I also happen to need a help for this site...

    Page : https://polsatgo.pl/wideo/swiat-wedlug-kiepskich/5024025/autoplay (no subscription required)
    PSSH :
    Code:
    AAAATXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAC0IARIQY9ygVbXL+gAJHQAAAZI9CRoNY3lmcm93eXBvbHNhdCIIMdwNAAAAAAA=
    MPD : https://ipla-e3-17.pluscdn.pl/p/vm2dash/80/80e70bae4ccc3ac946ca8a8fce39aeb28e7624d9/manifest.mpd
    License URL : https://b2c-www.redefine.pl/rpc/drm/

    Request code modified from widevine_keys script :

    Code:
    	responses.append(requests.post(url=lic_url, headers=headers.headers, params=params, 
    			json = {"jsonrpc":"2.0",
    "id":1,
    "method":"getWidevineLicense",
    "params":{
        "userAgentData":{
    	"deviceType":"phone",
    	"application":"chrome",
    	"os":"android",
    	"build":2170000,
    	"portal":"pg",
    	"player":"html",
    	"widevine":True
    	},
    	"cpid":1,
    	"mediaId":"858a96499d699648cfe6b0b4ad606c0d",
    	"sourceId":"0b6d9b2afe11f17e326c2912725ebda4",
    	"keyId":"63dca055-b5cb-fa00-091d-000001923d09",
    	"object":str(request, "utf-8" ),
    	"deviceId":{
    		"type":"other",
    		"value":"207d161ae9a6e822ceaed18c2a9d6222_"},
    		"ua":"pg_phone_android_chrome_html/2170000",
    		"authData":{
    			"sessionToken":"7ba7b1ea-e958-479b-b212-dfa6d1778096|1674370513|drm|getWidevineLicense|kOYgfVwBtKweA9OLJ0AmfdRPBVUtDTAp6kk2Bv_aLgQ="},
    			"clientId":"d5efb74e-37dc-4378-90cb-a9582c14fc3d"}
    			}))
    I've modify the request to make it match with the JSON parameter used on the DRM system, got 200 and got what I believe should contain the key, except it's formatted in JSON and don't happen to support specconform=true like DRMToday license page

    Code:
    {"id":1,"jsonrpc":"2.0","result":{"accessPolicy":{"id":"246"},"id":"930060907","object":{"client_capabilities":{"analog_output_capabilities":"ANALOG_OUTPUT_UNKNOWN","anti_rollback_usage_table":true,"can_update_srm":false,"session_token":true,"supported_key_type":["CERTIFICATE_KEY_TYPE_UNSPECIFIED"]},"client_info":[{"name":"company_name","value":"unknown"},{"name":"model_name","value":"Generic Android-x86_64"},{"name":"architecture_name","value":"x86_64"},{"name":"device_name","value":"x86_64"},{"name":"product_name","value":"android_x86_64"},{"name":"build_info","value":"Must use __system_property_read_callback() to read"},{"name":"widevine_cdm_version","value":"14.0.0"},{"name":"oem_crypto_security_patch_level","value":"0"}],"client_max_hdcp_version":"HDCP_NONE","content_owner":"cyfrowypolsat","content_provider":"cyfrowypolsat","device_state":"RELEASED","device_whitelist_state":"DEVICE_NOT_WHITELISTED","drm_cert_serial_number":"ZDk3ZDU0ZDU5YjUzMGY4MzQxNmE0YTg5ZDM0NjA5NjM=","internal_status":0,"license":"CAIS6QIKWAogNjJENkY0OEZCRTc0RkQyNzAxMDAwMDAwMDAwMDAwMDASIDYyRDZGNDhGQkU3NEZEMjcwMTAwMDAwMDAwMDAwMDAwGgAgASgAOICjBUCAowVIiMqOngYSEAgBEAEggKMFKICjBTCAowUaZhIQPKpyIeVHKdQB4fqZ69GkmhpQu4drmB1D8ZnGHlcP/B8a3A+tvlz1+AGkHmfoMTqoiZlwks9aQos0q19/OkEIi961YsSO5g8iZ5CBcl7zXM45mJhWKTg8lAdmfDbcni1BJNggARqKAQoQY9ygVbXL+gAJHQAAAZI9CRIQxrtftMRqdKjf7NQoFnbthhog80lxXMWgtKXuV6FC7I06n0agWGR+o4lDS95U8L04CmUgAigBMgQIABAqQjQKIPQJLGjchPrzQUh3EJj+lTUJUELtxpWSMbD6+8v5CQnREhAGr3gfDyy6tUTJpgXoDakyYgJTRCCIyo6eBjgAGiD6KE4dZL5ksR/rYxW3o5CfVIRiNRa2M2fd3uZltarkvCKAAmf5OeF9LO54JBNwHONrrvtWlkk4PBh6VCU4gh2Zil7jaDySPxEe6sgIyptB3M+OQBbma6wIEtt2vffZAzllcBc7IkgmyCoixequg2cfTdNWtgYEQ7Lf2rc3rZNmPN0Pxx6Emip/hamIWCKBhVYokav3hU2K/vfmRpv6y/pQCaDcj8JK7rutWKi4KDldTLESsnZKrkIr1On+szwBFef6aeyXeguS778oU7GY5diinBQossdV1OxnqUrs/uIE84xBjAl16oNWyecII1tWHa1tovMxE8UlMcVFPH6Y1fL8iwNUbo0dRH/w8FckeIWsWTB3zbfV40qGB0n9TI5khABOVcA6MgowMTcuMy4wIEJ1aWx0IG9uIE5vdiAxIDIwMjIgMTU6MTI6MzQgKDE2NjczNDA3MjUpQAFYAA==","license_metadata":{"content_id":"MTo4NThhOTY0OTlkNjk5NjQ4Y2ZlNmIwYjRhZDYwNmMwZA==","license_type":"STREAMING","request_type":"NEW"},"make":"Generic Field Provisioning","message_type":"LICENSE","model":"Android KLP x86","oem_crypto_api_version":13,"platform":"android","platform_verification_status":"PLATFORM_NO_VERIFICATION","pssh_data":{"content_id":"MdwNAAAAAAA=","key_id":["Y9ygVbXL+gAJHQAAAZI9CQ=="]},"resource_rating_tier":0,"security_level":3,"service_version_info":{"license_sdk_version":"17.3.0 Built on Nov 1 2022 15:12:34 (1667340725)","license_service_version":"widevine.license-server_20221020.07_p3"},"session_state":{"keybox_system_id":4464,"license_counter":0,"license_id":{"original_playback_duration_seconds":86400,"original_rental_duration_seconds":86400,"original_start_time_seconds":1673766152,"purchase_id":"","request_id":"NjJENkY0OEZCRTc0RkQyNzAxMDAwMDAwMDAwMDAwMDA=","session_id":"NjJENkY0OEZCRTc0RkQyNzAxMDAwMDAwMDAwMDAwMDA=","type":"STREAMING","version":0},"signing_key":"lEqEPOmE5XKeXOzv8pvTTCEtcxyTj3oYe8YxdATnXbf0r6DI+91+B9pQtOJoopjGktCKWO1c+V41JOui5A3tdw=="},"soc":"widevine L3_Haystack","status":"OK","status_message":"","supported_tracks":[{"key_id":"Y9ygVbXL+gAJHQAAAZI9CQ==","type":"SD"}],"system_id":4464},"reporting":{"redevents":{"sellModel":"AVOD"}},"validFrom":"2023-01-14T15:57:14Z","validTo":"2023-01-15T15:57:14Z"}}
    Error :

    Code:
    Traceback (most recent call last):
      File "l3polsat.py", line 142, in <module>
        correct, keys = WV_Function(pssh, lic_url)
      File "l3polsat.py", line 137, in WV_Function
        wvdecrypt.update_license(license_b64)
    UnboundLocalError: local variable 'license_b64' referenced before assignment
    Thank you in advance!
    Quote Quote  
  7. Member
    Join Date
    Feb 2022
    Location
    Europe
    Search PM
    you probably want to add global license_b64 at the top of that function, as your error is a python one, not (yet) related to getting the keys or anything.
    Quote Quote  
  8. Originally Posted by gnodde View Post
    you probably want to add global license_b64 at the top of that function, as your error is a python one, not (yet) related to getting the keys or anything.
    Thank you...

    I've added just before the license request code and now it give me this :

    Code:
    Traceback (most recent call last):
      File "l3polsat.py", line 142, in <module>
        correct, keys = WV_Function(pssh, lic_url)
      File "l3polsat.py", line 137, in WV_Function
        wvdecrypt.update_license(license_b64)
      File "wvdecryptcustom.py", line 58, in update_license
        self.cdm.provide_license(self.session, license_b64)
      File "cdm\cdm.py", line 285, in provide_license
        session.session_key = oaep_cipher.decrypt(license.SessionKey)
      File "\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.
    Quote Quote  
  9. Member
    Join Date
    Feb 2022
    Location
    Europe
    Search PM
    Now you have something wrong with the request for the lic, so this is where the troubleshooting starts
    i'm on mobile so kinda hard to read or try stuff, but in that json response you have the Lic I think in the CAIS line, maybe you need to introduce an extra step and json.load this json blob, extract the license part, and just send that to the lic server? just guessing here but that is probably something I would try.
    Quote Quote  
  10. Originally Posted by gnodde View Post
    Now you have something wrong with the request for the lic, so this is where the troubleshooting starts
    i'm on mobile so kinda hard to read or try stuff, but in that json response you have the Lic I think in the CAIS line, maybe you need to introduce an extra step and json.load this json blob, extract the license part, and just send that to the lic server? just guessing here but that is probably something I would try.
    I've tried to copy the license value and put it as license_b64 fixed value, it didn't work with error Padding is incorrect
    Quote Quote  



Similar Threads

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