mirror of
https://git.gay/ready-dl/pyplayready.git
synced 2025-08-06 22:15:51 +00:00
+ Option to downgrade WRMHEADERs to v4.0.0.0
+ Removed CRC32 checksum + Several small fixed
This commit is contained in:
parent
042f8c2204
commit
70e47800df
8 changed files with 225 additions and 21 deletions
|
@ -2,7 +2,6 @@ import logging
|
|||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from zlib import crc32
|
||||
|
||||
import click
|
||||
import requests
|
||||
|
@ -53,7 +52,7 @@ def license_(device_path: Path, pssh: PSSH, server: str) -> None:
|
|||
cdm = Cdm.from_device(device)
|
||||
log.info("Loaded CDM")
|
||||
|
||||
challenge = cdm.get_license_challenge(pssh.wrm_headers[0])
|
||||
challenge = cdm.get_license_challenge(pssh.get_wrm_headers(downgrade_to_v4=True)[0])
|
||||
log.info("Created License Request (Challenge)")
|
||||
log.debug(challenge)
|
||||
|
||||
|
@ -167,7 +166,7 @@ def create_device(
|
|||
out_path = output
|
||||
else:
|
||||
out_dir = output or Path.cwd()
|
||||
out_path = out_dir / f"{device.get_name()}_{crc32(prd_bin).to_bytes(4, 'big').hex()}.prd"
|
||||
out_path = out_dir / f"{device.get_name()}.prd"
|
||||
|
||||
if out_path.exists():
|
||||
log.error(f"A file already exists at the path '{out_path}', cannot overwrite.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue