从 Kindle Book 帮助中删除 Drm

从 Kindle Book 帮助中删除 Drm

安装了带有 kindle-unpacking 插件的 calibres。安装了 DeDRM 插件。在调试模式下重新启动 calibres 并发现 DRM 未被删除。我从调试中收到了此反馈。

calibre Debug log
calibre 3.39.1  embedded-python: True is64bit: True
Linux-4.15.0-45-generic-x86_64-with-debian-buster-sid Linux ('64bit', 'ELF')
('Linux', '4.15.0-45-generic', '#48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019')
Python 2.7.15
Linux: ('debian', 'buster/sid', '')
Interface language: None
Successfully initialized third party plugins: DeDRM (6, 6, 1) && KindleUnpack - The Plugin (0, 81, 5)
calibre 3.39.1  embedded-python: True is64bit: True
Linux-4.15.0-45-generic-x86_64-with-debian-buster-sid Linux ('64bit', 'ELF')
('Linux', '4.15.0-45-generic', '#48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019')
Python 2.7.15
Linux: ('debian', 'buster/sid', '')
Interface language: None
Successfully initialized third party plugins: DeDRM (6, 6, 1) && KindleUnpack - The Plugin (0, 81, 5)
Turning on automatic hidpi scaling
QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 118.41774744 x 118.946341463
Using calibre Qt style: True
QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.
[0.00] Starting up...
[0.01] Showing splash screen...
[0.30] splash screen shown
[0.30] Initializing db...
[0.35] db initialized
[0.35] Constructing main UI...
Looking for desktop notifier support from: org.freedesktop.Notifications
org.freedesktop.Notifications found in 0.0 seconds
[1.93] main UI initialized...
[1.93] Hiding splash screen
[11.22] splash screen hidden
[11.22] Started up in 11.22 seconds with 1 books
['zenity', '--modal', '--file-selection', '--title=Select books', '--separator=\n', '--attach=52428814', '--filename=/home/aubrey/Downloads/.fgdfg.gdfhjdhf*&^839', '--file-filter=Books | *.lrf *.rar *.zip *.rtf *.lit *.txt *.txtz *.text *.htm *.xhtm *.html *.htmlz *.xhtml *.pdf *.pdb *.updb *.pdr *.prc *.mobi *.azw *.doc *.epub *.fb2 *.fbz *.djv *.djvu *.lrx *.cbr *.cbz *.cbc *.oebzip *.rb *.imp *.odt *.chm *.tpz *.azw1 *.pml *.pmlz *.mbp *.tan *.snb *.xps *.oxps *.azw4 *.book *.zbf *.pobi *.docx *.docm *.md *.textile *.markdown *.ibook *.ibooks *.iba *.azw3 *.ps *.kepub *.kfx', '--file-filter=EPUB books | *.epub *.kepub', '--file-filter=Kindle books | *.mobi *.prc *.azw *.azw3 *.kfx *.tpz *.azw1 *.azw4', '--file-filter=PDF books | *.pdf *.azw4', '--file-filter=HTML books | *.htm *.html *.xhtm *.xhtml', '--file-filter=LIT books | *.lit', '--file-filter=Text books | *.txt *.text *.rtf *.md *.markdown *.textile *.txtz', '--file-filter=Comics | *.cbz *.cbr *.cbc', '--file-filter=Archives | *.zip *.rar', '--file-filter=Wordprocessor files | *.odt *.doc *.docx', '--file-filter=All files | *', '--multiple']
DeDRM v6.6.1: Trying to decrypt Today's Technician_ Automotive Heating & Air Conditioning Classroom Manual and Shop Manual, Spiral bound Version.azw4
Using Library AlfCrypto DLL/DYLIB/SO
MobiDeDrm v0.42.
Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
Decrypting Mobipocket 4 ebook: Today's Technician: Automotive Heating & Air Conditioning Classroom Manual and Shop Manual, Spiral bound Version
Found 0 keys to try after 0.6 seconds
Crypto Type is: 2
DeDRM v6.6.1: Failed to decrypt with error: No key found in 0 keys tried.
DeDRM v6.6.1: Looking for new default Kindle Key after 0.6 seconds
DeDRM v6.6.1: Running kindlekey.py under Wine
DeDRM v6.6.1: Command line: 'WINEPREFIX="/home/aubrey" wine python.exe "/home/aubrey/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py" "/home/aubrey/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir"'
/bin/sh: 1: wine: not found
DeDRM v6.6.1: Found and decrypted 0 key files
DeDRM v6.6.1: Ultimately failed to decrypt after 0.6 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 621, in run
  File "calibre_plugins.dedrm.__init__", line 571, in KindleMobiDecrypt
DeDRMError: DeDRM v6.6.1: Ultimately failed to decrypt after 0.6 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Added Today's Technician: Automotive Heating & Air Conditioning Classroom Manual and Shop Manual, Spiral bound Version to db in: 1.8
Added 1 books in 3.3 seconds

答案1

Linux DeDRM Calibre 插件不会自动检测和生成剥离 DRM 所需的解密密钥。您必须自行添加。

我在 Linux Mint 19.3 上做过这个,但原理应该是一样的。

先决条件

安装 Wine(按照本指南这里

使用 Wine 安装 Kindle Reader 1.17 并登录你的账户

使用 Wine 安装 Python 2.7 和 pycrypto

  • 下载最新的 Windows X86 MSI这里

  • 从以下位置下载 pycrypto-2.1.0.win32-py2.7.zip这里并解压缩

  • 使用 Wine 安装

     wine msiexec /i python-2.7.16.msi
     wine pycrypto-2.1.0.win32-py2.7.exe
    

创建 Kindle 解密文件

如果你还没有 DeDRM 插件,请下载这里并将其添加到 Calibre。

  • 解压DeDRM_tools_6.8.0.zip

  • 接下来,解压DeDRM_Plugin.zip

  • 在解压后的文件夹中找到 kindlekey.py。然后,创建 .k4i 文件。

     wine python.exe kindlekey.py
    

您应该会看到类似“密钥已成功检索到 kindlekey1.k4i”的消息

将 .k4i 文件添加到 Calibre 中的 DeDRM 插件

  • 打开 Calibre -> 偏好设置 -> 插件 -> DeDRM -> 自定义插件 -> Kindle for Mac/PC 电子书

  • 导入刚刚创建的k4i文件

这样,您就能够从通过 Kindle 应用程序下载的 .azw 文件中删除 DRM。

相关内容