noDRM / DeDRM_tools

DeDRM tools for ebooks
6.56k stars 287 forks source link

It wasn't worked - calibre debug states "Failed to decrypt KFX DRM voucher with any key" before the final error #521

Closed notuchc closed 3 months ago

notuchc commented 3 months ago

Question / bug report

Even if I delete the original download, download the book again and import to calibre, the bug report will accuse the same issue.

Which version of Calibre are you running?

7.7

Which version of the DeDRM plugin are you running?

v10.0.3

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

2.3.1

Log output

Converter livro 1 de 1 (Transtorno da personalidade Borderline Para Leigos - 2ª edição)
DeDRM v10.0.3: Trying to decrypt fftk1qmn.kfx-zip
Using Library AlfCrypto DLL/DYLIB/SO
Decrypting KFX-ZIP ebook: fftk1qmn
Found 0 keys to try after 0.2 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.8aff2305-ad42-4dcd-9b90-434ee1ec173d.voucher
Traceback (most recent call last):
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
DeDRM v10.0.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.3: Looking for new default Kindle Key after 0.2 seconds
searching for kinfoFiles in C:\Users\ander\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\ander\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '910325835' and UserName 'ander'
DeDRM v10.0.3: Found 1 new key
Decrypting KFX-ZIP ebook: fftk1qmn
Got DSN key from database key_0
Found 1 keys to try after 0.8 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.8aff2305-ad42-4dcd-9b90-434ee1ec173d.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 991, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.3: Ultimately failed to decrypt after 0.9 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 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

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 1056, in run
  File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: Ultimately failed to decrypt after 0.9 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: 'kindle'
  pdf_serif_family: 'Tahoma'
  read_metadata_from_opf: 'C:\\Users\\ander\\AppData\\Local\\Temp\\calibre_dq3cfqrd\\8johk308.opf'
  cover: 'C:\\Users\\ander\\AppData\\Local\\Temp\\calibre_dq3cfqrd\\6osw_mnt.jpeg'
  pdf_mono_family: 'Courier New'
  verbose: 2
  pdf_sans_family: 'Tahoma'
  allow_conversion_with_errors: True
Resolved conversion options
calibre version: 7.7.0
{'allow_conversion_with_errors': True,
 '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\\ander\\AppData\\Local\\Temp\\calibre_dq3cfqrd\\6osw_mnt.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 0x00000228F9EE1A50>,
 '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.KindleOutput object at 0x00000228F9EDF550>,
 'page_breaks_before': '/',
 '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': False,
 'preserve_cover_aspect_ratio': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\ander\\AppData\\Local\\Temp\\calibre_dq3cfqrd\\8johk308.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.3: Trying to decrypt fftk1qmn.kfx-zip
Decrypting KFX-ZIP ebook: fftk1qmn
Found 0 keys to try after 0.0 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.8aff2305-ad42-4dcd-9b90-434ee1ec173d.voucher
Traceback (most recent call last):
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
DeDRM v10.0.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.3: Looking for new default Kindle Key after 0.0 seconds
searching for kinfoFiles in C:\Users\ander\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\ander\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '910325835' and UserName 'ander'
DeDRM v10.0.3: Found 1 new key
Decrypting KFX-ZIP ebook: fftk1qmn
Got DSN key from database key_0
Found 1 keys to try after 0.7 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.8aff2305-ad42-4dcd-9b90-434ee1ec173d.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 886, in decryptvoucher
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 762, in pkcs7unpad
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 102, in _assert
Exception: Incorrect padding - Wrong key
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 991, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.3: 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 957, in KindleMobiDecrypt
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 261, in GetDecryptedBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\ander\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

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 1056, in run
  File "calibre_plugins.dedrm.__init__", line 1007, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: 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
InputFormatPlugin: KFX Input running
on C:\Users\ander\AppData\Local\Temp\calibre_dq3cfqrd\fftk1qmn.kfx-zip
Software versions: KFX Input 2.10.0, calibre 7.7, Windows-10-10.0.22631-SP0
KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
Converting C:\Users\ander\AppData\Local\Temp\calibre_dq3cfqrd\fftk1qmn.kfx-zip
Processing container: B0BCDSJ7KX_EBOK.azw
Traceback (most recent call last):
  File "calibre_plugins.kfx_input.__init__", line 102, in convert
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B0BCDSJ7KX_EBOK.azw has DRM and cannot be converted

During handling of the above exception, another exception occurred:

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 95, in <module>
  File "site.py", line 90, 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 1108, in run
  File "calibre\customize\conversion.py", line 242, in __call__
  File "calibre_plugins.kfx_input.__init__", line 121, in convert
calibre.ebooks.DRMError: This book has DRM!
notuchc commented 3 months ago

Thanks - I've downloaded the alpha version and it worked fine. Love ya.

ElleKayEm commented 3 months ago

For anyone else coming across this, DeDRM 10.0.9: https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.9