apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.55k stars 1.52k forks source link

Failed to decrypt ADE pdf. #1513

Open tegaidogun opened 3 years ago

tegaidogun commented 3 years ago

calibre Debug log calibre 5.10.1 embedded-python: True is64bit: False Windows-8.1-6.3.9600 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '8.1', '6.3.9600') Python 3.8.5 Windows: ('8.1', '6.3.9600', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (7, 0, 3) && Obok DeDRM (6, 7, 0) calibre 5.10.1 embedded-python: True is64bit: False Windows-8.1-6.3.9600 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '8.1', '6.3.9600') Python 3.8.5 Windows: ('8.1', '6.3.9600', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (7, 0, 3) && Obok DeDRM (6, 7, 0) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 100.86162790697674 x 100.55257731958763 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.58] splash screen shown [0.58] Initializing db... [0.58] db initialized [0.58] Constructing main UI... [1.41] main UI initialized... [1.41] Hiding splash screen Starting QuickView DeDRM v7.0.3: Trying to decrypt RS 1060 - ebook (Ideas that Changed the World).pdf DeDRM v7.0.3: RS 1060 - ebook (Ideas that Changed the World).pdf is a PDF ebook DeDRM v7.0.3: Looking for new default Adobe Digital Editions Keys after 0.1 seconds Found 1 keys DeDRM v7.0.3: Trying a new default key DeDRM v7.0.3: Exception when decrypting after 0.3 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 484, in PDFDecrypt File "calibre_plugins.dedrm.ineptpdf", line 2179, in decryptBook File "calibre_plugins.dedrm.ineptpdf", line 1985, in init File "calibre_plugins.dedrm.ineptpdf", line 1469, in initialize File "calibre_plugins.dedrm.ineptpdf", line 1599, in initialize_ebx File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt File "Crypto\Cipher\PKCS1_v1_5.py", line 165, in decrypt ValueError: Ciphertext with incorrect length. DeDRM v7.0.3: Failed to decrypt with new default key after 0.3 seconds DeDRM v7.0.3: Ultimately failed to decrypt after 0.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md [23.19] splash screen hidden [23.19] Started up in 23.19 seconds with 1 books stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'Qe\xe4\xe5\n\xc8\xa3f\xd1\xd2\xc7\xe5]\x98\xeb\xd06\xden\xe0\xd3:7YD\x8c\x97\xe8\xb9\x1dB#', b'C:\Users\IDOGWU\Documents\My Digital Editions\RS 1060 - ebook (Ideas that Changed the World).pdf'] Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre\customize\ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 637, in run File "calibre_plugins.dedrm.init", line 512, in PDFDecrypt calibre_plugins.dedrm.DeDRMError: DeDRM v7.0.3: Ultimately failed to decrypt after 0.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Traceback (most recent call last): File "calibre\customize\ui.py", line 428, in get_file_type_metadata File "calibre\customize\builtins.py", line 347, in get_metadata File "calibre\ebooks\metadata\pdf.py", line 126, in get_metadata ValueError: Could not read info dict from PDF Syntax Error: Couldn't find the 'EBX_HANDLER' security handler

pdfinfo errored out with return code: 1 Exception ignored in: <function NativeFunction.del at 0x056DA6A0> Traceback (most recent call last): File "calibre_plugins.dedrm.adobekey", line 266, in del TypeError: 'NoneType' object is not callable Exception ignored in: <function NativeFunction.del at 0x056DA6A0> Traceback (most recent call last): File "calibre_plugins.dedrm.adobekey", line 266, in del TypeError: 'NoneType' object Traceback (most recent call last): File "calibre\gui2\ui.py", line 134, in init File "calibre\gui2\ui.py", line 152, in init_iaction File "calibre\customize__init.py", line 616, in load_actual_plugin File "importlib\init__.py", line 127, in import_module File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre\customize\zipplugin.py", line 192, in exec_module File "calibre_plugins.obok_dedrm.action", line 24, in File "calibre\customize\zipplugin.py", line 192, in exec_module File "calibre_plugins.obok_dedrm.dialogs", line 30, in File "calibre\customize\zipplugin.py", line 192, in exec_module File "calibre_plugins.obok_dedrm.utilities", line 10, in ModuleNotFoundError: No module named 'StringIO' Added RS 1060 to db in: 2.3 Added 1 books in 5.1 seconds

ElleKayEm commented 3 years ago

Try with calibre 4.23 and DeDRM 6.8.1.

ableeker commented 3 years ago

I haven't seen this error before. According to the traceback it fails to decrypt the RSA encrypted book key, but it shouldn't fail this way, because the key has been put there by Adobe. Could this PDF be damaged?