VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. I'm trying to make a downloader to rip from DirecTV Stream. However, with my best efforts, I'm getting a error saying {"errorReason":"10062","description":"Mismatch in request information - Device","message":"DRM DeviceID Mismatch"}

    What I don't understand is that the request headers match up to the device which Ive extracted the CDM from, which is Android on a emulator, I proxied the request from the emulator.

    It seems to use a cert, and I added that to the mix, but it required headers for the cert.

    Heres the request for the DRM license

    Code:
    headers = {
        "accept": "application/json",
        # 'accept-encoding': 'gzip, deflate, br, zstd',
        "accept-language": "en-US,en;q=0.9",
        "authorization": "<redacted>",
        "connection": "keep-alive",
        "content-type": "application/json",
        "flow_context": "activate_1730052493.396",
        "host": "api.cld.dtvce.com",
        "origin": "https://stream.directv.com",
        "referer": "https://stream.directv.com/",
        "sec-ch-ua": '"Chromium";v="130", "Microsoft Edge";v="130", "Not?A_Brand";v="99"',
        "sec-ch-ua-mobile": "?1",
        "sec-ch-ua-platform": '"Android"',
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "cross-site",
        "user-agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36 EdgA/130.0.0.0",
    }
    
    json_data = {
        "contentID": "4734",
        "contentType": "2",
        "identityCookie": "<redacted>",
        "authorizationToken": "<redacted>",
        "licenseChallenge": "<redacted>",
    }
    Here's the header for the cert

    Code:
    headers = {
        "accept": "*/*",
        # 'accept-encoding': 'gzip, deflate, br, zstd',
        "accept-language": "en-US,en;q=0.9",
        "connection": "keep-alive",
        "host": "stream.directv.com",
        "referer": "https://stream.directv.com/watchnow",
        "sec-ch-ua": '"Chromium";v="130", "Microsoft Edge";v="130", "Not?A_Brand";v="99"',
        "sec-ch-ua-mobile": "?1",
        "sec-ch-ua-platform": '"Android"',
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "same-origin",
        "user-agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36 EdgA/130.0.0.0",
    }
    Here's the code I wrote

    Code:
    def decrypt_content():
        license_url = "https://api.cld.dtvce.com/rights/management/mdrm/vgemultidrm/v1/widevine/license"
    
        # prepare pssh
        pssh = PSSH(
            "AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEBWvzdlJ4r7/P7MZ4yxCMV1I88aJmwY="
        )
    
        # load device
        device = Device.load(extracted_device)
    
        # load CDM from device
        cdm = Cdm.from_device(device)
    
        # open CDM session
        session_id = cdm.open()
    
        cert = requests.get(
            url="https://stream.directv.com/att.tv/wv/cert_license_widevine_com.bin",
            cookies=DRMHeader2.cookies,
            headers=DRMHeader2.headers,
        )
    
        print(cert.content)
    
        cert = cert.content
    
        cdm.set_service_certificate(
            certificate=cert,
            session_id=session_id,
        )
    
        # Generate the challenge
        challenge = cdm.get_license_challenge(session_id, pssh)
    
        DRMHeader.json_data["licenseChallenge"] = base64.b64encode(challenge).decode(
            "utf-8"
        )
    
        print(DRMHeader.json_data["licenseChallenge"])
    
        # send license challenge
        license = requests.post(
            url=license_url,
            headers=DRMHeader.headers,
            json=DRMHeader.json_data,
        )
    
        print(license.content)
    
        license = base64.b64decode(license.json()["licenseData"][0])
    
        print(license)
    
        # Replace invalid characters
        license = license.json()["license"].replace("-", "+").replace("_", "/")
    
        # Parse the license
        cdm.parse_license(session_id, license)
    
        # assign variable for returned keys
        returned_keys = ""
        for key in cdm.get_keys(session_id):
            if key.type != "SIGNING":
                returned_keys += f"{key.kid.hex}:{key.key.hex()}\n"
    
        # close session, disposes of session data
        cdm.close(session_id)
    
        # Return the keys
        return returned_keys
    Quote Quote  
  2. Remember, this is a paid service, so this thread is gone as soon as Baldrick discovers it.

    I've had somebody request DirecTV support for WidevineFetch. All I wrote down here was "Widevine Device must be registered" and I remember that they sent some challenge (or similar) to the license server before playback to "register" the device first. This explains the "DRM DeviceID Mismatch" error you're encountering. I think WidevineProxy2 should work for DirecTV
    Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
    Quote Quote  
  3. Thanks, that seems to have done the trick to be able to get the key

    Ive seen threads for paid services here, I didnt mean to break the rules, does it depend on what baldrick is able to find
    Last edited by Larsenv; 4th Apr 2025 at 20:32.
    Quote Quote  
  4. Actually yes, I think he's the only moderator on this forum, so only the threads that he's able to read can be locked
    Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
    Quote Quote  
  5. Member
    Join Date
    Dec 2021
    Location
    england
    Search Comp PM
    never mind
    Last edited by iamghost; 27th Oct 2024 at 16:29.
    Quote Quote  



Similar Threads

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