apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.5k stars 1.5k forks source link

Unable to remove DRM from Kindle ebook #870

Closed anilKartha closed 5 years ago

anilKartha commented 5 years ago

Hi.

Amazon ebooks I bought recently can no longer can be decrypted. I work on a Mac Air and I have the latest versions of the DeDRM tools (I think). I have attached the log. Hoping someone can help. Thanks. ..... calibre Debug log calibre 3.46 embedded-python: True is64bit: True Darwin-18.6.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '18.6.0', 'Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64') Python 2.7.15 OSX: ('10.14.5', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 17, 1) && DeDRM (6, 6, 3) && Package KFX (from KFX Input) (1, 17, 1) && Find Duplicates (1, 6, 3) && KFX metadata reader (from KFX Input) (1, 17, 1) && KFX Input (1, 17, 1) && Set KFX metadata (from KFX Output) (1, 30, 0) && KFX Output (1, 30, 0) calibre 3.46 embedded-python: True is64bit: True Darwin-18.6.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '18.6.0', 'Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64') Python 2.7.15 OSX: ('10.14.5', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 17, 1) && DeDRM (6, 6, 3) && Package KFX (from KFX Input) (1, 17, 1) && Find Duplicates (1, 6, 3) && KFX metadata reader (from KFX Input) (1, 17, 1) && KFX Input (1, 17, 1) && Set KFX metadata (from KFX Output) (1, 30, 0) && KFX Output (1, 30, 0) devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 114.000001712 x 114.000001712 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.21] splash screen shown [0.21] Initializing db... [0.25] db initialized [0.25] Constructing main UI... [1.23] main UI initialized... [1.23] Hiding splash screen [1.26] splash screen hidden [1.27] Started up in 1.27 seconds with 736 books Gather KFX-ZIP (from KFX Input) 1.17.1: Importing /Users/anil/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/My Kindle Content/B00BPW4648_EBOK/B00BPW4648_EBOK.azw Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as /var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/BO_eSn.kfx-zip DeDRM v6.6.3: Trying to decrypt BO_eSn.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Decrypting KFX-ZIP ebook: BO_eSn Got DSN key from database default_key Found 1 keys to try after 0.1 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.9e396a84-b52f-42ca-96af-aad51dd9031b.voucher DeDRM v6.6.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v6.6.3: Looking for new default Kindle Key after 0.1 seconds No k4Mac kindle-info/rainier/kinf2011 files have been found. DeDRM v6.6.3: Ultimately failed to decrypt after 0.1 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 624, in run File "calibre_plugins.dedrm.init", line 574, in KindleMobiDecrypt DeDRMError: DeDRM v6.6.3: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 1.17.1: Packaging /var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/BO_eSn.kfx-zip Processing container: B00BPW4648_EBOK.azw Running file type plugin Package KFX (from KFX Input) failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.kfx_input.package_filetype", line 21, in run File "calibre_plugins.kfx_input.package_filetype", line 33, in run_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 87, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 160, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 267, in get_container KFXDRMError: Book container B00BPW4648_EBOK.azw has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for /var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/UbSq_1_add_books/0/B00BPW4648_EBOK.kfx-zip Added An Actor Prepares to db in: 0.1 Added 1 books in 0.9 seconds Worker Launch took: 0.19052195549 Job: 0 Convert book 1 of 1 (An Actor Prepares) finished Convert book 1 of 1 (An Actor Prepares) Conversion options changed from defaults: font_size_mapping: u'7.5, 9.0, 10.0, 12.0, 15.5, 20.0, 22.0, 24.0' minimum_line_height: 125.0 verbose: 2 base_font_size: 14.0 input_profile: u'msreader' embed_font_family: u'Minion Pro' read_metadata_from_opf: u'/var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/p2yTD1.opf' cover: u'/var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/QUF48C.jpeg' embed_all_fonts: True output_profile: u'generic_eink' Resolved conversion options calibre version: 3.46.0 {'allow_conversion_with_errors': False, 'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 14.0, 'book_producer': None, 'change_justification': u'original', 'chapter': u"//[((name()='h1' or name()='h2') and re:test(., '\s((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': u'/var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/QUF48C.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': True, 'embed_font_family': u'Minion Pro', 'enable_heuristics': False, 'epub_flatten': False, 'epub_inline_toc': False, 'epub_toc_at_end': False, 'epub_version': u'2', 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': u'', 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': u'7.5, 9.0, 10.0, 12.0, 15.5, 20.0, 22.0, 24.0', 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.MSReaderInput object at 0x112ab9050>, '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': 125.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 0x112ab9290>, 'page_breaks_before': u'/', 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': u'/var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/p2yTD1.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': u'', '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': '[]', 'unsmarten_punctuation': False, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: KFX Input running on /var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/oqlNFw.kfx-zip Software versions: KFX Input 1.17.1, calibre 3.46, Darwin-18.6.0-x86_64-i386-64bit KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290 Converting /var/folders/3b/sqfn673x7978r59_bkz_bt080000gn/C/calibre_3.46.0_tmp_1rOLaz/oqlNFw.kfx-zip Processing container: B00BPW4648_EBOK.azw Traceback (most recent call last): File "calibre_plugins.kfx_input.init", line 98, in convert File "calibre_plugins.kfx_input.init", line 198, in convert_from_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 106, in convert_to_epub File "calibre_plugins.kfx_input.kfxlib.yj_book", line 160, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 267, in get_container KFXDRMError: Book container B00BPW4648_EBOK.azw has DRM and cannot be converted Python function terminated unexpectedly: This book has DRM! Traceback (most recent call last): File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 154, in main return run_entry_point() File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 114, in run_entry_point return getattr(pmod, func)() File "site-packages/calibre/utils/ipc/worker.py", line 200, in main File "site-packages/calibre/gui2/convert/gui_conversion.py", line 42, in gui_convert_override File "site-packages/calibre/gui2/convert/gui_conversion.py", line 27, in gui_convert File "site-packages/calibre/ebooks/conversion/plumber.py", line 1110, in run File "site-packages/calibre/customize/conversion.py", line 246, in call File "calibre_plugins.kfx_input.init", line 101, in convert calibre.ebooks.DRMError: This book has DRM!

ElleKayEm commented 5 years ago

KFX format books from Kindle for Mac 1.25 and later can no longer be decrypted. You can go back to 1.23 or you may be able to stick with later versions if you modify it so that it downloads books in the older format. See this post for details:

https://www.mobileread.com/forums/showthread.php?t=283371

anilKartha commented 5 years ago

Very helpful. Thanks for the clarification. I'd feared something like this was the issue.