Open jimkdrm opened 2 years ago
That's the wrong file. Download DeDRM_tools_10.0.2.zip from the release page: https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.2
Unzip it and load DeDRM_plugin.zip into calibre.
Thank you. The plugin installed just fine but I can't Decrypt KFX encrypted books. I have the jhowell plugin. I'm running Windows 10, Calibre 5.43.0, and Kindle firmware 5.14.3.0.1. The log file is below. I verified the Kindle Serial Number list in DeDRM with those shown in Amazon's Device listing. In fact, I recopied them just to make sure.
calibre Debug log calibre 5.43 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && DeDRM (10, 0, 2) && Package KFX (from KFX Input) (1, 49, 0) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0) calibre 5.43 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && DeDRM (10, 0, 2) && Package KFX (from KFX Input) (1, 49, 0) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 125.0 x 125.0 physicalDpi: 106.38743455497382 x 106.32558139534883 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [0.83] splash screen shown [0.83] Initializing db... [0.92] db initialized [0.92] Constructing main UI... [2.30] main UI initialized... [2.30] Hiding splash screen Starting QuickView [8.33] splash screen hidden [8.33] Started up in 8.33 seconds with 480 books Gather KFX-ZIP (from KFX Input) 1.49.0: Importing //192.168.0.141/Other-Stuff/Books/Kindle/Camelot_ A Novel of King Arthur, Merlin, and the Knights of the Round Table_B099PXZJZ5.kfx Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as F:\WinTemp\calibre_k5spe3c0\x36fs3_3.kfx-zip DeDRM v10.0.2: Trying to decrypt x36fs3_3.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Using Library AlfCrypto DLL/DYLIB/SO Decrypting KFX-ZIP ebook: x36fs3_3 Found 5 keys to try after 0.3 seconds Decrypting KFX DRM voucher: voucher Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key DeDRM v10.0.2: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v10.0.2: Looking for new default Kindle Key after 0.3 seconds searching for kinfoFiles in C:\Users\Jim\AppData\Local Found K4PC 1.9+ kinf2011 file: C:\Users\Jim\AppData\Local\Amazon\Kindle\storage.kinf2011 Decrypted key file using IDString '315971221' and UserName 'Jim' DeDRM v10.0.2: Found 1 new key Decrypting KFX-ZIP ebook: x36fs3_3 Found 1 keys to try after 0.4 seconds Decrypting KFX DRM voucher: voucher Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 795, in KindleMobiDecrypt File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher Exception: Failed to decrypt KFX DRM voucher with any key
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 795, in KindleMobiDecrypt File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher Exception: Failed to decrypt KFX DRM voucher with any key
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 83, in decrypt_voucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 879, in decryptvoucher File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 758, in pkcs7unpad File "C:\Users\Jim\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 98, in _assert Exception: Incorrect padding - Wrong key DeDRM v10.0.2: Ultimately failed to decrypt after 0.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 1.49.0: Packaging F:\WinTemp\calibre_k5spe3c0\x36fs33.kfx-zip Processing container: CR!3HKQ5AF49500DFYBVSBGHK1SZVGF.kfx Processing container: Camelot A Novel of King Arthur, Merlin, and the Knights of the Round Table_B099PXZJZ5.kfx KFX metadata reader (from KFX Input) activated for F:\WinTemp\calibre_k5spe3c0\0egt5mli_addbooks\0\Camelot A Novel of King Arthur, Merlin, and the Knights of the Round Table_B099PXZJZ5.kfx-zip Failed to initialize plugin: 'C:\Users\Jim\AppData\Roaming\calibre\plugins\Ignoble Epub DeDRM.zip' Failed to initialize plugin: 'C:\Users\Jim\AppData\Roaming\calibre\plugins\Inept Epub DeDRM.zip' Failed to initialize plugin: 'C:\Users\Jim\AppData\Roaming\calibre\plugins\K4PC, K4Mac, Kindle Mobi and Topaz DeDRM.zip' Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 795, in KindleMobiDecrypt File "calibre_plugins.dedrm.k4mobidedrm", line 244, in GetDecryptedBook File "calibre_plugins.dedrm.kfxdedrm", line 45, in processBook File "calibre_plugins.dedrm.kfxdedrm", line 89, in decrypt_voucher Exception: Failed to decrypt KFX DRM voucher with any key
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre\customize\ui.py", line 175, in _run_filetype_plugins
File "calibre_plugins.dedrm.init", line 888, in run
File "calibre_plugins.dedrm.init", line 838, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.2: Ultimately failed to decrypt after 0.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
File "calibre\customize\ui.py", line 175, in _run_filetype_plugins
File "calibre_plugins.kfx_input.package_filetype", line 21, in run
File "calibre_plugins.kfx_input.package_filetype", line 32, in run_kfx
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 83, in convert_to_single_kfx
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 210, in decode_book
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 317, in get_container
calibre_plugins.kfxinput.kfxlib.utilities.KFXDRMError: Book container Camelot A Novel of King Arthur, Merlin, and the Knights of the Round Table_B099PXZJZ5.kfx has DRM and cannot be converted
Traceback (most recent call last):
File "calibre\customize\ui.py", line 432, in get_file_type_metadata
File "calibre_plugins.kfx_input.metadata_reader", line 28, in get_metadata
File "calibre_plugins.kfx_input.kfxlib.yj_book", lineFailed to initialize plugin: 'C:\Users\Jim\AppData\Roaming\calibre\plugins\Ignoble Epub DeDRM.zip'
Traceback (most recent call last):
File "calibre\customize\ui.py", line 740, in initialize_plugins
File "calibre\customize\ui.py", line 64, in load_plugin
File "calibre\customize\zipplugin.py", line 292, in load
File "importlib__init.py", line 127, in import_module
File "
This is not a file that can be decrypted. The only KFX files which can be decrypted are those downloaded with Kindle for PC/Mac 1.26 and earlier. See this post for all possible methods of obtaining Amazon books which can be decrypted: https://www.mobileread.com/forums/showthread.php?t=283371
ElleKayEm, Thank you for your response. I had tripped over something on the internet that said the latest version of DeDRM could now decrypt KFX files. I should have investigated this claim a little further before I got my hopes up. I appreciate you setting me straight. I am wondering, though, if there is some reason why DeDRM hasn't been updated with this ability after all this time. Please forgive me, if this is a stupid question. )-:
It has been updated a couple times to decrypt the newer KFX DRM. Both times Amazon broke it by the next day. So if someone has figured it out again, it would be unwise to add it here.
If you can download a book with 1.26 or earlier Kindle for PC (without KFX downloads disabled), then you can decrypt KFX format. But you can get most books in azw3/kf8 or other older formats which are better for archiving or converting anyway.
In fact, looks like the book in this log should be DRM-free if it was purchased and not borrowed through Kindle Unlimited and you use one of the methods to get the older format.
Oh, I was wondering about Big Brother. That doses make sense. You are most correct, there are multiple ways to get from here to there. I was just being lazy and wanted to do it all in Calibre. Thank you for you time and help.
Question / bug report
I have attempted to install DeDRM 10.0.2 into Calibre 5.43.0 and it abends with the error listed in the log.
Which version of Calibre are you running?
5.43.0
Which version of the DeDRM plugin are you running?
v10.0.2
If applicable, which version of the Kindle software are you running?
5.14.3.0.1
Log output
calibre, version 5.43.0 ERROR: Unhandled exception: InvalidPlugin:The plugin in 'J:\$DriveH-Downloads Interim Folder!!!\DeDRM_tools-10.0.2.zip' is invalid. It does not contain a top-level init.py file
calibre 5.43 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 49, 0) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0) Traceback (most recent call last): File "calibre\gui2\preferences\plugins.py", line 326, in add_plugin File "calibre\customize\ui.py", line 476, in add_plugin File "calibre\customize\ui.py", line 64, in load_plugin File "calibre\customize\zipplugin.py", line 283, in load File "calibre\customize\zipplugin.py", line 378, in _locate_code calibre.customize.InvalidPlugin: The plugin in 'J:\$DriveH-Downloads Interim Folder!!!\DeDRM_tools-10.0.2.zip' is invalid. It does not contain a top-level init.py file