diff options
author | NoDRM <[email protected]> | 2023-01-06 14:29:56 +0100 |
---|---|---|
committer | NoDRM <[email protected]> | 2023-01-06 14:29:56 +0100 |
commit | 3c12806f38eecfd5b37a5ace890f7c00cbe52169 (patch) | |
tree | e7255730ff38da1b539898817130df8a6e063cbd | |
parent | 3151dbbd98cf90215b36951ea33a0ae4df4054b7 (diff) |
Fix issue with remaining data in encryption.xml
-rw-r--r-- | DeDRM_plugin/ineptepub.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/DeDRM_plugin/ineptepub.py b/DeDRM_plugin/ineptepub.py index 8d112e4..d403dac 100644 --- a/DeDRM_plugin/ineptepub.py +++ b/DeDRM_plugin/ineptepub.py @@ -89,7 +89,7 @@ class Decryptor(object): def __init__(self, bookkey, encryption): enc = lambda tag: '{%s}%s' % (NSMAP['enc'], tag) self._aes = AES.new(bookkey, AES.MODE_CBC, b'\x00'*16) - encryption = etree.fromstring(encryption) + self._encryption = etree.fromstring(encryption) self._encrypted = encrypted = set() self._otherData = otherData = set() @@ -97,7 +97,7 @@ class Decryptor(object): self._has_remaining_xml = False expr = './%s/%s/%s' % (enc('EncryptedData'), enc('CipherData'), enc('CipherReference')) - for elem in encryption.findall(expr): + for elem in self._encryption.findall(expr): path = elem.get('URI', None) encryption_type_url = (elem.getparent().getparent().find("./%s" % (enc('EncryptionMethod'))).get('Algorithm', None)) if path is not None: |