From b59551c708f6137f822c08da4bd9e433dd7b804c Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:17:28 +0200 Subject: [PATCH] Clean import --- extractor/cdm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extractor/cdm.py b/extractor/cdm.py index 88f32b6..83ffdde 100644 --- a/extractor/cdm.py +++ b/extractor/cdm.py @@ -7,7 +7,7 @@ from pathlib import Path import frida import xmltodict from _frida import Process -from frida.core import Device, Session, Script, RPCException +from frida.core import Device, Session, Script from Cryptodome.PublicKey import RSA from extractor.license_protocol_pb2 import SignedMessage, LicenseRequest, ClientIdentification, DrmCertificate, SignedDrmCertificate @@ -89,7 +89,9 @@ class Cdm: name = func['@NAME'] # Add symbol if it matches specific criteria - if any(keyword in name for keyword in ['UsePrivacyMode', 'PrepareKeyRequest']) or name == target or (not target and re.match(r'^[a-z]+$', name)): + if any(keyword in name for keyword in + ['UsePrivacyMode', 'PrepareKeyRequest']) or name == target or ( + not target and re.match(r'^[a-z]+$', name)): addr = hex(int(func['@ADDRESS'], 16) - base_addr) symbols[addr] = {'name': name, 'address': addr} except Exception: