diff --git a/README.md b/README.md index d09dc2e..83cc9eb 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,11 @@ pyplayready test DEVICE.prd > [!IMPORTANT] > There currently isn't a proper method of extracting Group Certificates/Keys. They can be found inside older Samsung phones/Smart TVs, Windows DLLs and set-top-boxes in encrypted form. +Export a provisioned device to its raw .dat files +```shell +pyplayready export-device DEVICE.prd +``` + ## Usage An example code snippet: diff --git a/pyplayready/cdm.py b/pyplayready/cdm.py index 9c84418..cd034fc 100644 --- a/pyplayready/cdm.py +++ b/pyplayready/cdm.py @@ -252,6 +252,9 @@ class Cdm: if not session: raise InvalidSession(f"Session identifier {session_id!r} is invalid.") + if not session.encryption_key or not session.signing_key: + raise InvalidSession("Cannot parse a license message without first making a license request") + try: root = ET.fromstring(licence) license_elements = root.findall(".//{http://schemas.microsoft.com/DRM/2007/03/protocols}License")