From 1d606a9e542011c610331276d3be87631724c08f Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sat, 6 Aug 2022 09:44:53 +0100 Subject: [PATCH] Use Cdm.get_keys in license CLI command --- pywidevine/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pywidevine/main.py b/pywidevine/main.py index 614d673..047c95c 100644 --- a/pywidevine/main.py +++ b/pywidevine/main.py @@ -117,9 +117,7 @@ def license_(device: Path, pssh: str, server: str, type_: str, privacy: bool): log.info("[+] License Parsed Successfully") # print keys - # Note: This showcases how insecure a Python CDM implementation is - # The keys should not be given to the user, but we cannot prevent this - for key in cdm._sessions[session_id].keys: + for key in cdm.get_keys(session_id): log.info(f"[{key.type}] {key.kid.hex}:{key.key.hex()}") # close session, disposes of session data