apprenticeharper / DeDRM_tools

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

DRM isn't removed from newly uploaded books (AZW3 file from Amazon, DeDRM configured with serial number from a very old Kindle) #2054

Open motreo opened 2 years ago

motreo commented 2 years ago

Calibre: Version 5.40.0 DeDRM: Version 7.2.1 Running Windows 10 Only installed plugins are DeDRM and KFX Input.

Ebook file downloaded from Amazon in AZW3 format (I chose "Download & transfer via USB"). When configuring DeDRM, I used the serial number for an old Kindle I used to own, which I found under "Manage your Content & Devices" in my Amazon account. I used this guide during setup.

Debug log:

calibre Debug log
calibre 5.40  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, 47, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 47, 0) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0)
calibre 5.40  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, 47, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 47, 0) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 120.0 x 120.0
physicalDpi: 145.14285714285714 x 145.14285714285714
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.77] splash screen shown
[0.77] Initializing db...
[0.91] db initialized
[0.91] Constructing main UI...
Failed to check for calibre update: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
Failed to check for plugin update: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
[1.75] main UI initialized...
[1.75] Hiding splash screen
Starting QuickView
DeDRM v7.2.1: Trying to decrypt How to Develop a Winning Small Business Innovation Research (SBIR) Proposal Government Contracting Knowledge Series.azw3
Using Library AlfCrypto DLL/DYLIB/SO
Using Library AlfCrypto DLL/DYLIB/SO
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: How to Develop a Winning Small Business Innovation Research (SBIR) Proposal: Government Contracting Knowledge Series
Found 2 keys to try after 0.3 seconds
Crypto Type is: 2
DeDRM v7.2.1: Failed to decrypt with error: No key found in 2 PIDs tried.
DeDRM v7.2.1: Looking for new default Kindle Key after 0.3 seconds
searching for kinfoFiles in C:\Users\.\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\.\AppData\Local\Amazon\Kindle\storage\.kinf2018
[14.52] splash screen hidden
[14.52] Started up in 14.52 seconds with 5 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'\xebs>\x03\t\xd0\n{\xa60%\xcf<\x11Dk\xfa)>\x01\x1fmL@\xc3 \x08\x82BC>\x1e', b'C:\\Users\\.\\Downloads\\How to Develop a Winning Small Business Innovation Research (SBIR) Proposal Government Contracting Knowledge Series.azw3']
Decrypted key file using IDString '2461168297' and UserName '.'
DeDRM v7.2.1: Found 1 new key
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: How to Develop a Winning Small Business Innovation Research (SBIR) Proposal: Government Contracting Knowledge Series
Got DSN key from database default_key_1
Found 3 keys to try after 4.3 seconds
Crypto Type is: 2
DeDRM v7.2.1: Ultimately failed to decrypt after 4.3 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 "calibre_plugins.dedrm.__init__", line 540, in KindleMobiDecrypt
  File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook
  File "calibre_plugins.dedrm.mobidedrm", line 484, in processBook
calibre_plugins.dedrm.mobidedrm.DrmException: No key found in 2 PIDs tried.

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 633, in run
  File "calibre_plugins.dedrm.__init__", line 583, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 4.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/Added How to Develop a Winning Small Business Innovation Research (SBIR) Proposal: Government Contracting Knowledge Series to db in: 0.2
Added 1 books in 5.0 seconds
ElleKayEm commented 2 years ago

When you downloaded the book did you choose that Kindle for the device?

motreo commented 2 years ago

@ElleKayEm I believe so - I didn't see an option to download the file directly without designating which Kindle it was for.

ElleKayEm commented 2 years ago

If it's an E-ink Kindle (not a Fire) and you have its serial number entered correctly, then it should work.

motreo commented 2 years ago

@ElleKayEm It's an old Fire (2012) - does a workaround exist for Fire Kindles?

ElleKayEm commented 2 years ago

No, the other alternative is using Kindle for PC. See this post for details on how you can get files you can decrypt: https://www.mobileread.com/forums/showthread.php?t=283371