apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.56k stars 1.52k forks source link

DRM is not being removed #2076

Closed erickcfarias closed 2 years ago

erickcfarias commented 2 years ago

Hello, I'm trying to remove the DRM from some books, which I downloaded from my Amazon content page in .azw3 format, but it's not working. Here goes further details, could you help me?

Book

OS: Zorin OS 16.1 Calibre: 5.43 Kindle: unknown DeDRM: 7.2.1

Log:

QApplication: invalid style override 'adwaita' passed, ignoring it.
    Available styles: Windows, Fusion
EpubMerge: DEBUG: 2022-06-10 15:20:24,321: calibre_plugins.epubmerge.epubmerge_plugin(158): macmenuhack file_path:/home/erickcfarias/.config/calibre/plugins/fanficfare_macmenuhack.txt
calibre Log de Debug
calibre 5.43  embedded-python: True is64bit: True
Linux-5.13.0-40-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '5.13.0-40-generic', '#45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022')
Python 3.8.5
Interface language: pt_BR
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 49, 0) && Embed Comic Metadata (1, 6, 1) && EpubMerge (2, 11, 0) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0) && Obok DeDRM (7, 2, 1)
calibre 5.43  embedded-python: True is64bit: True
Linux-5.13.0-40-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '5.13.0-40-generic', '#45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022')
Python 3.8.5
Interface language: pt_BR
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 49, 0) && Embed Comic Metadata (1, 6, 1) && EpubMerge (2, 11, 0) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0) && Obok DeDRM (7, 2, 1)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 157.8252427184466 x 157.65517241379308
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.12] splash screen shown
[0.12] Initializing db...
[0.16] db initialized
[0.16] Constructing main UI...
DEBUG:    0.0 obok::utilities.py - loading translations
DEBUG:    0.0 obok::dialogs.py - loading translations
DEBUG:    0.0 obok::config.py - loading translations
DEBUG:    0.0 obok::action_err.py - loading translations
[0.78] main UI initialized...
[0.78] Hiding splash screen
Starting QuickView
**DeDRM v7.2.1: Trying to decrypt The Return of the Prodigal Son.azw3**
Using Library AlfCrypto DLL/DYLIB/SO
Using Library AlfCrypto DLL/DYLIB/SO
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: The Return of the Prodigal Son
Found 2 keys to try after 0.0 seconds
Crypto Type is: 2
DeDRM v7.2.1: Failed to decrypt with error: No key found in 2 PIDs tried.
DeDRM v7.2.1: Looking for new default Kindle Key after 0.0 seconds
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: File not found.

DeDRM v7.2.1: wine py.exe -3 is not python3
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: File not found.

DeDRM v7.2.1: wine python3.exe is not python3
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

[22.90] splash screen hidden
[22.90] Started up in 22.90 seconds with 91 books
['zenity', '--modal', '--file-selection', '--title=Selecione livros', '--separator=\n', '--attach=44040215', '--filename=/home/erickcfarias/Desktop/.fgdfg.gdfhjdhf*&^839', '--file-filter=Livros | *.lrf *.rtf *.lit *.txt *.txtz *.text *.htm *.xhtm *.html *.htmlz *.xhtml *.pdf *.pdb *.updb *.pdr *.prc *.mobi *.azw *.doc *.epub *.fb2 *.fbz *.djv *.djvu *.lrx *.cbr *.cb7 *.cbz *.cbc *.oebzip *.rb *.imp *.odt *.chm *.tpz *.azw1 *.pml *.pmlz *.mbp *.tan *.snb *.xps *.oxps *.azw4 *.book *.zbf *.pobi *.docx *.docm *.md *.textile *.markdown *.ibook *.ibooks *.iba *.azw3 *.ps *.kepub *.kfx *.kpf *.azw8 *.kfx-zip', '--file-filter=livros EPUB | *.epub *.kepub', '--file-filter=Livros para Kindle | *.mobi *.prc *.azw *.azw3 *.kfx *.tpz *.azw1 *.azw4', '--file-filter=Livros PDF | *.pdf *.azw4', '--file-filter=Livros HTML | *.htm *.html *.xhtm *.xhtml', '--file-filter=Livros LIT | *.lit', '--file-filter=Livros TXT | *.txt *.text *.rtf *.md *.markdown *.textile *.txtz', '--file-filter=HQs | *.cbz *.cbr *.cbc', '--file-filter=Arquivos | *.zip *.rar', '--file-filter=Arquivos de processador de texto | *.odt *.doc *.docx', '--file-filter=Todos os arquivos | *', '--multiple']
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: File not found.

DeDRM v7.2.1: wine python.exe is not python3
wine: failed to open "C:\\Python27\\python.exe": c0000135
DeDRM v7.2.1: wine C:\Python27\python.exe does not exist
DeDRM v7.2.1: Unable to find python3 executable in WINEPREFIX=""
DeDRM v7.2.1: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
00d8:err:clipboard:convert_selection Timed out waiting for SelectionNotify event
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 540, in KindleMobiDecrypt
    book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
  File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook
    mb.processBook(totalpids)
  File "calibre_plugins.dedrm.mobidedrm", line 484, in processBook
    raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
calibre_plugins.dedrm.mobidedrm.DrmException: No key found in 2 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre/customize/ui.py", line 175, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 633, in run
    decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
  File "calibre_plugins.dedrm.__init__", line 583, in KindleMobiDecrypt
    raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1539, resource id: 81788931, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1540, resource id: 81788931, major code: 25 (SendEvent), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1541, resource id: 81788931, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1542, resource id: 81788931, major code: 25 (SendEvent), minor code: 0
Added The Return of the Prodigal Son to db in: 1.3
Added 1 books in 2.6 seconds
Worker Launch took: 0.05 seconds
Job: 0 Converter livro 1 de 1 (The Return of the Prodigal Son) finished
Converter livro 1 de 1 (The Return of the Prodigal Son)
    DeDRM v7.2.1: Trying to decrypt qlgx9_i0.azw3
    Using Library AlfCrypto DLL/DYLIB/SO
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v1.0.
    Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: The Return of the Prodigal Son
    Found 2 keys to try after 0.0 seconds
    Crypto Type is: 2
    DeDRM v7.2.1: Failed to decrypt with error: No key found in 2 PIDs tried.
    DeDRM v7.2.1: Looking for new default Kindle Key after 0.0 seconds
    Application could not be started, or no application associated with the specified file.
    ShellExecuteEx failed: File not found.

    DeDRM v7.2.1: wine py.exe -3 is not python3
    Application could not be started, or no application associated with the specified file.
    ShellExecuteEx failed: File not found.

    DeDRM v7.2.1: wine python3.exe is not python3
    Application could not be started, or no application associated with the specified file.
    ShellExecuteEx failed: File not found.

    DeDRM v7.2.1: wine python.exe is not python3
    wine: failed to open "C:\\Python27\\python.exe": c0000135
    DeDRM v7.2.1: wine C:\Python27\python.exe does not exist
    DeDRM v7.2.1: Unable to find python3 executable in WINEPREFIX=""
    DeDRM v7.2.1: Ultimately failed to decrypt after 0.5 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Conversion options changed from defaults:
      output_profile: 'generic_eink'
      verbose: 2
      read_metadata_from_opf: '/tmp/calibre_5.43.0_tmp_iwvjwdka/0jyxuf4p.opf'
      cover: '/tmp/calibre_5.43.0_tmp_iwvjwdka/27c7_8a5.jpeg'
    Resolved conversion options
    calibre version: 5.43.0
    {'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': '/tmp/calibre_5.43.0_tmp_iwvjwdka/27c7_8a5.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_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 0x7fc8100651f0>,
     '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 0x7fc8100654f0>,
     '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': '/tmp/calibre_5.43.0_tmp_iwvjwdka/0jyxuf4p.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}
    Running file type plugin DeDRM failed with traceback:
    Traceback (most recent call last):
      File "calibre_plugins.dedrm.__init__", line 540, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.mobidedrm", line 484, in processBook
        raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
    calibre_plugins.dedrm.mobidedrm.DrmException: No key found in 2 PIDs tried.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "calibre/customize/ui.py", line 175, in _run_filetype_plugins
      File "calibre_plugins.dedrm.__init__", line 633, in run
        decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
      File "calibre_plugins.dedrm.__init__", line 583, in KindleMobiDecrypt
        raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
    calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.5 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    DeDRM v7.2.1: Trying to decrypt qlgx9_i0.azw3
    MobiDeDrm v1.0.
    Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: The Return of the Prodigal Son
    Found 2 keys to try after 0.0 seconds
    Crypto Type is: 2
    DeDRM v7.2.1: Failed to decrypt with error: No key found in 2 PIDs tried.
    DeDRM v7.2.1: Looking for new default Kindle Key after 0.0 seconds
    Application could not be started, or no application associated with the specified file.
    ShellExecuteEx failed: File not found.

    DeDRM v7.2.1: wine py.exe -3 is not python3
    Application could not be started, or no application associated with the specified file.
    ShellExecuteEx failed: File not found.

    DeDRM v7.2.1: wine python3.exe is not python3
    Application could not be started, or no application associated with the specified file.
    ShellExecuteEx failed: File not found.

    DeDRM v7.2.1: wine python.exe is not python3
    wine: failed to open "C:\\Python27\\python.exe": c0000135
    DeDRM v7.2.1: wine C:\Python27\python.exe does not exist
    DeDRM v7.2.1: Unable to find python3 executable in WINEPREFIX=""
    DeDRM v7.2.1: Ultimately failed to decrypt after 0.5 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 "calibre_plugins.dedrm.__init__", line 540, in KindleMobiDecrypt
        book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
      File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook
        mb.processBook(totalpids)
      File "calibre_plugins.dedrm.mobidedrm", line 484, in processBook
        raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
    calibre_plugins.dedrm.mobidedrm.DrmException: No key found in 2 PIDs tried.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "calibre/customize/ui.py", line 175, in _run_filetype_plugins
      File "calibre_plugins.dedrm.__init__", line 633, in run
        decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
      File "calibre_plugins.dedrm.__init__", line 583, in KindleMobiDecrypt
        raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
    calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.5 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    InputFormatPlugin: MOBI Input running
    on /tmp/calibre_5.43.0_tmp_iwvjwdka/qlgx9_i0.azw3
    Found KF8 MOBI of type 'standalone'
    Traceback (most recent call last):
      File "runpy.py", line 194, in _run_module_as_main
      File "runpy.py", line 87, in _run_code
      File "site.py", line 45, in <module>
      File "site.py", line 41, in main
      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/ebooks/conversion/plugins/mobi_input.py", line 44, in convert
      File "calibre/ebooks/mobi/reader/mobi8.py", line 85, in __call__
      File "calibre/ebooks/mobi/reader/mobi6.py", line 162, in check_for_drm
    calibre.ebooks.DRMError: The Return of the Prodigal Son

ElleKayEm commented 2 years ago

Did you choose an E-ink Kindle (not a Fire) for the device when downloading? Do you have that Kindle's serial number entered correctly into DeDRM's customization?

erickcfarias commented 2 years ago

I re-downloaded the file and it now worked. I didn't notice there were different devices to choose from. Sorry to bother.