noDRM / DeDRM_tools

DeDRM tools for ebooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dedrm decryption failed

Yosakura-fubuki opened this issue · comments

Question / bug report

With the same operation, the same version of plug-in and software, my friend's computer can decrypt successfully, but mine cannot. I suspect that it may be due to the lack of python libraries. Please help. If it is due to the lack of python libraries, which ones are missing?

Which version of Calibre are you running?

6.27

Which version of the DeDRM plugin are you running?

v10.0.9

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

1.40

Log output

Interface language: zh_CN
Successfully initialized third party plugins: DeDRM (10, 0, 9) && AZW6 Image Merge (1, 0, 0)
QPA platform: windows
devicePixelRatio: 1.25
logicalDpi: 96.0 x 96.0
physicalDpi: 113.41395348837209 x 113.70777202072539
[0.00] Starting up...
[0.00] Showing splash screen...
[0.44] splash screen shown
[0.44] Initializing db...
[0.45] db initialized
[0.45] Constructing main UI...
[0.95] main UI initialized...
[0.95] Hiding splash screen
Starting QuickView
DeDRM v10.0.9: Trying to decrypt B0CS5S5L3W_EBOK.azw
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: 西野 ~学内カースト最下位にして異能世界最強の少年~ 14【電子特典付き】 西野 学内カースト最下位にして異能世界最強の少年 (MF文庫J)
Got DSN key from database kindle_key_1700578705_1
Found 6 keys to try after 0.6 seconds
Crypto Type is: 2
DeDRM v10.0.9: Failed to decrypt with error: No key found in 6 PIDs tried.
DeDRM v10.0.9: Looking for new default Kindle Key after 0.6 seconds
searching for kinfoFiles in C:\Users\\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\\AppData\Local\Amazon\Kindle\storage\.kinf2018
Couldn't decrypt file.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.7 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/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 931, in KindleMobiDecrypt
  File "C:\Users\\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\\AppData\Roaming\calibre\plugins\DeDRM.zip\mobidedrm.py", line 401, in processBook
mobidedrm.DrmException: No key found in 6 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 187, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1030, in run
  File "calibre_plugins.dedrm.__init__", line 981, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.7 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
AZW6 Image Merge v1.0.0: Trying to process B0CS5S5L3W_EBOK.azw
Unknown booktype azw. Passing back to calibre unchanged
Storage number map:
{(7, 0): [(3, 'C'), (4, 'D'), (5, 'E')]}
[7.92] splash screen hidden
[7.92] Started up in 7.92 seconds with 334 books
Storage number map:
{(7, 0): [(3, 'C'), (4, 'D'), (5, 'E')]}
Drive letters for USBDevice(vendor_id=0x1949 product_id=0x324 bcd=0x409 devid=usb\vid_1949&pid_0324&rev_0409 devinst=11)
{'drive_letters': [],
 'pnp_id_map': {},
 'readonly_drives': set(),
 'sort_map': {}}
Unable to open device <calibre.devices.kindle.driver.KINDLE2 object at 0x00000251FA41B850>
Traceback (most recent call last):
  File "calibre\gui2\device.py", line 241, in do_connect
  File "calibre\devices\usbms\device.py", line 725, in open
  File "calibre\devices\usbms\device.py", line 272, in open_windows
calibre.devices.errors.DeviceError: 无法检测到 Amazon Kindle 设备上的任何硬盘,请尝试重启。

Connect to device failed, retrying in 5 seconds...
Added 西野 ~学内カースト最下位にして異能世界最強の少年~ 14【電子特典付き】 西野 学内カースト最下位にして異能世界最強の少年 (MF文庫J) to db in: 0.1

The plugin uses calibre's built-in Python. Was this book downloaded with the current installation of Kindle for PC on the same computer and user as calibre/DeDRM?

The plugin uses calibre's built-in Python. Was this book downloaded with the current installation of Kindle for PC on the same computer and user as calibre/DeDRM?

Kindle for PC and calibre were both downloaded by me after resetting the computer, and I don't know if they are downloaded by the same computer. My computer used to work before, but due to personal reasons, I needed to reset the computer. Later, I installed the same version of calibre, its plugins, and Kindle for PC according to the operation, but failed.

The plugin uses calibre's built-in Python. Was this book downloaded with the current installation of Kindle for PC on the same computer and user as calibre/DeDRM?

Kindle for PC and calibre were both downloaded by me after resetting the computer, and I don't know if they are downloaded by the same computer. My computer used to work before, but due to personal reasons, I needed to reset the computer. Later, I installed the same version of calibre, its plugins, and Kindle for PC according to the operation, but failed.

This book was indeed downloaded by Kindle for PC installed on my computer, and calibre was also downloaded and installed by my computer.

Once you reinstalled Kindle for PC and logged into your account, you downloaded a new copy of the book?

Once you reinstalled Kindle for PC and logged into your account, you downloaded a new copy of the book?

yes,I did reinstall the Kindle for PC and then downloaded new files after logging in to my account. They are not the e-book files that I downloaded before reinstalling my computer. Should I try logging in with my other Kindle account?

I did input the serial number of my Kindle reader that is bound to my device, but it seems that electronic files downloaded on Kindle for PC do not require a bound serial number. I followed the tutorial and successfully helped several friends operate it before. It was the same version and we used random serial numbers sometimes, or even without using a serial number, it still worked. For the same book, I can successfully decrypt it when I log in to my Kindle account on my friend's computer, but it doesn't work on my computer.

You should be logged into whichever account the books are from. Adding a serial number is only for decrypting books downloaded directly to or downloaded from the website for that particular E-ink Kindle. DeDRM gets the key for Kindle for PC/Mac books from where it is stored on your computer and decrypts it.

I did operate in this way, but it still didn't work. I logged in my account on Kindle for PC, then downloaded the e-book and dragged it to Calibre downloaded on the same computer. The version of the plug-in is also correct. But the decryption failed on my computer. However, the same operation can be successfully run on my friend's computer.

You should be logged into whichever account the books are from. Adding a serial number is only for decrypting books downloaded directly to or downloaded from the website for that particular E-ink Kindle. DeDRM gets the key for Kindle for PC/Mac books from where it is stored on your computer and decrypts it.

I don't know what the issue is with your computer. All I can suggest is reinstalling Kindle for PC and downloading new copies of your books.

Or if you have an E-ink Kindle (not a Fire), use that method.

That's a pity. It used to work, but it doesn't work after resetting the computer. Maybe there are indeed some problems with the computer. In short, thank you for your help. Sorry for disturbing you.

If you can open and read the book in Kindle for PC which is installed on the same computer and user as calibre/DeDRM, then it should work. But the book must be from the currently installed and logged in Kindle for PC in order for DeDRM to retrieve and decrypt the correct key to unlock the book. Each app installation has a unique key. Even if you log out and log back in, the key will change. That's why I suggested reinstalling Kindle for PC and redownloading your books.

No key found in 6 PIDs tried.

Thanks for your exactly explanation.But I'm pretty sure the book is from the currently installed and logged-in Kindle for PC, yet it keeps showing failures. I also uninstalled and reinstalled Kindle for PC, but it still shows failures. I used my friend's computer to operate yesterday and it succeeded. I think the "PIDs" in "No key found in 6 PIDs tried" is the key point. I've tried reinstalling calibre and Kindle for PC, and the number of "PIDs" has changed. I think I can reoperate it on my friend's computer when I'm free, and compare the calibre debug log with the one on my computer.

If you can open and read the book in Kindle for PC which is installed on the same computer and user as calibre/DeDRM, then it should work.

By the way, could you please tell me what "user" refers to? Is it my Kindle account or the administrator account on my computer? I installed Kindle for PC and calibre by default.I'm not sure if this will make a difference. Of course, if you are referring only to the account I use to log in to Kindle for PC, my answer is "yes".

The problem is after that. When the saved keys do not work, it tries to retrieve a new key and that's not working:

DeDRM v10.0.9: Looking for new default Kindle Key after 0.6 seconds
searching for kinfoFiles in C:\Users\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\AppData\Local\Amazon\Kindle\storage.kinf2018
Couldn't decrypt file.

Windows user account.

Windows user account.

That's really surprising! How can I confirm that I am using the same Windows user account? Moreover, do I need to confirm that calibre, the plug-in, and Kindle for PC are all using the same user account, or just two of them? I'm sorry to ask you so many questions.

You'd know if you had installed them in different user accounts. Do you even have more than one user account on this computer?

My computer only has one Microsoft account. I tried to open the property interface of Calibre and Kindle, but there are three options for the owner: "Administration", "System", and "XXXXX (my name)". What are the differences between these three options? The Kindle for PC installation package was downloaded from a third-party store application, while the Calibre 6.27.0 installation package was found on the Calibre official website. By the way, the Calibre installation package was downloaded from the official website by my previous computer. Will this have an impact? Or should I re-download the Calibre installation package from the official website using my current computer? However, I have tried this before but failed.

In order to protect my privacy, I have mosaic processing in some places. Please forgive me. The blurred part in the middle is my account name, but my account should be Administration. I don't know the difference between the three.
Uploading photo.jpg…

If you only have one user account on the computer, then you didn't install the programs in different user accounts. It does not matter if you downloaded the installation files with another computer. Only that the programs are installed on the same computer.

I'd suggest trying the current Kindle for PC and the current calibre. The two plugins you have now. Plus the current KFX Input plugin. Then get a fresh download of a book.