Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Other discussions > Removing DRM protection from eBooks
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 10-18-2009, 10:44 AM
artemisblossom
 
Posts: n/a
Default

How to remove DRM from sony ebooks (BBeB and EPUB) with ineptkey.pyw, inepepub.pyw


I have lots of sony ebooks in BBeB and EPUB that I would like to remove the drm from. Is this possible?? Can someone explain how to do this please???
Reply With Quote
  #2  
Old 10-19-2009, 04:24 AM
Stream Recorder
 
Posts: n/a
Default

Re: How to remove DRM from sony ebooks


It is possible to remove DRM protection from EPUB files using free python scripts:

Circumventing Adobe ADEPT (Adobe Digital Experience Protection Technology) DRM for EPUB:
Quote:
By way of a concrete reverse-engineering contribution, I have successfully circumvented Adobe's ADEPT DRM scheme for EPUB files. The same circumvention probably also allows decryption of ADEPT-encrypted PDF files, although I haven't looked into it yet.

ADEPT is pretty close to faultless as a crypto system -- a per-user RSA key encrypts a per-book AES key which encrypts the content. It uses AES in CBC mode with a random IV. It uses RSA with PKCS#1 v1.5 padding, which is perfectly adequate for this case. Unfortunately for Adobe, this isn't a crypto system, but a DRM system. DRM systems ultimately depend not on the strength of their cryptography, but the complexity of their obfuscation. There is very little obfuscation in how Adobe Digital Editions hides and encrypts the per-user RSA key, allowing fairly simple duplication of exactly the same process Digital Editions uses to retrieve it.

In practical terms, this breaks ADEPT circumvention into two components: key retrieval and decryption. Key retrieval depends only on the details of Digital Editions and can change seamlessly with an update to the same. Decryption however is a property of the architecture of the system as a whole. Preventing circumventing decryption with previously retrieved keys would require changes to both DE and Adobe Content Server and would take quite some time to propagate to all ACS customers. The upshot being that if you want to decrypt ADEPT books in the future, grab your key now -- no garauntees that you'll be able to do so in the future, but a previously-retrieved key should keep on working.

Here are the scripts:
Key-retrieval script (ineptkey.pyw version 3) and Decryption script (ineptepub.pyw version 2):
Code:
http://pastebin.com/f26972321
http://pastebin.com/f28fdd6b3
To use:
  1. install Python 2.6+ (32bit) and PyCrypto,
  2. run the key-retrieval script ineptkey.pyw,
  3. then run the decryption script ineptepub.pyw using the retrieved key.

And on a preachy note, please don't be a jerk with these. DRM is bad, but piracy is wrong kids, and only validates the opinions of those who think they need DRM in the first place.
Reply With Quote
  #3  
Old 10-19-2009, 04:55 AM
Stream Recorder
 
Posts: n/a
Default

Re: How to remove DRM from sony ebooks


  1. Install Adobe Flash Player
    Code:
    http://get.adobe.com/flashplayer/
  2. Install Adobe Digital Editions (ADE)
    Code:
    http://www.adobe.com/products/digitaleditions/
  3. Authorize your copy of Adobe Digital Editions.
  4. Install Python
  5. Install PyCrypto
  6. Download ineptkey.pyw and ineptepub.pyw and put them into one directory.
  7. Run ineptkey.pyw. It will find the key and write it to hard disk as "ADEPTKEY.DER " in the same directory where ineptkey.pyw is.
  8. Run ineptepub.pyw
    A dialog windows with three parameters will pop up :
    • Key file ADEPTKEY.DER (filled automatically if the ADEPTKEY.DER-file and ineptepub.pyw reside in the same directory)
      If not, click on the "…" button and select a file.
    • Input file
      Click on the "…" button to choose your EPUB ebook. You'll find it in "My Documents\My Digital Editions".
      If you just can't find the EPUB ebook, open Adobe Digital Editions and find the path in the properties of the ebook.
    • Output file
      Click on the "…" and enter a filename.
  9. Open your newly created DRM-free EPUB file with your favorite application (on whatever device you like)

Download Key-retrieval script

ineptkey.pyw version 5:
Code:
http://pastie.org/1030386
ineptkey.pyw 4.3:
Code:
http://pastebin.com/f6ffa029

Download ineptepub.pyw:

ineptepub.pyw version 5.2
Code:
http://pastie.org/1032773
ineptepub.pyw version 2
Code:
http://wiki.xkyle.com/Epub_Decrypter
Download aineptepub.pyw version 4.1
Code:
http://pastebin.com/f4a7c338a

See also:
ebook DRM removal tools archive
Reply With Quote
  #4  
Old 10-19-2009, 05:13 AM
any ANONYMOUS forum user any ANONYMOUS forum user is offline
any user of the forum who preferred to post anonymously
 
Join Date: Aug 2011
Location: Server of stream-recorder.com
Posts: 211
any ANONYMOUS forum user is on a distinguished road
Default

Re: How to remove DRM from sony ebooks


I get the following error message when trying to remove DRM from EPUB with python scripts:
Error : Unexpected EOF

I downloaded ineptkey.pyw and ineptpdf.pyw. Then
  • Extracted the key with ineptkey.pyw (v3) and got an adeptkey.der file
  • Tried to remove the DRM from the epub file with ineptpdf.pyw (v2)
    and it failed with the error : "Error : Unexpected EOF"

The error message occurs on nextline() function with linepos variable value 970.630.

The ebook is 970.691 bytes long.

Please help
Reply With Quote
  #5  
Old 10-19-2009, 06:51 AM
Stream Recorder
 
Posts: n/a
Default

Re: How to remove DRM from sony ebooks


Quote:
Originally Posted by any ANONYMOUS forum user View Post
I get the following error message when trying to remove DRM from EPUB with python scripts:
Error : Unexpected EOF

I downloaded ineptkey.pyw and ineptpdf.pyw. Then
  • Extracted the key with ineptkey.pyw (v3) and got an adeptkey.der file
  • Tried to remove the DRM from the epub file with ineptpdf.pyw (v2)
    and it failed with the error : "Error : Unexpected EOF"

The error message occurs on nextline() function with linepos variable value 970.630.

The ebook is 970.691 bytes long.
You need to use ineptkey.pyw and ineptepub.pyw to remove DRM from EPUB files, because ineptpdf.pyw is intended to be used with PDF files.
Reply With Quote
  #6  
Old 11-12-2009, 06:44 AM
any ANONYMOUS forum user any ANONYMOUS forum user is offline
any user of the forum who preferred to post anonymously
 
Join Date: Aug 2011
Location: Server of stream-recorder.com
Posts: 211
any ANONYMOUS forum user is on a distinguished road
Default

Re: How to remove DRM from sony ebooks (BBeB and EPUB)


I just went through this how-to for removing drm from epub files. It saved me hours of tearing my hair out.
I had bought a book on booksonboard, but it came in epub format which is supported by stanza (for the iphone). However drm'd epubs are not supported (I found out after I buy my non-refundable ebook).

Finally came across your post and it worked first time like a charm.
Reply With Quote
  #7  
Old 11-25-2009, 03:32 PM
suedavids suedavids is offline
Junior Member
 
Join Date: Nov 2009
Posts: 1
suedavids is on a distinguished road
Red face

Re: How to remove DRM from sony ebooks (BBeB and EPUB)


I don't know how to do much on computers except basic so I am lost. I downloaded the Python and PyCryto you said to download but then I am lost. What do I do with these 2 programs? What/where do I download the ineptkey.pyw and ineptepub.pyw and put them into what one directory? Can you put this in computer for idiots language?
Reply With Quote
  #8  
Old 11-26-2009, 01:15 AM
Stream Recorder
 
Posts: n/a
Default

Re: How to remove DRM from sony ebooks (BBeB and EPUB)


Quote:
Originally Posted by suedavids View Post
I don't know how to do much on computers except basic so I am lost. I downloaded the Python and PyCryto you said to download but then I am lost. What do I do with these 2 programs?
After downloading them you need to install them. Double-click on each file and install.

Quote:
Originally Posted by suedavids View Post
What/where do I download the ineptkey.pyw and ineptepub.pyw and put them into what one directory?
It could be any directory. For example, create freePDF directory on drice C:
Code:
C:\freePDF\
Then download adobe.adept.original_post.7z from
Code:
http://rs770.rapidshare.com/files/207513969/adobe.adept.original_post.7z
and extract f26972321.txt from it into C:\\freePDF\ (You will need freeware 7zip or any other program that supports 7z archives).
Open f26972321.txt with Notepad and save it as ineptkey.pyw.


Then go to C:\freePDF\ with Windows Explorer, right-click on the empty space of the Windows and create a new txt file ineptepub.txt . Open the file with Notepad




Then go to the following page
Code:
http://wiki.xkyle.com/Epub_Decrypter
and select text from
Code:
#! /usr/bin/python

# ineptepub.pyw, version 2

# To run this program install Python 2.6 from http://www.python.org/download/
# and PyCrypto from http://www.voidspace.org.uk/python/modules.shtml#pycrypto
# (make sure to install the version for Python 2.6).  Save this script file as
# ineptepub.pyw and double-click on it to run it.
till the end, including
Code:
if __name__ == '__main__':
# sys.exit(cli_main())
sys.exit(gui_main())
Copy the selection and paste it into ineptepub.txt . Save the latter file as ineptepub.pyw .

Then follow the instructions above.
Reply With Quote
  #9  
Old 12-20-2009, 10:17 AM
jhgeorge1935 jhgeorge1935 is offline
Junior Member
 
Join Date: Dec 2009
Posts: 1
jhgeorge1935 is on a distinguished road
Default

Re: How to remove DRM from sony ebooks (BBeB and EPUB)


I also am trying this stuff. I have everything loaded and I created the adeptkey.der ok when I load this stuff into the ineptepub.pyw box it states at the top of the box:
Error: Problem decrypting session key
Am I missing something?
I have all of the files you discussed loaded
Thanks!
Reply With Quote
  #10  
Old 12-22-2009, 05:21 PM
leday leday is offline
Junior Member
 
Join Date: Dec 2009
Posts: 1
leday is on a distinguished road
Default

Re: How to remove DRM from sony ebooks (BBeB and EPUB)


OK, I'm lost too. I downloaded Python and PyCrypto and installed both. I created the two pyw files. I already have ADE authorized to my computer. Now what? I have no idea how to start any of these programs and how to select the book files that I want to remove the DRM from. Can you PLEASE give step-by-step instructions? Thanks.

Update, I double clicked ineptkey.pyw and it does not generate a key. I get the following errors:

"Unexpected errors"
Traceback (most recent call last):
File "C:\Documents and Settings\.......\FreePDF\ineptkey.pyw", line 198, in main
retrieve_key(keypath)
File "C:\Documents and Settings\.......\FreePDF\ineptkey.pyw", line 140, in retrieve_key
vendor = cpuid0()
File "C:\Documents and Settings\.......\FreePDF\ineptkey.pyw", line 103, in cpuid0
cpuid0__(buffer)
WindowsError: exception: access violation writing 0x00BDD260


Ineptepub.pyw works, but I cannot generate a key to use with it. Can you please tell me what is wrong here? Thanks.


UPDATE #2: There must have been some sort of hardware conflict on my PC (I had replaced the hard drive last week so maybe this had something to do with it??). Anyway, I tried downloading this to my laptop and it worked perfectly. Thanks.

Last edited by leday : 12-22-2009 at 10:31 PM.
Reply With Quote
Reply Post New Thread
Tags: , , , , , , , , , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 08:13 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons