FoxRefire / wvg

Chrome/Firefox extension for pen-testing to retrieve encryption keys of Widevine protected content !DON'T DECRYPT CONTENT UNLESS YOU HAVE THE RIGHT TO DO IT!
GNU Affero General Public License v3.0
317 stars 69 forks source link

check can you fix modules. so that it works with getting keys #55

Closed alienmaster9 closed 2 months ago

alienmaster9 commented 2 months ago

license response { "heartBeat": "300", "sessionToken": "tez51n8baTeBRpwmlHv4miY8Pu1QhC/R3CAybUe3bvUuqGdpaIdMdTSSpzFJTy875e3uarWBoMh4vyun7GXYXsf7qoBRD7MwP8xCIJY79d6p5YBT9K9XZNqa4XpPB+o0ut2t3+Q+k/ca4zBTMQ83UMarZR0oW6qy7Ww86/5ZdA+1Rq7+5NndqUWu7RfI/iPm/nSCBVtydUB9dXN5SeqQ2qhX71mpiVVwJkwwc84PmtK7/bdPDpAw1mRZPop3K4zrKar1NvI04jzHHvOuoNwqeVBJNiuQw98AAfT11zYRAUo3s0tvwrsW+H4677Ay4ikQm8KDWl1WhGeTew6XqRH/WV9BJ7upJ5zEmuwWiCLuh09KstjRlrxh+7ie5CVbZGukRajUhEyPZkkjubHDv9vKn7F1QZHLvdEXgpjrUeq7SFReexHWG7c3YahgWHWjAtQGKBbKC5qhpAmqemf36+845VHJl5gR+DYAeBve4Ccl5da/7z4bH/O1uxQ9Bj9yJTJi8CA/lDsuabSivWdH41GZjPRg3fwql5K9q5RH9PQGLWv0unQEIkVqZivLcTo5CKu/ZHPzeXCihYBlbXRYaXo200v8dkQfmnGTB8fex2PicvF179hYQHA8ZQMV78i7CD0jdGadxtV1KHYK1l+cBApcCrMdKsui8saQKhknQ4ZVzEXafhFX59Bl0LlAThcD4fp/POSCME9bg4Y=", "license": "CAISgQIKNAoQzj87nQ3k/xkTV8bWMS51vhIQzj87nQ3k/xkTV8bWMS51vhoAIAEoADgAQABIvffstgYSEQgBEAAYASCkAzCkAzh4SKwCGlYSECivwGVUKQvKFdg1RCwrBsIaQBRcdJZi6XOWwWaDT3rq7g57YL48XZN1wjl8cDtqvlJbXST3hbDZIKkeYh8+4tF2etwsNqlJ5G5oN5OJiemzE84gARpUChClEJ+j+2lK/oY55Ogx/qL2EhCO3OFjQWQ5qyK/yfGdIfCCGhC+OzFMUyojQTw6mr+DvxxvIAIoATICCAFCEgoQa2MxNgAAAaRlO8X2wAACDGIAIL337LYGOABQBRogJaTFYeBWykQKG6U4cTxS1Gl7ilR9yPNWRmW0cNNA3TMigAHQVK5bLOcVq5+PdQJQ3Mq+E91b3yr5fhR/CsBF0uBJdCDBWE2TpFpXETdPqoQwb6OOaoO9ldOZyamowgHn9VZBU8S58mSc+N1QAs2fe4phIj+Bbw3xm79RRU1tjqkbIJQMbU4pRmyCMdMmhBYoneEwxpzzN1lbMr0uSNm/H43bHTozCjExOS4wLjYgQnVpbHQgb24gQXVnIDEyIDIwMjQgMTY6Mzc6MzIgKDE3MjM1MDU4NTIpQAFKsAEAAAACAAAAsAAFABBlO8X2Sb8bBgAAAE0AAAAQAAAAXwAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAaQAAAAAAAAAAAAAAAAAAAGkAAAAAQAAAKUAAAAQAAAAtwAAABAAAADJAAAAEAAAAAAAAAAAAAAA5QAAABCoLWDjrdYf/qpay1hEV5enYxZ9g5VV8wdnSbQLPa98CVgB" }

license request

fetch("https://apigw.cz.vtv.vodafone.com/vtv/ccursession/v1/start", { "headers": { "accept": "*/*", "accept-language": "en-US,en;q=0.9,km;q=0.8", "cache-control": "no-cache", "content-type": "application/json", "pragma": "no-cache", "priority": "u=1, i", "sec-ch-ua": "\"Chromium\";v=\"128\", \"Not;A=Brand\";v=\"24\", \"Google Chrome\";v=\"128\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"Windows\"", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "cross-site", "vtv-authorization": "HMAC-SHA256:05ef00f0408b08c3a0795546ae9d1de90e148d6b1e3516fec6b9bfb9d2692890", "vtv-id": "29968fd9-47ff-4797-bf04-9aed221d4597" }, "referrer": "https://tv.vodafone.cz/", "referrerPolicy": "strict-origin-when-cross-origin", "body": "{\"requests\":[{\"action\":\"checkEntitlement\",\"params\":{},\"body\":{\"assetId\":\"174471574\",\"assetType\":\"epg\",\"contextDataParams\":{\"objectType\":\"KalturaPlaybackContextOptions\",\"assetFileIds\":\"109107195\",\"context\":\"CATCHUP\",\"urlType\":\"DIRECT\",\"adapterData\":{\"manifestStartTime\":{\"objectType\":\"KalturaStringValue\",\"value\":\"2024-09-06T17:00:00Z\"},\"manifestEndTime\":{\"objectType\":\"KalturaStringValue\",\"value\":\"2024-09-06T17:56:00Z\"}}},\"apiVersion\":\"5.3.2\",\"ks\":\"djJ8MzA2MnxkcqD_m05S3zmj-A2kOAq3aL8w3rMBZ5CJm0uyK6TaqJ90KA52A72CkoCSMlJIUl3o3aJTdKF0_m1mA0fMMPMwTi115n-EUbQpGFAGSkg1pUvqSvgCE0KXTbzJWH8Kkk34-YTkL3tdHNNXAojtSgNtRO-854rJfaqvj89PmuRAMtuJIh3LpqsmO4nAJi3KkXffH7eBsc_ye-ehKGlkDQUKc5fesWaB97TltZFHsVVF3t3ss4aCS-W2nAhzmv_u5Mng0A-vWCUqb5RbECuoi-h-BlWYa9fjGeRvAXlHb_v6QkQPFQGCXVOW57iRczIvytZP4m5nWiUpI5jobbx-cAMSKXDeOnhHilNFq3i5nyQ6izI_-JcWaYKR5HZ2dE0erggy30BA9CzSUYuiJ5DzFWO8ZJYZmwPIsWpYA9wgqy7_L4XIL5iOLbtqGYgK6YD2BuTJYJF75tvQe4cBArkebRa9mgH6jbjNBVMaUEkhKSNJNGXIBFbV40o3WX2hvECtCj4A3YugmRXD_1mO6rcFo9xipK2_lliPBCWPVtB0aXRU5N9n1bQFg1xiGPbY0Nc3rzUA_IRj7bM22eXotkqnedFm_vDzaq3lE7tByV9aRBeimvSGNnTnseMayMHrBw2b0voBujarXmeKDY5w5OoRPT48lx6W0lsu_jWVpkxfODOosqHT8r42Lu-78_IFvTedOTtozavKewXkaDO_50pIrsRMqNgFBMsvm3wGU0u2eGMHgg==\"}},{\"action\":\"bookmark\",\"params\":{},\"body\":{\"bookmark\":{\"objectType\":\"KalturaBookmark\",\"id\":\"729140\",\"type\":\"media\",\"programId\":174471574,\"position\":1704,\"playerData\":{\"objectType\":\"KalturaBookmarkPlayerData\",\"fileId\":109107195,\"action\":\"PLAY\"}},\"apiVersion\":\"5.3.2\",\"ks\":\"djJ8MzA2MnxkcqD_m05S3zmj-A2kOAq3aL8w3rMBZ5CJm0uyK6TaqJ90KA52A72CkoCSMlJIUl3o3aJTdKF0_m1mA0fMMPMwTi115n-EUbQpGFAGSkg1pUvqSvgCE0KXTbzJWH8Kkk34-YTkL3tdHNNXAojtSgNtRO-854rJfaqvj89PmuRAMtuJIh3LpqsmO4nAJi3KkXffH7eBsc_ye-ehKGlkDQUKc5fesWaB97TltZFHsVVF3t3ss4aCS-W2nAhzmv_u5Mng0A-vWCUqb5RbECuoi-h-BlWYa9fjGeRvAXlHb_v6QkQPFQGCXVOW57iRczIvytZP4m5nWiUpI5jobbx-cAMSKXDeOnhHilNFq3i5nyQ6izI_-JcWaYKR5HZ2dE0erggy30BA9CzSUYuiJ5DzFWO8ZJYZmwPIsWpYA9wgqy7_L4XIL5iOLbtqGYgK6YD2BuTJYJF75tvQe4cBArkebRa9mgH6jbjNBVMaUEkhKSNJNGXIBFbV40o3WX2hvECtCj4A3YugmRXD_1mO6rcFo9xipK2_lliPBCWPVtB0aXRU5N9n1bQFg1xiGPbY0Nc3rzUA_IRj7bM22eXotkqnedFm_vDzaq3lE7tByV9aRBeimvSGNnTnseMayMHrBw2b0voBujarXmeKDY5w5OoRPT48lx6W0lsu_jWVpkxfODOosqHT8r42Lu-78_IFvTedOTtozavKewXkaDO_50pIrsRMqNgFBMsvm3wGU0u2eGMHgg==\"}},{\"action\":\"session\",\"params\":{},\"body\":{}},{\"action\":\"license\",\"params\":{\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SGNnTnseMayMHrBw2b0voBujarXmeKDY5w5OoRPT48lx6W0lsu_jWVpkxfODOosqHT8r42Lu-78_IFvTedOTtozavKewXkaDO_50pIrsRMqNgFBMsvm3wGU0u2eGMHgg==\"}", "method": "POST", "mode": "cors", "credentials": "omit" });

module i made

`import base64 from urllib.parse import parse_qsl, urlencode import json

Regular expression pattern to identify the DRM license URL

REGEX = r"https://apigw\.cz\.vtv\.vodafone\.com/vtv/ccursession/v1/start.*"

Function to extract the challenge from the license request body

def get_challenge(body: str) -> bytes | str:

Parsing the JSON body to extract the challenge

body_json = json.loads(body)
for request in body_json.get("requests", []):
    if request.get("action") == "license":
        return request["params"]["challenge"]
raise ValueError("Challenge not found in the request body")

GET_CHALLENGE = get_challenge

Function to set the challenge back into the license request body

def set_challenge( body: str, challenge: bytes ) -> str:

Parsing the JSON body and updating the challenge

body_json = json.loads(body)
for request in body_json.get("requests", []):
    if request.get("action") == "license":
        request["params"]["challenge"] = base64.b64encode(challenge).decode()
        break
else:
    raise ValueError("License request not found to set challenge")

# Returning the updated body as a JSON string
return json.dumps(body_json)

SET_CHALLENGE = set_challenge `

FoxRefire commented 2 months ago

Send PR if you made improvement