Use Cdm.get_keys in license CLI command

This commit is contained in:
rlaphoenix 2022-08-06 09:44:53 +01:00
parent f36977ef19
commit 1d606a9e54
1 changed files with 1 additions and 3 deletions

View File

@ -117,9 +117,7 @@ def license_(device: Path, pssh: str, server: str, type_: str, privacy: bool):
log.info("[+] License Parsed Successfully") log.info("[+] License Parsed Successfully")
# print keys # print keys
# Note: This showcases how insecure a Python CDM implementation is for key in cdm.get_keys(session_id):
# The keys should not be given to the user, but we cannot prevent this
for key in cdm._sessions[session_id].keys:
log.info(f"[{key.type}] {key.kid.hex}:{key.key.hex()}") log.info(f"[{key.type}] {key.kid.hex}:{key.key.hex()}")
# close session, disposes of session data # close session, disposes of session data