-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin not decrypting PDF with "hardened" DRM (ADE 3.0) #183
Comments
If it's a larger file, you may have better luck with 64-bit calibre. |
Thank you for your suggestion. Yes, the PDF is quite big at 93.7 MB. Unfortunately, installing 64-bit Calibre (v5.44 for my win 8.1 system) made no difference. BTW, I have decrypted ADE 3.0 PDFs up to 150 MB in size earlier using Calibre Portable. Also, this is the first undecryptable PDF encountered by me in over 10 years for ADE 2.0/3.0. Edit: Question / bug report Which version of Calibre are you running? Which version of the DeDRM plugin are you running? If applicable, which version of the Kindle software are you running? Log output C:\Users\redacted_username>calibre-debug -g Incomplete dictionary construct Incomplete dictionary construct Incomplete dictionary construct |
I suspected it might be more than a memory issue here, but I have seen that solve the issue a number of times so I thought it worth mentioning. |
You seem to be using the most up-to-date, master version of the plugin, not the released 10.0.3. Can you try deleting the plugin, re-download 10.0.3 from the Releases page, try again, and if it still doesn't work post a log from that version? Also, if possible, it would be great if you could send that PDF and the DER key file to the email address in my GitHub profile so I can take a closer look when I have time. |
Thank you. I have deleted the plugin, installed the 10.0.3 release and tried again but without any success. However the resulting log is much smaller than earlier. I have also sent the PDF and the DER key file to your email address. Question / bug reportPlugin not decrypting PDF with "hardened" DRM (ADE 3.0) Which version of Calibre are you running?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 outputC:\Program Files\Calibre2>calibre-debug -g |
Thanks for the PDF. That was a mess to track down. Should be fixed now with the newest commit, you can download that from here: https://github.com/noDRM/DeDRM_tools/suites/8813374946/artifacts/401056236 Note that your PDF file is very large and complex, for me it took over a minute to import it into Calibre. Let me know if this version fixes your issue. |
That was really brilliant! This fixes the problem. Thank you very much for contributing your precious time and effort to solve this issue. Your help is greatly appreciated. |
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.
The text was updated successfully, but these errors were encountered: