Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Removing DRM protection from eBooks (http://stream-recorder.com/forum/forumdisplay.php?f=63)
-   -  

How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks

(http://stream-recorder.com/forum/showthread.php?t=5310)

Stream Recorder 01-01-2010 01:21 AM

How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Barnes & Noble uses its own DRM scheme for some EPUB books. It's a variant of the Adobe ADEPT scheme, and all the Adobe SDK users will get access to it eventually. The problem is that many consumers can’t read B&N books on their ebook readers.

Circumventing Barnes & Noble DRM for EPUB
Quote:

The basic idea behind the B&N EPUB scheme is the same as that used by the ill-fated eReader format B&N acquired:

step 1: generate an encryption key from the book-purchaser's name + credit card #

step 2: hope that they don't like giving that information out to strangers. They like to call this a form of "social DRM", although I believe a more appropriate term is "silly".

It would be very bad form for an application to keep user CC#s just sitting around on disk, so the Windows version of the Barnes & Noble Desktop Reader application (BDReader) just holds on to the generated key and not the source info. A wise decision, for which I congratulate them. It then stores this key in plain text in a sqlite3 database. An... interesting... decision, for which I thank them. Update: and then it turned out the key-generation algorithm was pretty easy too...
Software to remove DRM from B&N EPUB ebooks:
A Windows-only key-retrieval script: ignoblekey (version 2)
Code:

http://pastie.org/751573
An any-platform key-generation script: ignoblekeygen (version 1)
Code:

http://pastie.org/753985
And an any-platform book-decryption script: ignobleepub (version 1)
Code:

http://pastie.org/751366
You need the decryption script and one of either the key-retrieval or key-generation scripts. They produce the same output. The key-generator works on any platform. The Windows key-retrieval script can get access to your credit card (despite being an open-source script).



How to remove DRM protection from your B&N ADEPT EPUB files
  1. Download
    • Download Barnes and Noble Desktop Reader
    • Download Python (use Python x32 on Windows x64)
    • Download PyCrypto (Compatible with your Python version)
    • Download DRM removal scripts: ignoblekeygen, ignobleepub
  2. Install
    • Install B&N Desktop Reader
    • Install Python THEN PyCrypto
  3. Download DRM protected EPUB books from B&N
  4. Generate your B&N EPUB key
    1. Go to Barnes and noble website.
    2. Log in and click on "My account".
    3. On the right click "Manage credit cards".

      The name under the credit card # will be he name used with ignoblekeygen
    4. Open ignoblekeygen
    5. Paste that name into the field name.
    6. For credit card number use your full 16-digit card number that you have set as the Barnes and Noble default credit card (no spaces). The last few digit of this card are shown above name...
    7. Click generate and you should have your B&N EPUB key (bnepubkey.b64)
    8. If you get "Key cannot be null string" check over your name and cc settings.
  5. Decrypt EPUB
    1. Open ignobleepub
    2. For key open your previously generated (bnepubkey.b64)
    3. For input file go to (My documents/My Barnes and Noble ebooks/My email/) and choose your DRM protected epub file.
    4. Choose an output name and add the .epub extension.
    5. Click Decrypt

See also:
ebook DRM removal tools archive

Stream Recorder 01-01-2010 01:27 AM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
If you get the following error after running ignoblekey.pyw
"Error: Problem decoding key; unexpected DB format?"
you can either find and delete your 'ClientAPI_v012.db' file then re-authorize BDReader with your account information,
or just use the key-derivation script (ignoblekeygen).

Both ignoblekey and ignoblekeygen will produce the same output when they work correctly.

llewyn 01-31-2010 10:06 PM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Wow, thanks!

I will try this as soon as I figure out how to download and work with the python stuff!

Lewshu 03-19-2010 09:51 PM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Ok so I have bought a book off of b&n.com, and not being able to use it with my ebook reader, I need to remove the DRM. I have downloaded the decryption script, key generation scrypt, Python and Pycripto.
I am a newbie at this and am not sure how to go from there. Which script do I do first and what do I put in for the Key file, Input file, and Output file?? And for the key generation, do I actually put in my cc #?

Sorry but please help..

Stream Recorder 03-20-2010 01:28 AM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Lewshu, try to read the following:
How to remove DRM from sony ebooks (BBeB and EPUB)

ANON 03-23-2010 01:52 PM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Hello, I have used the above technique and all is well except the file I received from B&N is in the .PDB file extensions, not EPUB. When I tried the ignoblepub I get "this is not a zip file". Can someone steer me in the right direction? Thanks.

ANON 03-23-2010 03:54 PM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Okay, after doing some reading I realize this method is for EPUB format files. I've tried the PDB to PDF as mentioned about but the file is still encrypted and the PDF output is all gibberish. I also tried the eread2html method but get an error while finishing.

What's the best method and what file format is the best to end up with? I hear HTML format isn't exactly ideal anyway. Preferably I would like to just strip the encryption and just leave the PDF file intact. What's my best option? Thanks.

Stream Recorder 03-24-2010 01:37 AM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
Quote:

Originally Posted by ANON (Post 17555)
Hello, I have used the above technique and all is well except the file I received from B&N is in the .PDB file extensions, not EPUB. When I tried the ignoblepub I get "this is not a zip file". Can someone steer me in the right direction? Thanks.

Remove DRM from PDB ebook from B&N (Barnes & Noble),...

sensualsuccubus 04-26-2010 01:37 PM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
hi i am new and im trying to remove DRM from my B&N PDB books i don't have a device to get the pid from just my pc every thing works in-till i get the error "the filename,directory name,or volume, lable syntay is incorrect" i cant find the files\downloads for xpml2xhml.py or ereader2html.py:( the only one i could find was erdr2pml.py is there any one who can help me:)

cnewsgrp 05-13-2010 05:13 AM

Re: How to remove DRM protection from B&N (Barnes & Noble) EPUB ebooks


 
The program is not working for me, am I doing anything wrong
First I got error "Could not locate B&N Reader installation"
I edited the file and changed a variable and that fixed the error
#BN_APPDATA_DIR = r'Barnes & Noble\DesktopReader'
BN_APPDATA_DIR = r'Barnes & Noble\BNDesktopReader'

Then I got the error "Problem locating B&N Reader DB". Looking at the program it was looking for ClientAPI_*.db. Such file did not exists on my PC but there was a file "C:\Users\XXXXXXX\AppData\Roaming\Barnes & Noble\BNDesktopReaderClientAPI.db".
I edited the program again and changed one more line
# dbpath = glob.glob(os.path.join(bndir, 'ClientAPI_*.db'))
dbpath = glob.glob(os.path.join(bndir, 'ClientAPI*.db'))

Now I am getting following error "B&N User Key not found. Unexpected DB format?"

I have Barnes and Noble reader on my Windows 7 desktop. ANy help?


All times are GMT -6. The time now is 07:20 PM.