From e9e65e5760203d2e93da16319c3f3b7a1d73bf15 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 20 Jul 2022 21:11:01 +0100 Subject: [PATCH] Update license cmd to move license type from Cdm to get_license_challenge() --- pywidevine/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pywidevine/main.py b/pywidevine/main.py index 1af155c..60efd00 100644 --- a/pywidevine/main.py +++ b/pywidevine/main.py @@ -60,15 +60,13 @@ def license_(device: Path, pssh: str, server: str, type_: str, raw: bool, privac """ log = logging.getLogger("license") - type_ = LicenseType.Value(type_) - # load device device = Device.load(device) log.info(f"[+] Loaded Device ({device.system_id} L{device.security_level})") log.debug(device) # load cdm - cdm = Cdm(device, pssh, type_, raw) + cdm = Cdm(device, pssh, raw) log.info(f"[+] Loaded CDM with PSSH: {pssh}") log.debug(cdm) @@ -87,7 +85,8 @@ def license_(device: Path, pssh: str, server: str, type_: str, raw: bool, privac log.debug(service_cert) # get license challenge - challenge = cdm.get_license_challenge(privacy_mode=True) + license_type = LicenseType.Value(type_) + challenge = cdm.get_license_challenge(license_type, privacy_mode=True) log.info("[+] Created License Request Message (Challenge)") log.debug(challenge)