Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to remove DRM from comic Nook ePubs #144

Open
dmunsil opened this issue Sep 7, 2022 Discussed in #143 · 2 comments
Open

Failing to remove DRM from comic Nook ePubs #144

dmunsil opened this issue Sep 7, 2022 Discussed in #143 · 2 comments

Comments

@dmunsil
Copy link

dmunsil commented Sep 7, 2022

Discussed in #143

Originally posted by dmunsil September 7, 2022
Hi All,

I'm trying to remove DRM from a graphic novel that is only available in eBook form from B&N, so I've purchased it on Nook. I have the Nook for Windows app (current version), and have successfully extracted the key. General-purpose books like novels and so forth work fine. But I have two comic format books in my library, and both of them fail to decrypt. Could it be that the extraction script expects there to be some text in the book? With a comic or graphic novel, it's just a sequence of images.

I can provide logs, metadata files, etc.

Here's a free, reasonably short comic available on B&N that repros the issue: Amazing Agent Luna #1.

https://www.barnesandnoble.com/w/amazing-agent-luna-volume-1-nunzio-defilippis/1025120194?ean=9781935934202

I haven't actually tried setting up a debugger, but just reading the code and looking at these files, it looks like the culprit could be the code that gets the encryptedKey from rights.xml, because these comic files don't have a rights.xml. Not sure why. Perhaps the JPG files are just encrypted with the base key?

rights = etree.fromstring(inf.read('META-INF/rights.xml'))

Don

@ElleKayEm
Copy link

The comics have the rights file stored in a database seperate from the epub. I explain how to decrypt them here: https://apprenticealf.wordpress.com/2012/09/10/drm-removal-tools-for-ebooks/comment-page-38/#comment-62274

And another note here: apprenticeharper#693 (comment)

I've heard you can get regular nook epubs with rights.xml intact from the Android app, but you need root access to get to those. Haven't looked into that myself.

@dmunsil
Copy link
Author

dmunsil commented Sep 8, 2022

Thanks much! I would only add that you can download the free SQLLite DB Browser application (https://sqlitebrowser.org/dl/), which makes it somewhat easier to extract a valid rights.xml from NookDownloads.db3. The entire rights.xml contents are in the main table of the DB, organized by the book ID, and you can export the field contents as a file.

You can also just add the newly saved rights.xml file to the epub without having to rename, unzip, etc. using the 7-zip app (and probably other zip archive readers). Just right-click the epub, and select "7-zip->open archive", then navigate to the META-INF folder and drag rights.xml into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants