apprenticeharper / DeDRM_tools

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

B&N Nook file failed on DRM removal with Calibre 4.22 #1207

Open petteriusa opened 4 years ago

petteriusa commented 4 years ago

calibre Debug log calibre 4.22 [64bit] embedded-python: True is64bit: True Windows-10-10.0.20190-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.20190') Python 2.7.16+ Windows: ('10', '10.0.20190', 'SP0', u'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (6, 8, 0) calibre 4.22 [64bit] embedded-python: True is64bit: True Windows-10-10.0.20190-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.20190') Python 2.7.16+ Windows: ('10', '10.0.20190', 'SP0', u'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (6, 8, 0) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 91.8418079096 x 91.6691729323 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [0.50] splash screen shown [0.50] Initializing db... [0.50] db initialized [0.50] Constructing main UI... [1.78] main UI initialized... [1.78] Hiding splash screen [5.58] splash screen hidden [5.58] Started up in 5.58 seconds with 3 books DeDRM v6.8.0: Trying to decrypt 9780795302428.epub DeDRM v6.8.0: Verifying zip archive integrity DeDRM v6.8.0: “9780795302428.epub” is a secure Barnes & Noble ePub DeDRM v6.8.0: Looking for new NOOK Study Keys after 0.2 seconds No nook Study log files have been found. DeDRM v6.8.0: Ultimately failed to decrypt after 0.2 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 636, in run File "calibre_plugins.dedrm.init", line 305, in ePubDecrypt DeDRMError: DeDRM v6.8.0: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Added BREAKFAST OF CHAMPIONS to db in: 0.2 Added 1 books in 1.1 seconds stdout+stderr from file dialog helper: ['', ''] piped data from file dialog helper: ['\xd3\xb6\x04\xb3\xf1\xfemI\x16\xd3jq\x03\xbd\xd0c\xccND\xf1\xa1-\xba\xe5\xdc\xc6P\xb3vY(\xc4', 'C:\Users\Peter\AppData\Local\Packages\BarnesNoble.Nook_ahnzqzva31enc\LocalState\9780795302428.epub'] DeDRM v6.8.0: Trying to decrypt 9780795302428.epub DeDRM v6.8.0: Verifying zip archive integrity DeDRM v6.8.0: “9780795302428.epub” is a secure Barnes & Noble ePub DeDRM v6.8.0: Looking for new NOOK Study Keys after 0.2 seconds No nook Study log files have been found. DeDRM v6.8.0: Ultimately failed to decrypt after 0.2 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 636, in run File "calibre_plugins.dedrm.init", line 305, in ePubDecrypt DeDRMError: DeDRM v6.8.0: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Added BREAKFAST OF CHAMPIONS to db in: 0.1 Added 1 books in 1.1 seconds stdout+stderr from file dialog helper: ['', ''] Worker Launch took: 0.117999792099 Job: 0 Convert book 1 of 1 (BREAKFAST OF CHAMPIONS) finished Convert book 1 of 1 (BREAKFAST OF CHAMPIONS) Conversion options changed from defaults: output_profile: u'nook' verbose: 2 read_metadata_from_opf: u'C:\Users\Peter\AppData\Local\Temp\calibre_vhaa2e\qnp_cy.opf' Resolved conversion options calibre version: 4.22.0 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.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': None, 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'docx_custom_page_size': None, 'docx_no_cover': False, 'docx_no_toc': False, 'docx_page_margin_bottom': 72.0, 'docx_page_margin_left': 72.0, 'docx_page_margin_right': 72.0, 'docx_page_margin_top': 72.0, 'docx_page_size': u'letter', 'duplicate_links_in_toc': False, 'embed_all_fonts': False, 'embed_font_family': None, 'enable_heuristics': False, 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': u'', '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 0x00000229DF5AE848>, '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.NookOutput object at 0x00000229DF5BC488>, 'page_breaks_before': u'/', 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': u'C:\Users\Peter\AppData\Local\Temp\calibre_vhaa2e\qnp_cy.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, 'transform_css_rules': '[]', 'unsmarten_punctuation': False, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: EPUB Input running on C:\Users\Peter\AppData\Local\Temp\calibre_vhaa2e\o3eaem.epub Python function terminated unexpectedly o3eaem.epub (Error Code: 1) Traceback (most recent call last): File "site.py", line 114, in main File "site.py", line 88, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 209, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 43, in gui_convert_override File "site-packages\calibre\gui2\convert\gui_conversion.py", line 28, 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 "site-packages\calibre\ebooks\conversion\plugins\epub_input.py", line 290, in convert calibre.ebooks.DRMError: o3eaem.epub

Worker Launch took: 0.115999937057 Job: 1 Convert book 1 of 1 (BREAKFAST OF CHAMPIONS) finished Convert book 1 of 1 (BREAKFAST OF CHAMPIONS) Conversion options changed from defaults: read_metadata_from_opf: u'C:\Users\Peter\AppData\Local\Temp\calibre_vhaa2e\cowtwy.opf' verbose: 2 output_profile: u'nook' Resolved conversion options calibre version: 4.22.0 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.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': None, 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'docx_custom_page_size': None, 'docx_no_cover': False, 'docx_no_toc': False, 'docx_page_margin_bottom': 72.0, 'docx_page_margin_left': 72.0, 'docx_page_margin_right': 72.0, 'docx_page_margin_top': 72.0, 'docx_page_size': u'letter', 'duplicate_links_in_toc': False, 'embed_all_fonts': False, 'embed_font_family': None, 'enable_heuristics': False, 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': u'', '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 0x00000212430CD888>, '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.NookOutput object at 0x00000212430DB4C8>, 'page_breaks_before': u'/', 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': u'C:\Users\Peter\AppData\Local\Temp\calibre_vhaa2e\cowtwy.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, 'transform_css_rules': '[]', 'unsmarten_punctuation': False, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: EPUB Input running on C:\Users\Peter\AppData\Local\Temp\calibre_vhaa2e\gyyut7.epub Python function terminated unexpectedly gyyut7.epub (Error Code: 1) Traceback (most recent call last): File "site.py", line 114, in main File "site.py", line 88, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 209, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 43, in gui_convert_override File "site-packages\calibre\gui2\convert\gui_conversion.py", line 28, 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 "site-packages\calibre\ebooks\conversion\plugins\epub_input.py", line 290, in convert calibre.ebooks.DRMError: gyyut7.epub

ElleKayEm commented 4 years ago

Unfortunately the methods for retrieving B&N keys built into DeDRM are no longer working. There is a way to extract the key and import it into DeDRM. After that you can decrypt nookbooks. Here is a post with detailed instructions: https://www.aricrenzo.com/2019-12-13-Liberate-Your-Nook-Ebooks/

petteriusa commented 4 years ago

Ah, thank you! I'll give that a look.

perrinaz commented 4 years ago

Unfortunately the methods for retrieving B&N keys built into DeDRM are no longer working. There is a way to extract the key and import it into DeDRM. After that you can decrypt nookbooks. Here is a post with detailed instructions: https://www.aricrenzo.com/2019-12-13-Liberate-Your-Nook-Ebooks/

I can't find a way to contact the original author of that webpage you linked to. Do you know if we'll have to go through the process of importing keys each time we download new books or restart the app or under any other conditions? In other words, does the hash key change periodically?

G

ElleKayEm commented 4 years ago

From what I've seen, it rarely changes.

perrinaz commented 4 years ago

ty