noDRM / DeDRM_tools

DeDRM tools for ebooks
7.36k stars 324 forks source link

DeDRM v10.0.3: Failed to decrypt with error: No key found in 2 PIDs tried. #321

Open brian-wood opened 1 year ago

brian-wood commented 1 year ago

Question / bug report

Hello,

I wanted to remove the DRM from some books I own on Amazon, but encountered an issue with DeDRM. I've entered in the correct serial number from the device using the listing from Calibre->device->configure this device->show device information into the DeDRM plugin. The file is being downloaded from Amazon website as a azw3 format. I'm attaching the debugging content from Calibre, hopefully this is a simple configuration issue on my part being new to using this software/plugins.

Thank you for any advice.

Which version of Calibre are you running?

5.37

Which version of the DeDRM plugin are you running?

v10.0.3

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

No response

Log output

DeDRM v10.0.3: Trying to decrypt Hands-On Network Programming with C_ Learn socket programming in C and write secure and optimized network code.azw3
Using Library AlfCrypto DLL/DYLIB/SO
MobiDeDrm v1.1.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: Hands-On Network Programming with C: Learn socket programming in C and write secure and optimized network code
Found 2 keys to try after 0.1 seconds
Crypto Type is: 2
DeDRM v10.0.3: Failed to decrypt with error: No key found in 2 PIDs tried.
DeDRM v10.0.3: Looking for new default Kindle Key after 0.1 seconds
DeDRM v10.0.3: Exception when getting default Kindle Key after 0.1 seconds
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
    book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
  File "/home/bwood/.config/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 261, in GetDecryptedBook
    mb.processBook(totalpids)
  File "/home/bwood/.config/calibre/plugins/DeDRM.zip/mobidedrm.py", line 501, in processBook
    raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
mobidedrm.DrmException: No key found in 2 PIDs tried.
ElleKayEm commented 1 year ago

Did you choose an E-ink Kindle (not a Fire) when downloading from the website? If so, try copy and pasting its serial number from your content and devices page at Amazon.

brian-wood commented 1 year ago

When I look at the amazon "more actions" I only see "Download & transfer via USB"; I've attached a screenshot of options listed; is there another way I'm supposed to download azw3 files (haven't done this before and only saw this method listed, hopefully the screenshot of available menu options I'm attaching works).

Screenshot from 2023-04-21 10-59-30

P.S. I've also checked the device ID is the same I see from Calibre.

ElleKayEm commented 1 year ago

After you click that, it asks which device. Do you have an E-ink Kindle on your account?

brian-wood commented 1 year ago

I just have 2 of the Kindle Fire devices (and an android phone with Kindle app, but didn't see a way I can download from it); are the E-ink using a different azw[x] format? Do I need to do the other Kindle for PC executable method to download these books and convert that way instead? (I could use one of my VMs with Windows 11 to do this, but would rather not if I can use my Linux desktop.)

ElleKayEm commented 1 year ago

Needs to be an E-ink Kindle to decrypt with the serial number. The key for Fire books is not based on the serial number and hasn't been figured out. All known methods to get decryptable books are here: https://www.mobileread.com/forums/showthread.php?t=283371

brian-wood commented 1 year ago

Ok thanks for the help, might have to look into getting the cheapest e-ink kindle.

romad275 commented 1 year ago

That is what I did. When it arrived, I copied the serial number off the label on the box and entered in Calibre.

Sincerely, Dennis B. Swaney

Cogito Ergo Mac

On 21Apr23, at 13:38 , brian-wood @.***> wrote:

Ok thanks for the help, might have to look into getting the cheapest e-ink kindle.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

ElleKayEm commented 1 year ago

There's also method 6. It uses an older version of Kindle for Android which can be run in an emulator.