noDRM / DeDRM_tools

DeDRM tools for ebooks
7.34k stars 323 forks source link

Fail to remove drm wtih Obok with Calibre and Kobo desktop app #552

Open lavius opened 6 months ago

lavius commented 6 months ago

Question / bug report

If I use obok with Calibre, it can't remove drm.

image

btw, But I usually use obok.py directly. It can work normally with python-3.10 and PyCryptodome. Although it has some minor issues, such as overwriting files with the same name if some books have same name. image image

Which version of Calibre are you running?

7.11

Which version of the DeDRM plugin are you running?

10.0.9

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

No response

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
ApplicationPaletteChange event received
calibre 偵錯記錄
calibre 7.11 Portable embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.11.5
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: zh_TW
EXE path: C:\Users\Clavius\Desktop\Calibre Portable\Calibre\calibre-debug.exe
Successfully initialized third party plugins: Obok DeDRM (10, 0, 9)
calibre 7.11 Portable embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.11.5
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: zh_TW
EXE path: C:\Users\Clavius\Desktop\Calibre Portable\Calibre\calibre-debug.exe
Successfully initialized third party plugins: Obok DeDRM (10, 0, 9)
QPA platform: windows
devicePixelRatio: 1.5
logicalDpi: 96.0 x 96.0
physicalDpi: 108.73578595317724 x 108.85714285714285
[0.00] Starting up...
[0.00] Showing splash screen...
[0.34] splash screen shown
[0.34] Initializing db...
[0.34] db initialized
[0.34] 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.56] GUI main window shown
[0.61] main UI initialized...
[0.61] Hiding splash screen
[5.28] splash screen hidden
[5.28] Started up in 5.28 seconds with 1 books
Running Obok DeDRM v10.0.9
DEBUG:   85.2 didn't find device
Obok v10.0.9
Copyright © 2012-2023 Physisticated et al.
C:\Users\Clavius\AppData\Local\Temp\tmpnths39i3
DEBUG:   85.2 got kobodir C:\Users\Clavius\AppData\Local\Kobo\Kobo Desktop Edition
Found 12 possible keys to try.
DEBUG:   87.5 BookListTableWidget:get_books - book_num: 0
DEBUG:   87.5 BookListTableWidget:get_books - book: 出租女友 (30)
DEBUG:   87.5 BookListTableWidget:get_books - book_num: 1
DEBUG:   87.5 BookListTableWidget:get_books - book: 死神少爺與黑女僕6
DEBUG:   87.5 InterfacePluginAction::launchObok - number of books to decrypt: 2
Obok DeDRM v10.0.9 - Decrypting 出租女友 (30)
Trying key:  b'1d51b69508ae8b05ab68b4e4cb10465e'
Checking text:b'\xab9\x9fza\xa9\x00>\xa7\x1a':
Perhaps utf-8 without BOM
Bad character at 0, value 171
Decryption failed, trying next key.
Trying key:  b'a3e7f95f119595f17dfa69001a753f70'
Checking text:b'"\xd3&?\xb1\xce\xedf\xa6M':
Perhaps utf-8 without BOM
Bad character at 1, value 211
Decryption failed, trying next key.
Trying key:  b'a76091b118f2d479b8f40ccac7f6292b'
Checking text:b'\xe8\xc6tb\xf8)\xbb\x0cZ\xa0':
Perhaps utf-8 without BOM
Bad character at 0, value 232
Decryption failed, trying next key.
Trying key:  b'80a7d14c49935b5c623563f0438b9d7c'
Checking text:b'\x81\x1eT\xdb\xb2\x1d\xb76PA':
Perhaps utf-8 without BOM
Bad character at 0, value 129
Decryption failed, trying next key.
Trying key:  b'5f1b56d083cfb95799a4aaa0efa384e3'
Checking text:b'W6\x89$\x9b\x14|\x95\xaa?':
Perhaps utf-8 without BOM
Bad character at 2, value 137
Decryption failed, trying next key.
Trying key:  b'0cba996a8a2308b041b768b12eb14a8c'
Checking text:b'\x1bT\xae9\xf8\xfb\x10\xf3\x8e\xf0':
Perhaps utf-8 without BOM
Bad character at 0, value 27
Decryption failed, trying next key.
Trying key:  b'a04ec182e942e9d3640e5773db6ac367'
Checking text:b'\x8f\xf3\xdbdP+\x8a\xe8\x17\xcc':
Perhaps utf-8 without BOM
Bad character at 0, value 143
Decryption failed, trying next key.
Trying key:  b'7520cc748624b5ad48a91d363459afd5'
Checking text:b't\xe8P\xa4V\xb6\x17\x16\x88`':
Perhaps utf-8 without BOM
Bad character at 1, value 232
Decryption failed, trying next key.
Trying key:  b'66163922aae3c955ba092327711730fd'
Checking text:b'#\xbcZ \x9eM-\xd8\x85)':
Perhaps utf-8 without BOM
Bad character at 1, value 188
Decryption failed, trying next key.
Trying key:  b'88b111e667af624688a110de3c82453b'
Checking text:b':,\xff\xe0\x80\xe6\xc1\x1f\x9f\x0c':
Perhaps utf-8 without BOM
Bad character at 2, value 255
Decryption failed, trying next key.
Trying key:  b'01856b2fe86f46ad31a6148c7b628f3a'
Checking text:b'q{_w\xba:\x06^g.':
Perhaps utf-8 without BOM
Bad character at 4, value 186
Decryption failed, trying next key.
Trying key:  b'2e50abfda28fb913246da702251fc57a'
Checking text:b'\xf7\x01\x04\x14\x84\xa5Jm\x9fR':
Perhaps utf-8 without BOM
Bad character at 0, value 247
Decryption failed, trying next key.
Obok DeDRM v10.0.9 - Couldn't decrypt 出租女友 (30)
DEBUG:   87.5 DecryptAddProgressDialog::do_book_action - book decryption failed: '出租女友 (30)'
Obok DeDRM v10.0.9 - Decrypting 死神少爺與黑女僕6
Trying key:  b'1d51b69508ae8b05ab68b4e4cb10465e'
Checking text:b'q\xdc\x89\x0by)\xbbB5\xf4':
Perhaps utf-8 without BOM
Bad character at 1, value 220
Decryption failed, trying next key.
Trying key:  b'a3e7f95f119595f17dfa69001a753f70'
Checking text:b'\x8c\xe9K\xff{\xfc\xb4%\xcf\x03':
Perhaps utf-8 without BOM
Bad character at 0, value 140
Decryption failed, trying next key.
Trying key:  b'a76091b118f2d479b8f40ccac7f6292b'
Checking text:b'\x9eyn^\xff\xae\x9d\xeb_\xdd':
Perhaps utf-8 without BOM
Bad character at 0, value 158
Decryption failed, trying next key.
Trying key:  b'80a7d14c49935b5c623563f0438b9d7c'
Checking text:b'\x05\xfc=O\x08\x9f*.\xdc\x86':
Perhaps utf-8 without BOM
Bad character at 0, value 5
Decryption failed, trying next key.
Trying key:  b'5f1b56d083cfb95799a4aaa0efa384e3'
Checking text:b'"H\x8d8\xc4\x05`ql\x86':
Perhaps utf-8 without BOM
Bad character at 2, value 141
Decryption failed, trying next key.
Trying key:  b'0cba996a8a2308b041b768b12eb14a8c'
Checking text:b'\x9a!\x08\x82aK6\x90\x1fE':
Perhaps utf-8 without BOM
Bad character at 0, value 154
Decryption failed, trying next key.
Trying key:  b'a04ec182e942e9d3640e5773db6ac367'
Checking text:b'\x92\xbc\xbe\xea\x9c0\x10\xac\xe2\xdd':
Perhaps utf-8 without BOM
Bad character at 0, value 146
Decryption failed, trying next key.
Trying key:  b'7520cc748624b5ad48a91d363459afd5'
Checking text:b"\x1d/[\xb0\x88\xe4\xfb'\xf7f":
Perhaps utf-8 without BOM
Bad character at 0, value 29
Decryption failed, trying next key.
Trying key:  b'66163922aae3c955ba092327711730fd'
Checking text:b'\xf2\xd1-\x08N\x88\x04jv\x02':
Perhaps utf-8 without BOM
Bad character at 0, value 242
Decryption failed, trying next key.
Trying key:  b'88b111e667af624688a110de3c82453b'
Checking text:b'\xd2\xf6\x00\xa8\x85\xed\x89Gr\xd6':
Perhaps utf-8 without BOM
Bad character at 0, value 210
Decryption failed, trying next key.
Trying key:  b'01856b2fe86f46ad31a6148c7b628f3a'
Checking text:b'\xd7?\x98\x84\xb1\x10\x8b\xaa\x88\x02':
Perhaps utf-8 without BOM
Bad character at 0, value 215
Decryption failed, trying next key.
Trying key:  b'2e50abfda28fb913246da702251fc57a'
Checking text:b'3\x06\xa0L\xfbo\x0f*\x80\xae':
Perhaps utf-8 without BOM
Bad character at 1, value 6
Decryption failed, trying next key.
Obok DeDRM v10.0.9 - Couldn't decrypt 死神少爺與黑女僕6
DEBUG:   87.6 DecryptAddProgressDialog::do_book_action - book decryption failed: '死神少爺與黑女僕6'
Obok DeDRM v10.0.9 - wrapping up results.
Running Obok DeDRM v10.0.9
DEBUG:  102.7 didn't find device
Obok v10.0.9
Copyright © 2012-2023 Physisticated et al.
C:\Users\Clavius\AppData\Local\Temp\tmp285yzz_i
DEBUG:  102.7 got kobodir C:\Users\Clavius\AppData\Local\Kobo\Kobo Desktop Edition
Found 12 possible keys to try.
DEBUG:  104.8 BookListTableWidget:get_books - book_num: 0
DEBUG:  104.8 BookListTableWidget:get_books - book: 出租女友 (30)
DEBUG:  104.8 InterfacePluginAction::launchObok - number of books to decrypt: 1
Obok DeDRM v10.0.9 - Decrypting 出租女友 (30)
Trying key:  b'1d51b69508ae8b05ab68b4e4cb10465e'
Checking text:b'\xab9\x9fza\xa9\x00>\xa7\x1a':
Perhaps utf-8 without BOM
Bad character at 0, value 171
Decryption failed, trying next key.
Trying key:  b'a3e7f95f119595f17dfa69001a753f70'
Checking text:b'"\xd3&?\xb1\xce\xedf\xa6M':
Perhaps utf-8 without BOM
Bad character at 1, value 211
Decryption failed, trying next key.
Trying key:  b'a76091b118f2d479b8f40ccac7f6292b'
Checking text:b'\xe8\xc6tb\xf8)\xbb\x0cZ\xa0':
Perhaps utf-8 without BOM
Bad character at 0, value 232
Decryption failed, trying next key.
Trying key:  b'80a7d14c49935b5c623563f0438b9d7c'
Checking text:b'\x81\x1eT\xdb\xb2\x1d\xb76PA':
Perhaps utf-8 without BOM
Bad character at 0, value 129
Decryption failed, trying next key.
Trying key:  b'5f1b56d083cfb95799a4aaa0efa384e3'
Checking text:b'W6\x89$\x9b\x14|\x95\xaa?':
Perhaps utf-8 without BOM
Bad character at 2, value 137
Decryption failed, trying next key.
Trying key:  b'0cba996a8a2308b041b768b12eb14a8c'
Checking text:b'\x1bT\xae9\xf8\xfb\x10\xf3\x8e\xf0':
Perhaps utf-8 without BOM
Bad character at 0, value 27
Decryption failed, trying next key.
Trying key:  b'a04ec182e942e9d3640e5773db6ac367'
Checking text:b'\x8f\xf3\xdbdP+\x8a\xe8\x17\xcc':
Perhaps utf-8 without BOM
Bad character at 0, value 143
Decryption failed, trying next key.
Trying key:  b'7520cc748624b5ad48a91d363459afd5'
Checking text:b't\xe8P\xa4V\xb6\x17\x16\x88`':
Perhaps utf-8 without BOM
Bad character at 1, value 232
Decryption failed, trying next key.
Trying key:  b'66163922aae3c955ba092327711730fd'
Checking text:b'#\xbcZ \x9eM-\xd8\x85)':
Perhaps utf-8 without BOM
Bad character at 1, value 188
Decryption failed, trying next key.
Trying key:  b'88b111e667af624688a110de3c82453b'
oremio commented 2 days ago

Same problem. And running obok.py directly works for me too.

ElleKayEm commented 2 days ago

I find closing Kobo Desktop before using Obok in calibre works.