noDRM / DeDRM_tools

DeDRM tools for ebooks
7.04k stars 314 forks source link

Cannot remove DRM from AZW book #560

Closed reynold1 closed 3 months ago

reynold1 commented 4 months ago

Question / bug report

I believe I have both the KFX Input (2.12.0) and DeDRM (10.0.9) plugins set up correctly. Not sure why I'm unable to remove DRM from this AZW book.

Which version of Calibre are you running?

7.12

Which version of the DeDRM plugin are you running?

10.0.9

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

n/a

Log output

ApplicationPaletteChange event ignored Using calibre Qt style: True ApplicationPaletteChange event received calibre Debug log calibre 7.12 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: None EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 12, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 12, 0) && KFX metadata reader (from KFX Input) (2, 12, 0) && From KFX (2, 12, 0) && KFX Input (2, 12, 0) calibre 7.12 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: None EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 12, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 12, 0) && KFX metadata reader (from KFX Input) (2, 12, 0) && From KFX (2, 12, 0) && KFX Input (2, 12, 0) QPA platform: windows devicePixelRatio: 1.5 logicalDpi: 96.0 x 96.0 physicalDpi: 68.30252100840336 x 68.23880597014926 [0.00] Starting up... [0.00] Showing splash screen... [0.12] splash screen shown [0.12] Initializing db... [0.12] db initialized [0.12] Constructing main UI... [1.00] GUI main window shown [1.03] main UI initialized... [1.03] Hiding splash screen Gather KFX-ZIP (from KFX Input) 2.12.0: Importing D:/@DESKTOPS/06-03 DESKTOP (Need to Sort) [177 items]/B082R1CFDX_EBOK.azw Gather KFX-ZIP (from KFX Input): File is not KFX format DeDRM v10.0.9: Trying to decrypt B082R1CFDX_EBOK.azw [15.61] splash screen hidden [15.61] Started up in 15.61 seconds with 0 books MobiDeDrm v1.1. Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al. Decrypting Kindle Format 8 ebook: The Personality Puzzle (Eighth Edition) 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\Administrator\AppData\Local No K4PC kindle.info/kinf/kinf2011 files have been found. DeDRM v10.0.9: Ultimately failed to decrypt after 0.6 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\Administrator\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook File "C:\Users\Administrator\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.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md Added The Personality Puzzle (Eighth Edition) to db in: 0.1 Added 1 books in 1.4 seconds Worker Launch took: 0.00 seconds Job: 0 Convert book 1 of 1 (The Personality Puzzle (Eighth Edition)) finished Convert book 1 of 1 (The Personality Puzzle (Eighth Edition))

DeDRM v10.0.9: Trying to decrypt y7z4r6o3.azw
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: The Personality Puzzle (Eighth Edition)
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\Administrator\AppData\Local
No K4PC kindle.info/kinf/kinf2011 files have been found.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.6 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\Administrator\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook

  File "C:\Users\Administrator\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.6 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md

Conversion options changed from defaults:

  output_profile: 'generic_eink'

  preserve_cover_aspect_ratio: True

  verbose: 2

  pdf_mono_family: 'Courier New'

  read_metadata_from_opf: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\calibre__8gx9mn6\\3voos5tb.opf'

  pdf_sans_family: 'Tahoma'

  cover: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\calibre__8gx9mn6\\6hgu8qbp.jpeg'

  pdf_serif_family: 'Tahoma'

  prefer_metadata_cover: True

Resolved conversion options

calibre version: 7.12.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\\ADMINI~1\\AppData\\Local\\Temp\\calibre__8gx9mn6\\6hgu8qbp.jpeg',

 'custom_size': None,

 'debug_pipeline': None,

 'dehyphenate': True,

 'delete_blank_paragraphs': True,

 'disable_font_rescaling': False,

 'duplicate_links_in_toc': False,

 'embed_all_fonts': False,

 'embed_font_family': None,

 'enable_heuristics': False,

 'expand_css': False,

 'extra_css': None,

 'filter_css': '',

 'fix_indents': True,

 'font_size_mapping': None,

 'format_scene_breaks': True,

 'html_unwrap_factor': 0.4,

 'input_encoding': None,

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

 '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_inline_navbars': False,

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

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

 'paper_size': 'letter',

 'pdf_add_toc': False,

 'pdf_default_font_size': 20,

 'pdf_footer_template': None,

 'pdf_header_template': None,

 'pdf_hyphenate': False,

 'pdf_mark_links': False,

 'pdf_mono_family': 'Courier New',

 'pdf_mono_font_size': 16,

 'pdf_no_cover': False,

 'pdf_odd_even_offset': 0.0,

 'pdf_page_margin_bottom': 72.0,

 'pdf_page_margin_left': 72.0,

 'pdf_page_margin_right': 72.0,

 'pdf_page_margin_top': 72.0,

 'pdf_page_number_map': None,

 'pdf_page_numbers': False,

 'pdf_sans_family': 'Tahoma',

 'pdf_serif_family': 'Tahoma',

 'pdf_standard_font': 'serif',

 'pdf_use_document_margins': False,

 'prefer_metadata_cover': True,

 'preserve_cover_aspect_ratio': True,

 'pretty_print': False,

 'pubdate': None,

 'publisher': None,

 'rating': None,

 'read_metadata_from_opf': 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\calibre__8gx9mn6\\3voos5tb.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': '[]',

 'uncompressed_pdf': False,

 'unit': 'inch',

 'unsmarten_punctuation': False,

 'unwrap_lines': True,

 'use_auto_toc': False,

 'use_profile_size': False,

 'verbose': 2}

DeDRM v10.0.9: Trying to decrypt y7z4r6o3.azw
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: The Personality Puzzle (Eighth Edition)
Found 0 keys to try after 0.1 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.1 seconds
searching for kinfoFiles in C:\Users\Administrator\AppData\Local
No K4PC kindle.info/kinf/kinf2011 files have been found.
DeDRM v10.0.9: Ultimately failed to decrypt after 0.1 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\Administrator\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook

  File "C:\Users\Administrator\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.1 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\ADMINI~1\AppData\Local\Temp\calibre__8gx9mn6\y7z4r6o3.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 1127, 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: The Personality Puzzle (Eighth Edition)
ElleKayEm commented 4 months ago

The Kindle app use to download this is not on this computer so DeDRM cannot retrieve the key to unlock your book. Install Kindle for PC on this computer and download a new copy. Each app installation has a unique key.

reynold1 commented 4 months ago

That makes sense! I just reinstalled Windows on my desktop computer and haven't downloaded Kindle for PC.

Is there any way to determine the unique key for the previous installation of the Kindle for PC application? Can I extract it from the existing AZW file I'm trying to remove the DRM? I imagine this is a longshot but wanted to ask nonetheless.

ElleKayEm commented 4 months ago

No, that would be like leaving the key in the lock. :) Download a fresh copy of the book from the new installation.

reynold1 commented 4 months ago

Thank you for all your help!

ElleKayEm commented 4 months ago

Whenever you're all set, you can close the issue.