Skip to content

Plugin not decrypting PDF with "hardened" DRM (ADE 3.0) #183

@vectoriser

Description

@vectoriser

First of all I would like to say a Big Thank You! to noDRM and a980e066a01 for enabling the decryption of DRM for ADE 3.0.

I have successfully used this plugin with Calibre Portable Edition 5.44.0. to decrypt PDFs with "hardened" DRM (ADE 3.0).

However today I came across a PDF from the same source which fails to decrypt the PDF when added to Calibre.

Question / bug report
Plugin not decrypting PDF with "hardened" DRM (ADE 3.0)

Which version of Calibre are you running?
Calibre Portable v5.44 (also tried 64-bit Calibre v5.44)

Which version of the DeDRM plugin are you running?
v10.0.3

If applicable, which version of the Kindle software are you running?
Not applicable

Log output

C:\Users\redacted my name\Calibre_5.44.0-Portable\Calibre>calibre-debug -g
calibre 5.44 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 (10, 0, 3)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 100.86162790697674 x 101.07357512953367
Using calibre Qt style: True
[0.00] Starting up...
[0.01] Showing splash screen...
[0.70] splash screen shown
[0.70] Initializing db...
[0.72] db initialized
[0.72] Constructing main UI...
[1.86] main UI initialized...
[1.86] Hiding splash screen
Starting QuickView
[2.09] splash screen hidden
[2.11] Started up in 2.11 seconds with 0 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper:
[b'\x84)W\x0fz\x89\xb4\xf0\xe6:b\xf5\x13\xc4\x94\x02\xa3Q&\x1e+\xca\xed\xcf\xaf\x9b\xdf\x19\x1f\xd1Q\x8e',
b'C:\Users\redacted my name\Documents\My Digital Editions\redacted book name.pdf']
DeDRM v10.0.3: Trying to decrypt redacted book name.pdf
DeDRM v10.0.3: redacted book name.pdf is a PDF ebook with encryption EBX_HANDLER
DeDRM v10.0.3: redacted book name.pdf is a PDF ebook (EBX) for UUID 4a04e8d7-74a4-4549-9306-0b51588908df
DeDRM v10.0.3: Looking for new default Adobe Digital Editions Keys after 2.3 seconds
Found 1 keys
DeDRM v10.0.3: Trying a new default key
ineptpdf.py: Unknown bytes element found - guessing.
If this PDF is corrupted and/or doesn't work, please open a bug report.
Note: The above 2 line repeated 60 times...

Incomplete dictionary construct
error writing pdf: Object type <class 'str'> cannot be passed to C code
Traceback (most recent call last):
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 2299, in decryptBook
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 2109, in dump
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 1840, in getobj
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 800, in decipher_all
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 800, in
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 796, in
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 795, in decipher_all
File "C:\Users\redacted my name\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptpdf.py", line 1758, in decrypt_rc4
File "Crypto\Cipher\ARC4.py", line 106, in decrypt
File "Crypto\Cipher\ARC4.py", line 89, in encrypt
File "Crypto\Util_raw_api.py", line 243, in c_uint8_ptr
TypeError: Object type <class 'str'> cannot be passed to C code
DeDRM v10.0.3: Failed to decrypt with new default key after 3.7 seconds
DeDRM v10.0.3: Finished after 3.7 seconds
Added redacted book name to db in: 1.6
Added 1 books in 6.4 seconds

I would be really grateful if anyone has an idea about what the issue might be.

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions