Using inept to strip DRM for better viewing, inept Python Download.
(Update: This post wasn’t intended as a how-to but people are getting some use out of it. To fill in the gaps, here is an article on how to install the required tools like pycrypto.)
I remove DRM whenever possible because I lost a few iTunes tracks. Also, since the FoxIt eSlick won’t work with DRM immediately, I wanted to be able to test how readily I could use purchases on my eink reader. I’m not intending to pirate ebooks here. It turns out that until a new version of ADEPT comes out I don’t have anything to worry about. The process is easy, fast, and appears to be lossless.
I found out about tools to unwrap DRM from e-books when a DCMA takedown notice was used to remove two python scripts. I managed to snag copies of the suppressed python scripts (ineptpdf.pyw, ineptkey.pyw for Windows or ineptkeymac.pyw for OS X, ineptepub.pyw) from the slashdot comments more easily than my copy of Adobe Digital Editions from the Adobe site, since their web installer failed repeatedly and I had to hunt down the EXE.
So, while I install I ask on Twitter where to buy some ePub or ADEPT ebooks. Someone suggested BooksOnBoard. They have a copy of Anathem in ADEPT format for $18.07 after the 1% Google Checkout discount, about $2 less than the cost of the hardcover. I’m not happy that it’s so expensive for an electronic copy but I decide to pay anyways because I can’t find another ADEPT copy, let alone cheaper.
I download the 16 megabyte book through Adobe Digital Editions in about a minute and then execute ineptkey.pyw. It notifies me that my key has been stored in adeptkey.der. Next, I run ineptpdf.pyw. I’m greeted with a dialogue box asking me for the key file, the input file, and the output destination. It turns out that the ebook I bought got sent to My Documents/My Digital Editions/. I fill out all the required boxes and click decrypt.
There’s no progress bar, just the hourglass for about thirty seconds, and then it goes away. No success or failure message.
Just to make sure that the PDF I downloaded from BooksOnBoard was encrypted I tried to open it with FoxIt Reader. I get the error “This document is encrypted with some unsupported security handler.” Okay, now I try to open up the decrypted version. Success!
Everything looks to be in tact, including the chapter bookmarks and graphics. I opened it up side by side with the Adobe Digital Edition and started from chapter six, where I left off from the library book. The two did not look alike.
It turns out that the decrypted version looks better! Take a look at the screenshots below, particularly the middle one which compares the Adobe Digital Edition to the decrypted PDF.
Apparently the ebook I bought contains PDF features that Adobe Digital Editions does not support. FoxIt Reader does, though! I’m stunned to think that if I didn’t break the DMCA I’d be stuck with a product that wasn’t just less flexible, but that was inferior!
Userfull guide: how to remove drm from epub.



