apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.52k stars 1.51k forks source link

Calibre 5.26 Unable to decrypt AZW files #1836

Open 2020MacOwner opened 3 years ago

2020MacOwner commented 3 years ago

Unable to decrypt AZW files.

Environment: Kindle version: 1.17 Calibre version: attempted both 5.24 and 5.26 Mac version: Big Sur 11.5.2 DRM Tools version: 7.2.1

ElleKayEm commented 3 years ago

Answered here: https://github.com/apprenticeharper/DeDRM_tools/issues/1806#issuecomment-913839578

If that still doesn't help, post a log: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-cannot-solve-my-problem-with-the-dedrm-plugin-and-now-i-need-to-post-a-log-how-do-i-do-that

deirdrew commented 3 years ago

Same, AZW books now keep DRM :(

ElleKayEm commented 3 years ago

@deirdrew Same answer. Look at this: https://www.mobileread.com/forums/showthread.php?s=5ea46a751d2e1add30811d95537a9d5a&t=283371

and this: https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508

Post a log if you're still having trouble.

deirdrew commented 3 years ago

Neither applies. This is something new on Amazon's end that just started. Even my Kindle for PC v. 1.11.0 (circa 2015), let alone v 1.17

From: ElleKayEm @.> Sent: Wednesday, September 8, 2021 8:04 PM To: apprenticeharper/DeDRM_tools @.> Cc: deirdrew @.>; Mention @.> Subject: Re: [apprenticeharper/DeDRM_tools] Calibre 5.26 Unable to decrypt AZW files (#1836)

@deirdrew https://github.com/deirdrew Same answer. Look at this: https://www.mobileread.com/forums/showthread.php?s=5ea46a751d2e1add30811d955 37a9d5a https://www.mobileread.com/forums/showthread.php?s=5ea46a751d2e1add30811d95 537a9d5a&t=283371 &t=283371

and this: https://www.mobileread.com/forums/showpost.php?p=3819708 https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508 &postcount=508

Post a log if you're still having trouble.

- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apprenticeharper/DeDRM_tools/issues/1836#issuecomment-91 5653100 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANSCDYKRNA2BAQRNENRALV3UA 72XFANCNFSM5DQ6SICA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&m t=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=u tm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/ANSCDYPIX5KBLQNESD3PPK3UA72XFA5CNFS M5DQ6SICKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG2J4D3A .gif

ElleKayEm commented 3 years ago

Let's take a look at a debug log.

TheBloke commented 3 years ago

Hi, I am having the same problem. This is the first time I've tried the plugin.

I'll put the log at the end.

I am on Big Sur 11.5.2. I've installed Kindle 1.3.1, and followed the chmod -x step. I downloaded the book in the Kindle app using File->Download and did not open it in the Kindle app.

In the My Kindle Content folder, I see an AZW with no KCR: image

But importing this into Calibre and then trying to open or Convert Book always shows the DRM error.

I've tried Calibre 5.27 and also downgraded to try 5.20. I've read the MobileRead threads and think I've done everything mentioned.

I tried manually adding a 'default_key' in the 'Kindle for Mac/PC ebooks'.

Let me know if I can give any more details. Thanks for all your work on this plugin.

Here's the job conversion log:

Convert book 1 of 1 (Eternal Boy)
DeDRM v7.2.1: Trying to decrypt 5pq6zhgj.azw
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: Eternal Boy
Got SerialNumber from database default_key
Got UsernameHash from database default_key
Found 4 keys to try after 0.1 seconds
Crypto Type is: 2
DeDRM v7.2.1: Failed to decrypt with error: No key found in 4 PIDs tried.
DeDRM v7.2.1: Looking for new default Kindle Key after 0.1 seconds
Found k4Mac kinf2018 file: /Users/tomj/Library/Application Support/Kindle/storage/.kinf2018
trying username  b'tomj'  on file  /Users/tomj/Library/Application Support/Kindle/storage/.kinf2018
trying IDString: b'118b3c8d03ef'
Decrypted key file using IDString '118b3c8d03ef' and UserName 'tomj'
DeDRM v7.2.1: Ultimately failed to decrypt after 0.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Conversion options changed from defaults:
  verbose: 2
  cover: '/var/folders/9d/mgvhfgrn5wj_c1m8fgjqjbbr0000gn/C/calibre_5.20.0_tmp_g88e0mz0/x7i171hf.jpeg'
  read_metadata_from_opf: '/var/folders/9d/mgvhfgrn5wj_c1m8fgjqjbbr0000gn/C/calibre_5.20.0_tmp_g88e0mz0/dv56zr7z.opf'
Resolved conversion options
calibre version: 5.20.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': '/var/folders/9d/mgvhfgrn5wj_c1m8fgjqjbbr0000gn/C/calibre_5.20.0_tmp_g88e0mz0/x7i171hf.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 0x1251c8eb0>,
 '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.OutputProfile object at 0x1251cb1c0>,
 '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': '/var/folders/9d/mgvhfgrn5wj_c1m8fgjqjbbr0000gn/C/calibre_5.20.0_tmp_g88e0mz0/dv56zr7z.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': '[]',
 '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 4 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre/customize/ui.py", line 176, 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.4 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 5pq6zhgj.azw
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: Eternal Boy
Got SerialNumber from database default_key
Got UsernameHash from database default_key
Found 4 keys to try after 0.0 seconds
Crypto Type is: 2
DeDRM v7.2.1: Failed to decrypt with error: No key found in 4 PIDs tried.
DeDRM v7.2.1: Looking for new default Kindle Key after 0.0 seconds
Found k4Mac kinf2018 file: /Users/tomj/Library/Application Support/Kindle/storage/.kinf2018
trying username  b'tomj'  on file  /Users/tomj/Library/Application Support/Kindle/storage/.kinf2018
trying IDString: b'118b3c8d03ef'
Decrypted key file using IDString '118b3c8d03ef' and UserName 'tomj'
DeDRM v7.2.1: Ultimately failed to decrypt after 0.4 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 4 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre/customize/ui.py", line 176, 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.4 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
InputFormatPlugin: MOBI Input running
on /var/folders/9d/mgvhfgrn5wj_c1m8fgjqjbbr0000gn/C/calibre_5.20.0_tmp_g88e0mz0/5pq6zhgj.azw
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 39, in <module>
  File "site.py", line 35, in main
  File "calibre/utils/ipc/worker.py", line 216, in main
  File "calibre/gui2/convert/gui_conversion.py", line 41, in gui_convert_override
  File "calibre/gui2/convert/gui_conversion.py", line 28, in gui_convert
  File "calibre/ebooks/conversion/plumber.py", line 1105, in run
  File "calibre/customize/conversion.py", line 245, in __call__
  File "calibre/ebooks/conversion/plugins/mobi_input.py", line 47, in convert
  File "calibre/ebooks/mobi/reader/mobi8.py", line 86, in __call__
  File "calibre/ebooks/mobi/reader/mobi6.py", line 158, in check_for_drm
calibre.ebooks.DRMError: Eternal Boy
ElleKayEm commented 3 years ago

@TheBloke I've seen many Mac users have trouble with fresh installs of DeDRM 7.2.1. Try installing calibre 4.23 and DeDRM 6.8.1. If you get things working with those versions, you should be able to return to the current versions.

TheBloke commented 3 years ago

OK thanks very much for the fast reply. I'll try that now.

Do you know if I can safely downgrade Calibre from 5.20 to 4.23 on the same DB with no issues?

EDIT: Don't worry, I'll just back up my Calibre library first. It's probably fine anyway.

TheBloke commented 3 years ago

You were right! Worked first time in 4.23 with 6.8.1.

Thanks so much for the super fast advice. I'll try updating back to 5.27 later. TBH I barely use any of Calibre's features anyway besides syncing books to an iPad running Marvin, so I doubt I'd even notice a difference in the earlier version.

Thanks again.

ElleKayEm commented 3 years ago

Yes, as far as I'm aware, calibre 4.23 (the last Python 2 version) is compatible with a calibre 5.x database. You just don't want to go back any earlier than that.

ElleKayEm commented 3 years ago

Glad it worked! The main thing is that calibre 4.23 and DeDRM 6.8.1 are Python 2 while calibre 5.x and DeDRM 7.x are Python 3. So there are still some bugs in DeDRM from that conversion.

TheBloke commented 3 years ago

OK makes sense, thank you again.

Kizan commented 3 years ago

Having same issue. Figured I'd leave the log.

calibre Debug log
calibre 5.27 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Obok DeDRM (7, 2, 1)
calibre 5.27 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Obok DeDRM (7, 2, 1)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 96.0175824175824 x 95.97638376383763
Using calibre Qt style: True
[0.00] Starting up...
[0.02] Showing splash screen...
[0.72] splash screen shown
[0.72] Initializing db...
[0.72] db initialized
[0.72] 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
[1.53] main UI initialized...
[1.53] Hiding splash screen
Starting QuickView
DeDRM v7.2.1: Trying to decrypt B00EENETCE_EBOK.azw
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: SAGE Handbook of Mixed Methods in Social & Behavioral Research
Got DSN key from database default_key
Found 4 keys to try after 0.2 seconds
Crypto Type is: 2
DeDRM v7.2.1: Failed to decrypt with error: Cannot decode library or rented ebooks.
DeDRM v7.2.1: Looking for new default Kindle Key after 0.2 seconds
searching for kinfoFiles in C:\Users\bowie\AppData\Local
Found K4PC 1.9+ kinf2011 file: C:\Users\bowie\AppData\Local\Amazon\Kindle\storage\.kinf2011
Decrypted key file using IDString '3397884941' and UserName 'bowie'
DeDRM v7.2.1: Found 1 new key
MobiDeDrm v1.0.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: SAGE Handbook of Mixed Methods in Social & Behavioral Research
Got DSN key from database default_key_1
Found 4 keys to try after 0.3 seconds
Crypto Type is: 2
DeDRM v7.2.1: Ultimately failed to decrypt after 0.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
[87.61] splash screen hidden
[87.61] Started up in 87.61 seconds with 0 books
Added SAGE Handbook of Mixed Methods in Social & Behavioral Research to db in: 0.3
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 540, in KindleMobiDecrypt
  File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook
  File "calibre_plugins.dedrm.mobidedrm", line 449, in processBook
calibre_plugins.dedrm.mobidedrm.DrmException: Cannot decode library or rented ebooks.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 176, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 633, in run
  File "calibre_plugins.dedrm.__init__", line 583, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_toolsAdded 1 books in 1.0 seconds
ElleKayEm commented 3 years ago

@Kizan This is why yours isn't working:

DeDRM v7.2.1: Failed to decrypt with error: Cannot decode library or rented ebooks.

Kizan commented 3 years ago

I did see that error, but I've not had an issue decoding rented books in the past. Is this a new limitation or just one that I haven't run into before?

Thanks for your time,

Kizan

Kizan commented 3 years ago

I just re-read the FAQs and the limitation is in there. Sorry to bother you!

Doug

mercertom commented 3 years ago

Tried using 4.23 and 6.8.1, but also 5.27 and 7.2.1.

Added XXX.azw to db in: 0.1 Added 1 books in 3.6 seconds stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'Xa\xdc\xcf`~^2\xa3v\xbaE\x12\xa2\r\xdb\x90Et\xb6\xe3\xf1\xa4\xa6\xe7s\xde\xf6\xbc\xc5\rV', b'C:\Users\tom\Downloads\DeDRM_tools_7.2.1\DeDRM_plugin.zip']

However, the author is unknown and it's not readable.

This worked about a month ago with whatever version of calibre and dedrm that would have been. Perhaps the update of calibre broke this, perhaps it's new Amazon thing, perhaps I'm a dunce.

Kindle is 1.17.

ElleKayEm commented 3 years ago

@mercertom Let's see the whole log.

mercertom commented 3 years ago

calibre Debug log calibre 5.27 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 42, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 42, 0) && KFX metadata reader (from KFX Input) (1, 42, 0) && KFX Input (1, 42, 0) calibre 5.27 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 42, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 42, 0) && KFX metadata reader (from KFX Input) (1, 42, 0) && KFX Input (1, 42, 0) 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.50] splash screen shown [0.50] Initializing db... [0.50] db initialized [0.50] Constructing main UI... [1.00] main UI initialized... [1.00] Hiding splash screen Starting QuickView [5.66] splash screen hidden [5.66] Started up in 5.66 seconds with 2 books Added XYZ.azw to db in: 0.1 Added 1 books in 3.7 seconds

Originally I didn't use KFX input plugin, but read in some places that it might help, so this run is with it. I've tried both 4.23/6.8.1 and 5.27/7.2.1, to the same result.

ElleKayEm commented 3 years ago

DeDRM never even does anything here. Is it enabled?

mercertom commented 3 years ago

Yes. I disabled and reenabled it while looking for possible reasons it doesn't work.

On Tue, Sep 14, 2021, 06:17 ElleKayEm @.***> wrote:

DeDRM never even does anything here. Is it enabled?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apprenticeharper/DeDRM_tools/issues/1836#issuecomment-919094508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACO7R3BNI3GKGV2IATFN3SLUB44NTANCNFSM5DQ6SICA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ElleKayEm commented 3 years ago

It certainly appears to still be disabled for that log. Can't tell what is wrong if DeDRM never even tries to decrypt the book.

mercertom commented 3 years ago

Ok, well that's exactly what's failing then. I just disabled/re-enabled and same result. Is 7.2.1 not compatible with 5.27? The answer is probably not going to be found in the log.

mercertom commented 3 years ago

It takes a long time as if it's doing the process, but then it doesn't decrypt the .azw. I've tried the BOK file, the .azw file, and several others. Pretty sure about a month ago when it worked, I just imported the .azw file.

ElleKayEm commented 3 years ago

The log will show if it's working on it. This is acting as if DeDRM is still disabled or as if this is not an ebook file.

mercertom commented 3 years ago

Yes. As I said, that's the problem. How can we fix this? I tried disabling/re-enabling. Is 7.2.1 compatible with 5.27?

On Tue, Sep 14, 2021, 11:05 ElleKayEm @.***> wrote:

The log will show if it's working on it. This is acting as if DeDRM is still disabled or as if this is not an ebook file.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apprenticeharper/DeDRM_tools/issues/1836#issuecomment-919344233, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACO7R3HLRHBSMCJLPQRT7YDUB56FJANCNFSM5DQ6SICA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ElleKayEm commented 3 years ago

Yes, it's working fine for me.

mercertom commented 3 years ago

Have you downloaded an Amazon book today/yesterday? Did you upload the .azw or another file?

On Tue, Sep 14, 2021, 12:33 ElleKayEm @.***> wrote:

Yes, it's working fine for me.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apprenticeharper/DeDRM_tools/issues/1836#issuecomment-919413223, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACO7R3BXOL3FXYFJAN6WVG3UB6IRBANCNFSM5DQ6SICA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mercertom commented 3 years ago

@ElleKayEm also, is your python 3.8.5?

kendoori commented 3 years ago

Also having the same issues on Windows 10 with the latest 7.21 and 5.27. I downgraded to 4.23 and 6.8.1 and same issue. image

Here's the log.

tmpcxp6kw.txt

I was using my wife's machine as these books were tied to her account. Just as an experiment, I downloaded some content on my machine (Linux Mint, with 5.18 and DeDRM 7.00). My books decrypted with no issue on Linux.

kendoori commented 3 years ago

Also having the same issues on Windows 10 with the latest 7.21 and 5.27. I downgraded to 4.23 and 6.8.1 and same issue. image

Here's the log.

tmpcxp6kw.txt

I was using my wife's machine as these books were tied to her account. Just as an experiment, I downloaded some content on my machine (Linux Mint, with 5.18 and DeDRM 7.00). My books decrypted with no issue on Linux.

I just took the same books that wouldn't decrypt on my wife's Windows machine and moved them to my Linux box, added her Kindle serial # to the plugin and was able to successfully strip DRM from them. I wonder what voodo is going on here.

tool3884 commented 3 years ago

My last post disappeared so sorry if this ends up being a duplicate.

I can no longer remove DRM from azw3 files from books I purchase on Amazon. I am using Calibre 5.27 and DeDRM 7.2.1. I have double checked the "eInk Kindle ebooks" serial numbers in the plugin customization and they match the serial number of the Kindle Paperwhite I am using in the "download and transfer via USB" method. I have tried removing the plugin, restarting, re-installing the plugin, restarting, and the issue persists. The log file indicates "No Key Found." Any ideas? Thanks!

Here is the log file for reference:

Added The Ledge to db in: 0.2 Added 1 books in Worker Launch took: 0.09 seconds Job: 0 Convert book 1 of 1 (The Ledge) finished Convert book 1 of 1 (The Ledge)

DeDRM v7.2.1: Trying to decrypt m_irkb96.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 Ledge
Found 4 keys to try after 0.1 seconds
Crypto Type is: 2
DeDRM v7.2.1: Failed to decrypt with error: No key found in 4 PIDs tried.
DeDRM v7.2.1: Looking for new default Kindle Key after 0.1 seconds
searching for kinfoFiles in C:\Users\Jeff_D\AppData\Local
No K4PC kindle.info/kinf/kinf2011 files have been found.
DeDRM v7.2.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Conversion options changed from defaults:

  cover: 'C:\\Users\\Jeff_D\\AppData\\Local\\Temp\\calibre_jsr8pc8y\\xvj2vcqi.jpeg'

  verbose: 2

  read_metadata_from_opf: 'C:\\Users\\Jeff_D\\AppData\\Local\\Temp\\calibre_jsr8pc8y\\48_qs7vb.opf'

  output_profile: 'kindle_pw3'

Resolved conversion options

calibre version: 5.27.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': 'C:\\Users\\Jeff_D\\AppData\\Local\\Temp\\calibre_jsr8pc8y\\xvj2vcqi.jpeg',

 'debug_pipeline': None,

 'dehyphenate': True,

 'delete_blank_paragraphs': True,

 'disable_font_rescaling': False,

 'dont_compress': False,

 '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': '',

 '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 0x0000020A807F7520>,

 '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,

 'mobi_file_type': 'old',

 'mobi_ignore_margins': False,

 'mobi_keep_original_images': False,

 'mobi_toc_at_start': False,

 'no_chapters_in_toc': False,

 'no_inline_navbars': True,

 'no_inline_toc': False,

 'output_profile': <calibre.customize.profiles.KindlePaperWhite3Output object at 0x0000020A807F7B20>,

 'page_breaks_before': "//*[name()='h1' or name()='h2']",

 'personal_doc': '[PDOC]',

 'prefer_author_sort': False,

 'prefer_metadata_cover': False,

 'pretty_print': False,

 'pubdate': None,

 'publisher': None,

 'rating': None,

 'read_metadata_from_opf': 'C:\\Users\\Jeff_D\\AppData\\Local\\Temp\\calibre_jsr8pc8y\\48_qs7vb.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,

 'share_not_sync': False,

 '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': '[]',

 '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

  File "calibre_plugins.dedrm.k4mobidedrm", line 238, in GetDecryptedBook

  File "calibre_plugins.dedrm.mobidedrm", line 484, in processBook

calibre_plugins.dedrm.mobidedrm.DrmException: No key found in 4 PIDs tried.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "calibre\customize\ui.py", line 176, in _run_filetype_plugins

  File "calibre_plugins.dedrm.__init__", line 633, in run

  File "calibre_plugins.dedrm.__init__", line 583, in KindleMobiDecrypt

calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
shimakotodo commented 3 years ago

Also having the same issues on Windows 10 with the latest 7.21 and 5.27. I downgraded to 4.23 and 6.8.1 and same issue.

Here's the log.

tmpcxp6kw.txt

I was using my wife's machine as these books were tied to her account. Just as an experiment, I downloaded some content on my machine (Linux Mint, with 5.18 and DeDRM 7.00). My books decrypted with no issue on Linux.

Bro,I have the same problem with you, win10, 7.21, 5.28 cali, 1.17 kindle. I bought the book on my own amzon account and downloaded it as ".azw" , When i converted, it warned "locked by drm". I studied this issue for whole night but still have no way. I have no Linux to do it as you did. So can I ask for your help converting this azw book to an epub (or txt is also ok) for me? If you are willing to help me,I would be most grateful. this is my mega https://mega.nz/file/Sj4iwbIB#SyXQf6pqIJjQ0CopxhmI-WBU8kXK9gZS-aLo9ey-naA I hope you can send it back to me with mega or Google drive after converting. Once again, I would like to express my deep gratitude

kendoori commented 3 years ago

I will not be able to decrypt your book if I don't have your Kindle serial #. If you want to figure out how to private me somehow, and send me your Serial # I would be happy to do this for you. This may help figuring out how to communicate with me: https://www.sourcecon.com/how-to-find-almost-any-github-users-email-address/

j-howell commented 3 years ago

If that book was downloaded using Kindle for PC then DRM removal needs to occur on the same system and user account.

kendoori commented 3 years ago

if you have the book owners Kindle serial # you can get around thisas the tool allows for multiple serial numbers.

On Wed, Sep 29, 2021 at 1:54 PM John Howell @.***> wrote:

If that book was downloaded using Kindle for PC then DRM removal needs to occur on the same system and user account.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apprenticeharper/DeDRM_tools/issues/1836#issuecomment-930409933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASVQPC3TZR62D5PFAX2QKLUENHE3ANCNFSM5DQ6SICA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- ​

Kenny Schiff Founder & CEO CareSight, LLC Mobile: 203.858.0148 Fax: 866.431.8758 Email: @. @.> Web: http://caresight.com http://www.caresight.com Schedule me via Doodle: https://doodle.com/mm/kennyschiff/schedule-me

j-howell commented 3 years ago

Every Kindle app and device has its own DRM key. A Kindle serial number will only work if the book was downloaded from Amazon targeted to that specific Kindle. If it instead came from a Kindle app then the serial number won’t work.

shimakotodo commented 3 years ago

I will not be able to decrypt your book if I don't have your Kindle serial #. If you want to figure out how to private me somehow, and send me your Serial # I would be happy to do this for you. This may help figuring out how to communicate with me: https://www.sourcecon.com/how-to-find-almost-any-github-users-email-address/

Oh I see now. I dont't have a kindle device and i bought it from kindle for pc. So I understand only myself can do this work. Thank you very much for your kindness! Then I will try some other methods. Have a good day bro!

shimakotodo commented 3 years ago

Every Kindle app and device has its own DRM key. A Kindle serial number will only work if the book was downloaded from Amazon targeted to that specific Kindle. If it instead came from a Kindle app then the serial number won’t work.

Yeah now i understand. Thank you for telling me that, maybe I have to read this book on my phone.

ElleKayEm commented 2 years ago

@mercertom Still working for me as of today. I imported an AZW from Kindle for PC 1.17. I don't have Python installed. The plugin uses the built-in Python in calibre (which is 3.8.5).

@kendoori No sign of DeDRM trying to decrypt the book. Was it disabled?

@tool3884 It doesn't find any Kindle app keys, but that's not a problem if the book is from "download & transfer". The keys it tries before looking for new ones aren't a match. Are you sure you chose the right device when downloading?

@shimakotodo Should work as long as Kindle for PC used to download the book is on the same machine and user as calibre with DeDRM.

2020MacOwner commented 2 years ago

Yes, as far as I'm aware, calibre 4.23 (the last Python 2 version) is compatible with a calibre 5.x database. You just don't want to go back any earlier than that.

I finally got up the nerve to try this (after the $50 piece of DM Removal software I bought suddenly stopped working ). The solution worked like a charm! Downgraded to 4.23 with 6.8.1, imported a book, and it converted just fine. I then upgraded back to 5.43 with 7.2.1, imported another book, and again, it converted just fine.

Wished I'd had the courage to try this months ago...could've saved myself a lot of time AND $50.

ElleKayEm commented 2 years ago

@2020MacOwner I believe your issue was resolved with noDRM's fork: https://github.com/noDRM/DeDRM_tools

If you're all set, you can close this issue.