Skip to content

unable to remove DRM from kobo equb #940

@nodscrim

Description

@nodscrim

Question / bug report

Hi

When I tried to remove drm,it said couldn‘t be decrypted

Which version of Calibre are you running?

8.16.2

Which version of the DeDRM plugin are you running?

v10.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 8.16.2  embedded-python: True
Windows-10-10.0.26200-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26200')
Python 3.11.14
Windows: ('10', '10.0.26200', 'SP0', 'Multiprocessor Free')
Interface language: ja
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: DeDRM (10, 0, 9) && CBZ Output (0, 0, 1) && KindleUnpack - The Plugin (0, 83, 1) && Obok DeDRM (10, 0, 9)
calibre 8.16.2  embedded-python: True
Windows-10-10.0.26200-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26200')
Python 3.11.14
Windows: ('10', '10.0.26200', 'SP0', 'Multiprocessor Free')
Interface language: ja
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: DeDRM (10, 0, 9) && CBZ Output (0, 0, 1) && KindleUnpack - The Plugin (0, 83, 1) && Obok DeDRM (10, 0, 9)
QPA platform: windows
devicePixelRatio: 1.5
logicalDpi: 96.0 x 96.0
physicalDpi: 72.62613065326633 x 72.57142857142857
[0.00] Starting up...
[0.00] Showing splash screen...
[1.17] splash screen shown
[1.17] Initializing db...
[1.20] db initialized
[1.20] 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
Using proxies: {'http': '127.0.0.1:7890', 'https': '127.0.0.1:7890', 'ftp': 'http://127.0.0.1:7890'}
[1.84] GUI main window shown
[1.88] main UI initialized...
[1.88] Hiding splash screen
[1.88] splash screen hidden
[1.88] Started up in 1.88 seconds with 210 books
Using proxies: {'http': '127.0.0.1:7890', 'https': '127.0.0.1:7890', 'ftp': 'http://127.0.0.1:7890'}
Running Obok DeDRM v10.0.9
DEBUG:    4.4 didn't find device
Obok v10.0.9
Copyright © 2012-2023 Physisticated et al.
C:\Users\tonym\AppData\Local\Temp\calibre-lrlw1hpe\tmp6heduln9
DEBUG:    4.4 got kobodir C:\Users\tonym\AppData\Local\Kobo\Kobo Desktop Edition
Found 12 possible keys to try.
DEBUG:    8.0 BookListTableWidget:get_books - book_num: 1
DEBUG:    8.0 BookListTableWidget:get_books - book: カレシがいるのに【電子単行本】 12
DEBUG:    8.0 InterfacePluginAction::launchObok - number of books to decrypt: 1
Obok DeDRM v10.0.9 - Decrypting カレシがいるのに【電子単行本】 12
Trying key:  b'e8b2c6a8fc276a774e7d0d4a87481a32'
Checking text:b'\xa3W\x85\xac\xb7\xe2d\xcf/"':
Perhaps utf-8 without BOM
Bad character at 0, value 163
Decryption failed, trying next key.
Trying key:  b'fef8bf73cfb98b94a62621bea9801542'
Checking text:b'\x99\xd0E\xd5E\xdf\xc9\x02\x17\x02':
Perhaps utf-8 without BOM
Bad character at 0, value 153
Decryption failed, trying next key.
Trying key:  b'7bc11259d577d45b8c3ff3357269a8c0'
Checking text:b'\x17D\x1ei\xe7\xc9\x02\xa4\x14\xf8':
Perhaps utf-8 without BOM
Bad character at 0, value 23
Decryption failed, trying next key.
Trying key:  b'0cc4e46dcdaa5425f50d89304e3468b2'
Checking text:b'p\xd0\xc1\xbc\x8c\x9c?\xebm\xdc':
Perhaps utf-8 without BOM
Bad character at 1, value 208
Decryption failed, trying next key.
Trying key:  b'cae3da7e4a73a1453fd9299753904bd9'
Checking text:b'm\xbf\xd1k\x0b\xb4\xb7\x8c\xb4\x9f':
Perhaps utf-8 without BOM
Bad character at 1, value 191
Decryption failed, trying next key.
Trying key:  b'727f8a0b4d8bd69ef5bb2fcca1113445'
Checking text:b'\xc7\x98%x\xbb\x95\xb0\x8b\xfd\xf0':
Perhaps utf-8 without BOM
Bad character at 0, value 199
Decryption failed, trying next key.
Trying key:  b'ca9de598359c20fdd1778382985a6298'
Checking text:b'\xf6\x8b \xfe2\x05\xce\x7fc\xcc':
Perhaps utf-8 without BOM
Bad character at 0, value 246
Decryption failed, trying next key.
Trying key:  b'5f8162fea4a7cf90c7147100c746cc90'
Checking text:b'\xc6\xa0}^|\xe6\xd6m%\x1e':
Perhaps utf-8 without BOM
Bad character at 0, value 198
Decryption failed, trying next key.
Trying key:  b'3f7e76a771d9fd73973bccfc0d6105e5'
Checking text:b'\x99\x88n\xc4\x8f\n\xce\xa9a\xa8':
Perhaps utf-8 without BOM
Bad character at 0, value 153
Decryption failed, trying next key.
Trying key:  b'19edf5a4f65866dfb3d7c9a063fbca57'
Checking text:b'k\xb1\x05P8m|\x9f"p':
Perhaps utf-8 without BOM
Bad character at 1, value 177
Decryption failed, trying next key.
Trying key:  b'3ea1623a1b0634fc6f8aef016deec70d'
Checking text:b'^\xbb~TJ+|\xb5\xf0\xd3':
Perhaps utf-8 without BOM
Bad character at 1, value 187
Decryption failed, trying next key.
Trying key:  b'978eaf0f51cc0e3824ae2729067ff424'
Checking text:b'T\x07\xb7!,\x8d\xa7R\x16\x98':
Perhaps utf-8 without BOM
Bad character at 1, value 7
Decryption failed, trying next key.
Obok DeDRM v10.0.9 - Couldn't decrypt カレシがいるのに【電子単行本】 12
DEBUG:    8.0 DecryptAddProgressDialog::do_book_action - book decryption failed: 'カレシがいるのに【電子単行本】 12'
Obok DeDRM v10.0.9 - wrapping up results.
[13.39] Shutdown starting...
[15.66] Shutdown complete, quitting...

Activity

ElleKayEm

ElleKayEm commented on Jan 3, 2026

@ElleKayEm

I've seen some people report that Obok included with DeDRM 6.8.1 installed in calibre 4.23 will work when the current versions fail.

eliranrefael

eliranrefael commented on Jan 6, 2026

@eliranrefael

happens to me to. with 1.0.0.3 and 1.0.0.9 aswell. using windows kobo desktop

eliranrefael

eliranrefael commented on Jan 6, 2026

@eliranrefael

I've seen some people report that Obok included with DeDRM 6.8.1 installed in calibre 4.23 will work when the current versions fail.

can you explain in more detail the required setup for that optional fix? Assume I'm totally new to this topic.

ElleKayEm

ElleKayEm commented on Jan 7, 2026

@ElleKayEm

I personally have no trouble with the current versions. But you would install calibre 4.23.
https://download.calibre-ebook.com/4.23.0/
And the Obok which works with that is in DeDRM release 6.8.1.
https://github.com/apprenticeharper/DeDRM_tools/releases/tag/v6.8.1
Then you would use Obok to import from Kobo Desktop (or a Kobo ereader) as usual.

If you have the current versions of calibre and regular DeDRM setup and working for another type of DRM, then do this in a different user. Or you could try calibre portable to have two versions of calibre in the same Windows user.

I make no promises of this working. I find it very odd that older versions work for some and the current versions are fine for others.

nodscrim

nodscrim commented on Jan 11, 2026

@nodscrim
Author

I personally have no trouble with the current versions. But you would install calibre 4.23. https://download.calibre-ebook.com/4.23.0/ And the Obok which works with that is in DeDRM release 6.8.1. https://github.com/apprenticeharper/DeDRM_tools/releases/tag/v6.8.1 Then you would use Obok to import from Kobo Desktop (or a Kobo ereader) as usual.

If you have the current versions of calibre and regular DeDRM setup and working for another type of DRM, then do this in a different user. Or you could try calibre portable to have two versions of calibre in the same Windows user.

I make no promises of this working. I find it very odd that older versions work for some and the current versions are fine for others.

It worked.Thank you

eliranrefael

eliranrefael commented on Jan 11, 2026

@eliranrefael

I personally have no trouble with the current versions. But you would install calibre 4.23. https://download.calibre-ebook.com/4.23.0/ And the Obok which works with that is in DeDRM release 6.8.1. https://github.com/apprenticeharper/DeDRM_tools/releases/tag/v6.8.1 Then you would use Obok to import from Kobo Desktop (or a Kobo ereader) as usual.

If you have the current versions of calibre and regular DeDRM setup and working for another type of DRM, then do this in a different user. Or you could try calibre portable to have two versions of calibre in the same Windows user.

I make no promises of this working. I find it very odd that older versions work for some and the current versions are fine for others.

that setup worked for me too

ElleKayEm

ElleKayEm commented on Jan 11, 2026

@ElleKayEm

Thanks to both of you for reporting back. Seems like some bug may have gotten into later versions. Maybe the current versions still work for me because I updated from the older versions.

poolboie

poolboie commented on Jan 20, 2026

@poolboie

It seems that obok may fail to decrypt on non-English Windows systems. Getting the MAC address via ipconfig can fail due to encoding differences, and the fallback using wmic does not return virtual adapters. As a result, decryption will fail if a virtual adapter’s address was used.

This can be fixed by adding errors='ignore' when decoding the command output. To apply this fix when using the latest version of calibre with obok, the obok.py file included in the plugin can be updated as follows:

    def __getmacaddrs (self):
        """The list of all MAC addresses on this machine."""
        macaddrs = []
        if sys.platform.startswith('win'):
            c = re.compile(r'\s?(' + '[0-9a-f]{2}[:-]' * 5 + r'[0-9a-f]{2})(\s|$)', re.IGNORECASE) 
            output = subprocess.Popen('ipconfig /all', shell=True, stdout=subprocess.PIPE, text=True, errors='ignore').stdout
            for line in output:
                m = c.search(line)
                if m:
                    macaddrs.append(re.sub("-", ":", m.group(1)).upper())
        elif sys.platform.startswith('darwin'):
MrYod

MrYod commented on Apr 15, 2026

@MrYod

It seems that obok may fail to decrypt on non-English Windows systems. Getting the MAC address via ipconfig can fail due to encoding differences, and the fallback using wmic does not return virtual adapters. As a result, decryption will fail if a virtual adapter’s address was used.

This can be fixed by adding errors='ignore' when decoding the command output. To apply this fix when using the latest version of calibre with obok, the obok.py file included in the plugin can be updated as follows:

def __getmacaddrs (self):
    """The list of all MAC addresses on this machine."""
    macaddrs = []
    if sys.platform.startswith('win'):
        c = re.compile(r'\s?(' + '[0-9a-f]{2}[:-]' * 5 + r'[0-9a-f]{2})(\s|$)', re.IGNORECASE) 
        output = subprocess.Popen('ipconfig /all', shell=True, stdout=subprocess.PIPE, text=True, errors='ignore').stdout
        for line in output:
            m = c.search(line)
            if m:
                macaddrs.append(re.sub("-", ":", m.group(1)).upper())
    elif sys.platform.startswith('darwin'):

So, basically, it gets solved just by removing the try except part?

poolboie

poolboie commented on Apr 16, 2026

@poolboie

@MrYod No, the necessary fix is this single line:

- output = subprocess.Popen('ipconfig /all', shell=True, stdout=subprocess.PIPE, text=True).stdout
+ output = subprocess.Popen('ipconfig /all', shell=True, stdout=subprocess.PIPE, text=True, errors='ignore').stdout

The fallback in the except block doesn’t affect the behavior, so it doesn’t need to be removed. However, since wmic is deprecated in recent versions of Windows, I would recommend removing it.

MrYod

MrYod commented on Apr 16, 2026

@MrYod

@poolboie Great: works perfectly. \^o^/🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ElleKayEm@eliranrefael@MrYod@nodscrim@poolboie

        Issue actions