apprenticeharper / DeDRM_tools

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

Can't decrypt ePub-eBooks on Ubuntu #1750

Open tomasmueller opened 3 years ago

tomasmueller commented 3 years ago

Calibre: 5.21.0

DeDRM: 7.1.0

I have downloaded the ePub-eBook using Adobe Digital 2.0.1 on Windows and imported the eBook in Calibre on Ubuntu 20.04. The Books (and all other Books) could not been decrypted. In the log there is a Path to Python, but its a Windows path. I don't unterstand why. On Linux Python3 in installed.

Log

EpubMerge: DEBUG: 2021-06-27 09:04:28,039: calibre_plugins.epubmerge.epubmerge_plugin(158): macmenuhack file_path:/home/user/.config/calibre/plugins/fanficfare_macmenuhack.txt
calibre Fehlerdiagnoseprotokoll
calibre 5.21  embedded-python: True is64bit: True
Linux-5.4.0-74-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '5.4.0-74-generic', '#83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021')
Python 3.8.5
Interface language: de
Successfully initialized third party plugins: DeDRM (7, 1, 0) && Diaps Editing Toolbag (0, 3, 6) && EpubMerge (2, 11, 0) && Modify ePub (1, 6, 2)
calibre 5.21  embedded-python: True is64bit: True
Linux-5.4.0-74-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '5.4.0-74-generic', '#83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021')
Python 3.8.5
Interface language: de
Successfully initialized third party plugins: DeDRM (7, 1, 0) && Diaps Editing Toolbag (0, 3, 6) && EpubMerge (2, 11, 0) && Modify ePub (1, 6, 2)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 93.6046065259117 x 93.62457337883959
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.08] splash screen shown
[0.08] Initializing db...
[0.10] db initialized
[0.10] Constructing main UI...
Looking for desktop notifier support from: org.freedesktop.Notifications
org.freedesktop.Notifications found in 0.0 seconds
[0.79] main UI initialized...
[0.79] Hiding splash screen
Starting QuickView
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2292, resource id: 11613957, major code: 40 (TranslateCoords), minor code: 0
DeDRM v7.1.0: Trying to decrypt Abenteurer der Ferne - Raimund Schulz.epub
DeDRM v7.1.0: Verifying zip archive integrity
DeDRM v7.1.0: Abenteurer der Ferne - Raimund Schulz.epub is a secure Adobe Adept ePub
DeDRM v7.1.0: Looking for new default Adobe Digital Editions Keys after 0.1 seconds
0034:err:module:__wine_process_init L"C:\\windows\\system32\\winemenubuilder.exe" not found
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
0058:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
0058:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
0064:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
[12.13] splash screen hidden
[12.13] Started up in 12.13 seconds with 0 books
['zenity', '--modal', '--file-selection', '--title=Bücher auswählen', '--separator=\n', '--attach=81788951', '--filename=/media/data/.fgdfg.gdfhjdhf*&^839', '--file-filter=Bücher | *.lrf *.rar *.zip *.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', '--file-filter=EPUB-Bücher | *.epub *.kepub', '--file-filter=Kindle-Bücher | *.mobi *.prc *.azw *.azw3 *.kfx *.tpz *.azw1 *.azw4', '--file-filter=PDF-Bücher | *.pdf *.azw4', '--file-filter=HTML-Bücher | *.htm *.html *.xhtm *.xhtml', '--file-filter=LIT-Bücher | *.lit', '--file-filter=Text-Bücher | *.txt *.text *.rtf *.md *.markdown *.textile *.txtz', '--file-filter=Comics | *.cbz *.cbr *.cbc', '--file-filter=Archive | *.zip *.rar', '--file-filter=Textverarbeitungsdateien | *.odt *.doc *.docx', '--file-filter=Alle Dateien | *', '--multiple']
0064:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
0064:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
0064:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
0024:err:module:__wine_process_init L"C:\\windows\\system32\\py.exe" not found
DeDRM v7.1.0: wine py.exe -3 does not exist
00b4:err:module:__wine_process_init L"C:\\windows\\system32\\python3.exe" not found
DeDRM v7.1.0: wine python3.exe does not exist
00bc:err:module:__wine_process_init L"C:\\windows\\system32\\python.exe" not found
DeDRM v7.1.0: wine python.exe does not exist
wine: cannot find 'C:\Python27\python.exe'
DeDRM v7.1.0: Python3 exec found as wine C:\Python27\python.exe
DeDRM v7.1.0: Running adobekey.py under Wine
wine: cannot find 'C:\Python27\python.exe'
DeDRM v7.1.0: Found and decrypted 0 key files
DeDRM v7.1.0: Exception when getting default Adobe Key after 1.5 seconds
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 363, in ePubDecrypt
    self.default_key = defaultkeys[0]
IndexError: list index out of range
DeDRM v7.1.0: Ultimately failed to decrypt after 1.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/customize/ui.py", line 176, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 642, in run
    decrypted_ebook = self.ePubDecrypt(path_to_ebook)
  File "calibre_plugins.dedrm.__init__", line 413, in ePubDecrypt
    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.1.0: Ultimately failed to decrypt after 1.5 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Added Abenteurer der Ferne to db in: 0.1
Added 1 books in 1.9 seconds
Worker Launch took: 0.01 seconds
ElleKayEm commented 3 years ago

DeDRM isn't able to grab the key from ADE. You could try running adobekey.py manually and importing the key. Or it may be easier to temporarily install Windows calibre with DeDRM where you have ADE installed. If you successfully DeDRM a book there and save the key, then you can import the key into Linux calibre's DeDRM customization.

tomasmueller commented 3 years ago

I have no windows installed anymore but a windows 7 in a virtual machine. but calibre isn't running on windows 7. i will try to install an newer windows and test it.

is there no way to extract the adobekey manually? ADE is running on windows 7.

do you mean running the adobekey.py on linux? where can i find the file?

ElleKayEm commented 3 years ago

You could use calibre 3.48 and DeDRM 6.8.1. No, I mean running adobekey where you have ADE installed. It's one of the scripts in the DeDRM plugin. But the Windows calibre/dedrm workaround avoids needing Python and whatever else installed in the virtual machine to run adobekey.

ivan-m commented 3 years ago

When the DeDRM plugin detects that it's running in Linux it will assume that you have Adobe installed in Wine to get the extraction key.

You can try my Ansible script to install and configure Adobe DE in Wine for Calibre: https://github.com/ivan-m/ansible-dedrm-wine/