apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.49k stars 1.5k forks source link

Same book, same settings & plugin, different download date, different result. [.azw file] #787

Open ahanqin opened 5 years ago

ahanqin commented 5 years ago

It seems that amazon has re-encrypted the .azw file on the server side.

For some reason, I have always converted the genuine e-books I purchased into epub format. Yesterday, I found that a few books I just purchased failed to convert. So I followed some friends' suggestions, uninstalled the latest 1.25 client, and installed the early 1.21 client. But it did not working. And I downloaded the same books that I had converted before, and the problem remains.

The following is a comparison of log files for reference.

========== Log file 1 ========== The same book '~.azw' file Download Date: 2019.03.07 File size: 1.0MB (1,028,211 byte) Client: Kindle for Mac 1.21.1

calibre 调试日志 calibre 3.39.1 embedded-python: True is64bit: True Darwin-18.2.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '18.2.0', 'Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64') Python 2.7.15 OSX: ('10.14.3', ('', '', ''), 'x86_64') Interface language: zh_CN Successfully initialized third party plugins: DeDRM (6, 6, 2) calibre 3.39.1 embedded-python: True is64bit: True Darwin-18.2.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '18.2.0', 'Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64') Python 2.7.15 OSX: ('10.14.3', ('', '', ''), 'x86_64') Interface language: zh_CN Successfully initialized third party plugins: DeDRM (6, 6, 2) devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 109.000001637 x 109.000001637 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.23] splash screen shown [0.23] Initializing db... [0.24] db initialized [0.24] Constructing main UI... [1.08] main UI initialized... [1.08] Hiding splash screen [1.11] splash screen hidden [1.12] Started up in 1.12 seconds with 7 books DeDRM v6.6.2: Trying to decrypt B01xxxDT_EBOK_0307.azw Using Library AlfCrypto DLL/DYLIB/SO MobiDeDrm v0.42. Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al. Decrypting Kindle Format 8 ebook: BOOKNAME Found 6 keys to try after 0.0 seconds Crypto Type is: 2 DeDRM v6.6.2: Failed to decrypt with error: No key found in 6 keys tried. DeDRM v6.6.2: Looking for new default Kindle Key after 0.0 seconds Found k4Mac kinf2011 file: /Users/.../Library/Application Support/Kindle/storage/.kinf2011 Couldn't decrypt file. DeDRM v6.6.2: Ultimately failed to decrypt after 7.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 622, in run File "calibre_plugins.dedrm.init", line 572, in KindleMobiDecrypt DeDRMError: DeDRM v6.6.2: Ultimately failed to decrypt after 7.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Added BOOKNAME to db in: 0.0 Added 1 books in 7.7 seconds Worker Launch took: 0.125886917114

========== Log file 2 ========== The same book '~.azw' file download date: 2019.01.25 File size: 1.2MB (1,284,208 byte)

calibre 调试日志 calibre 3.39.1 embedded-python: True is64bit: True Darwin-18.2.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '18.2.0', 'Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64') Python 2.7.15 OSX: ('10.14.3', ('', '', ''), 'x86_64') Interface language: zh_CN Successfully initialized third party plugins: DeDRM (6, 6, 2) calibre 3.39.1 embedded-python: True is64bit: True Darwin-18.2.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '18.2.0', 'Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64') Python 2.7.15 OSX: ('10.14.3', ('', '', ''), 'x86_64') Interface language: zh_CN Successfully initialized third party plugins: DeDRM (6, 6, 2) devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 109.000001637 x 109.000001637 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.23] splash screen shown [0.23] Initializing db... [0.24] db initialized [0.24] Constructing main UI... [1.08] main UI initialized... [1.08] Hiding splash screen [1.10] splash screen hidden [1.11] Started up in 1.11 seconds with 7 books DeDRM v6.6.2: Trying to decrypt B01xxxDT_EBOK_0125.azw Using Library AlfCrypto DLL/DYLIB/SO MobiDeDrm v0.42. Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al. Decrypting Mobipocket 6 ebook: BOOKNAME Found 6 keys to try after 0.0 seconds Crypto Type is: 2 File is encoded with PID iHRE4P9WHT. Decrypting. Please wait . . . . . done Decryption succeeded after 0.1 seconds DeDRM v6.6.2: Finished after 0.1 seconds Added BOOKNAME to db in: 0.0 Added 1 books in 0.6 seconds

ElleKayEm commented 5 years ago

Looks like it's not picking up the new key from version 1.21. And do you have it modified not to download KFX files? (Method 2 in this post.)

First, I'd try going into the Kindle for PC/Mac section of the plugin customization and deleting or renaming default_key. Then press the green plus sign. If that doesn't work, try completely uninstalling and reinstalling Kindle for Mac 1.21 following the instructions here:

https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-have-installed-the-calibre-plugin-and-the-book-is-not-already-in-calibre-but-the-drm-does-not-get-removed-it-is-a-kindle-book

ahanqin commented 5 years ago

Thanks a lot for your advice.

First, I had change the KFX method, with terminal command 'chmod -x /Applications/Kindle.app/Contents/MacOS/renderer-test' , and it does not work.

Then, I deregistered account, uninstall the app, remove all directories & files, reinstall and re-register the app, the green '+' button notified me: 'The default encryption key for Kindle for Mac/PC could not be found.' after a while.

In another case, the .azw file downloaded on 2019.01.25 cannot be converted again, because of all the k4i files were removed.

ElleKayEm commented 5 years ago

You are trying with a fresh download of the book from the current installation of Kindle for Mac? And Kindle for Mac is on the same machine and user as calibre with DeDRM?

ahanqin commented 5 years ago

You are trying with a fresh download of the book from the current installation of Kindle for Mac? And Kindle for Mac is on the same machine and user as calibre with DeDRM?

Of course, more than once, whether it is version 1.21 or version 1.23, no matter how many books are downloaded, the green plus does not work at all.

I have already reiterated in the title, the same computer, the same user, I just converted a few books less than a month ago.

I have given up on this attempt, which wastes too much time. It is easier to copy it from kinlde and convert it.

Thank you again for your enthusiasm.

ElleKayEm commented 5 years ago

Yeah, I'm stumped why it's not working for you. Is it one particular book or all the ones downloaded with Kindle for Mac?