noDRM / DeDRM_tools

DeDRM tools for ebooks
7.34k stars 323 forks source link

Can't deDRM AZW ebooks #643

Open 3itxian opened 1 month ago

3itxian commented 1 month ago

Question / bug report

I have been trying all day to deDMR this one ebook, but it won't work. I added what I believe to be the relevant part of the log below, any help???

Which version of Calibre are you running?

7.19

Which version of the DeDRM plugin are you running?

v10.0.9

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

2.3.70682

Log output

DeDRM v10.0.9: Trying to decrypt ehcs38fs.azw
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪
Found 0 keys to try after 0.0 seconds
Crypto Type is: 2
DeDRM v10.0.9: Failed to decrypt with error: No key found in 0 PIDs tried.
DeDRM v10.0.9: Looking for new default Kindle Key after 0.0 seconds
searching for kinfoFiles in C:\Users\censor\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\censor\AppData\Local\Amazon\Kindle\storage\.kinf2018
Couldn't decrypt file.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.2 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:
ElleKayEm commented 1 month ago

Did you download this with the installation of Kindle for PC which is currently on the same computer as calibre/DeDRM?

3itxian commented 1 month ago

Did you download this with the installation of Kindle for PC which is currently on the same computer as calibre/DeDRM?

Yup! Also tried following the read-me part of uninstalling kindle, unregistering the device and deleting folders, and then reinstalling and redownloading. Didn’t work.

ElleKayEm commented 1 month ago

Let's see the complete log of adding the book.

3itxian commented 1 month ago

Sorry for the late reply! This is it, I believe:

ApplicationPaletteChange event ignored Using calibre Qt style: True ApplicationPaletteChange event received calibre Registre de depuració calibre 7.19 embedded-python: True Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19045') Python 3.11.5 Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free') Interface language: ca EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 15, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 15, 0) && KFX metadata reader (from KFX Input) (2, 15, 0) && From KFX (2, 15, 0) && KFX Input (2, 15, 0) && Set KFX metadata (from KFX Output) (2, 10, 0) && KFX Output (2, 10, 0) calibre 7.19 embedded-python: True Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19045') Python 3.11.5 Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free') Interface language: ca EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 15, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 15, 0) && KFX metadata reader (from KFX Input) (2, 15, 0) && From KFX (2, 15, 0) && KFX Input (2, 15, 0) && Set KFX metadata (from KFX Output) (2, 10, 0) && KFX Output (2, 10, 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... [1.14] splash screen shown [1.14] Initializing db... [1.16] db initialized [1.16] Constructing main UI... [2.00] GUI main window shown [2.47] main UI initialized... [2.47] Hiding splash screen [2.47] splash screen hidden [2.47] Started up in 2.47 seconds with 2 books Gather KFX-ZIP (from KFX Input) 2.15.0: Importing C:/Users/username/Downloads/Nueva carpeta/My Kindle Content/B0D5Y93WXB_EBOK/B0D5Y93WXB_EBOK.azw Gather KFX-ZIP (from KFX Input): File is not KFX format DeDRM v10.0.9: Trying to decrypt B0D5Y93WXB_EBOK.azw MobiDeDrm v1.1. Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al. Decrypting Kindle Format 8 ebook: おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪ Found 0 keys to try after 0.6 seconds Crypto Type is: 2 DeDRM v10.0.9: Failed to decrypt with error: No key found in 0 PIDs tried. DeDRM v10.0.9: Looking for new default Kindle Key after 0.6 seconds searching for kinfoFiles in C:\Users\username\AppData\Local Found K4PC 1.25+ kinf2018 file: C:\Users\username\AppData\Local\Amazon\Kindle\storage.kinf2018 Couldn't decrypt file. DeDRM v10.0.9: Ultimately failed to decrypt after 0.8 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\username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook File "C:\Users\username\AppData\Roaming\calibre\plugins\DeDRM.zip\mobidedrm.py", line 401, in processBook mobidedrm.DrmException: No key found in 0 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "calibre\customize\ui.py", line 199, 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.8 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md Added おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪ to db in: 0.1 Added 1 books in 1.7 seconds Worker Launch took: 0.03 seconds Job: 0 Converteix el llibre 1 de 1 (おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪) finished Converteix el llibre 1 de 1 (おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪)

DeDRM v10.0.9: Trying to decrypt ehcs38fs.azw
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪
Found 0 keys to try after 0.6 seconds
Crypto Type is: 2
DeDRM v10.0.9: Failed to decrypt with error: No key found in 0 PIDs tried.
DeDRM v10.0.9: Looking for new default Kindle Key after 0.6 seconds
searching for kinfoFiles in C:\Users\username\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\username\AppData\Local\Amazon\Kindle\storage\.kinf2018
Couldn't decrypt file.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.8 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\username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook

  File "C:\Users\username\AppData\Roaming\calibre\plugins\DeDRM.zip\mobidedrm.py", line 401, in processBook

mobidedrm.DrmException: No key found in 0 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "calibre\customize\ui.py", line 199, 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.8 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md

Conversion options changed from defaults:

  read_metadata_from_opf: 'C:\\Users\\IANORI~1\\AppData\\Local\\Temp\\calibre_frtktwd8\\io5nhgyw.opf'

  verbose: 2

  output_profile: 'generic_eink'

  cover: 'C:\\Users\\IANORI~1\\AppData\\Local\\Temp\\calibre_frtktwd8\\zcuxgom8.jpeg'

Resolved conversion options

calibre version: 7.19.0

{'add_alt_text_to_img': False,

 'asciiize': False,

 'author_sort': None,

 'authors': None,

 'base_font_size': 0.0,

 'book_producer': None,

 'change_justification': 'original',

 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "

            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "

            "'i')) or @class = 'chapter']",

 'chapter_mark': 'pagebreak',

 'comments': None,

 'cover': 'C:\\Users\\IANORI~1\\AppData\\Local\\Temp\\calibre_frtktwd8\\zcuxgom8.jpeg',

 'debug_pipeline': None,

 'dehyphenate': True,

 'delete_blank_paragraphs': True,

 'disable_font_rescaling': False,

 'dont_split_on_page_breaks': False,

 'duplicate_links_in_toc': False,

 'embed_all_fonts': False,

 'embed_font_family': None,

 'enable_heuristics': False,

 'epub_flatten': False,

 'epub_inline_toc': False,

 'epub_max_image_size': 'none',

 'epub_toc_at_end': False,

 'epub_version': '2',

 'expand_css': False,

 'extra_css': None,

 'extract_to': None,

 'filter_css': '',

 'fix_indents': True,

 'flow_size': 260,

 'font_size_mapping': None,

 'format_scene_breaks': True,

 'html_unwrap_factor': 0.4,

 'input_encoding': None,

 'input_profile': <calibre.customize.profiles.InputProfile object at 0x000001F496358A10>,

 'insert_blank_line': False,

 'insert_blank_line_size': 0.5,

 'insert_metadata': False,

 'isbn': None,

 'italicize_common_cases': True,

 'keep_ligatures': False,

 'language': None,

 'level1_toc': None,

 'level2_toc': None,

 'level3_toc': None,

 'line_height': 0.0,

 'linearize_tables': False,

 'margin_bottom': 5.0,

 'margin_left': 5.0,

 'margin_right': 5.0,

 'margin_top': 5.0,

 'markup_chapter_headings': True,

 'max_toc_links': 50,

 'minimum_line_height': 120.0,

 'no_chapters_in_toc': False,

 'no_default_epub_cover': False,

 'no_inline_navbars': False,

 'no_svg_cover': False,

 'output_profile': <calibre.customize.profiles.GenericEink object at 0x000001F49635BC90>,

 'page_breaks_before': "//*[name()='h1' or name()='h2']",

 'prefer_metadata_cover': False,

 'preserve_cover_aspect_ratio': False,

 'pretty_print': True,

 'pubdate': None,

 'publisher': None,

 'rating': None,

 'read_metadata_from_opf': 'C:\\Users\\IANORI~1\\AppData\\Local\\Temp\\calibre_frtktwd8\\io5nhgyw.opf',

 'remove_fake_margins': True,

 'remove_first_image': False,

 'remove_paragraph_spacing': False,

 'remove_paragraph_spacing_indent_size': 1.5,

 'renumber_headings': True,

 'replace_scene_breaks': '',

 'search_replace': '[]',

 'series': None,

 'series_index': None,

 'smarten_punctuation': False,

 'sr1_replace': None,

 'sr1_search': None,

 'sr2_replace': None,

 'sr2_search': None,

 'sr3_replace': None,

 'sr3_search': None,

 'start_reading_at': None,

 'subset_embedded_fonts': False,

 'tags': None,

 'timestamp': None,

 'title': None,

 'title_sort': None,

 'toc_filter': None,

 'toc_threshold': 6,

 'toc_title': None,

 'transform_css_rules': '[]',

 'transform_html_rules': '[]',

 'unsmarten_punctuation': False,

 'unwrap_lines': True,

 'use_auto_toc': False,

 'verbose': 2}

DeDRM v10.0.9: Trying to decrypt ehcs38fs.azw
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪
Found 0 keys to try after 0.0 seconds
Crypto Type is: 2
DeDRM v10.0.9: Failed to decrypt with error: No key found in 0 PIDs tried.
DeDRM v10.0.9: Looking for new default Kindle Key after 0.0 seconds
searching for kinfoFiles in C:\Users\username\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\username\AppData\Local\Amazon\Kindle\storage\.kinf2018
Couldn't decrypt file.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.2 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\username\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook

  File "C:\Users\username\AppData\Roaming\calibre\plugins\DeDRM.zip\mobidedrm.py", line 401, in processBook

mobidedrm.DrmException: No key found in 0 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "calibre\customize\ui.py", line 199, 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.2 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md

InputFormatPlugin: MOBI Input running

on C:\Users\IANORI~1\AppData\Local\Temp\calibre_frtktwd8\ehcs38fs.azw

Found KF8 MOBI of type 'standalone'

Traceback (most recent call last):

  File "runpy.py", line 198, in _run_module_as_main

  File "runpy.py", line 88, in _run_code

  File "site.py", line 83, in <module>

  File "site.py", line 78, in main

  File "site.py", line 50, in run_entry_point

  File "calibre\utils\ipc\worker.py", line 215, in main

  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override

  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert

  File "calibre\ebooks\conversion\plumber.py", line 1129, in run

  File "calibre\customize\conversion.py", line 245, in __call__

  File "calibre\ebooks\conversion\plugins\mobi_input.py", line 45, in convert

  File "calibre\ebooks\mobi\reader\mobi8.py", line 87, in __call__

  File "calibre\ebooks\mobi\reader\mobi6.py", line 163, in check_for_drm

calibre.ebooks.DRMError: おジャ魔女どれみ おはなしえほん さいこうの おくりもの♪
ElleKayEm commented 1 month ago

I don't know why this is not working if the book was a fresh download with the currently installed Kindle for PC.

3itxian commented 1 month ago

Yeah, me neither. I tried many different versions of the Kindle app since some gave KFX-ZIP files, but even when I managed to get an AZW, and uninstalled Kindle, Calibre and all the plugins and reinstalled them, it wouldn't work. I don't really know what else to do.

ElleKayEm commented 1 month ago

Needs to be no more recent than Kindle for PC 2.4.0 (70904) aka 2.4.70904. And each installation has a unique key.

MrSchoolcraft commented 1 month ago

how do you get kindle for PC to import a key into calibre/noDrm?

ElleKayEm commented 1 month ago

Happens automatically when you add the book to calibre if Kindle for PC used to download the book is on the same computer and user as calibre/DeDRM.