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)
-   -  

MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)

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

romulus98 11-15-2010 05:55 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
I'm having some problems with large files, collections from mobipocket; one is 40megs, the other 200 megs.
The files seem to convert fine when using the comman prompt and python mobipocketdedrm.py ...etc, but when I try to convert them to epubs with Calibre they come up as corrupt files.
I tried opening the original one in calibre (using the plugin) but the process stops after a few minutes and I get an error message saying that the process "hangs" for too long.

This doesn't happen with smaller files, so I assume that calibre is set up to treat smaller files. Is there a way of tinkering with those settings so that there won't be a time/size restriction?

Thanks.

any ANONYMOUS forum user 11-26-2010 03:53 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Here's the problem I'm having:
my results are this:

MobiDeDrm v0.08. Copyright (c) 2008 the Dark Reverser
MOBI header length = 232
MOBI header version = 6
Extra Data flags = 2
Error: no key found. maybe the PID is incorrect.


I'm using an .azw file, and I thought, 0.13 of mobidedrm....


Anyone got any tips for THAT?

Stream Recorder 11-26-2010 10:41 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Quote:

Originally Posted by any ANONYMOUS forum user (Post 23229)
MobiDeDrm v0.08. Copyright (c) 2008 the Dark Reverser
MOBI header length = 232
MOBI header version = 6
Extra Data flags = 2
Error: no key found. maybe the PID is incorrect.

I'm using an .azw file, and I thought, 0.13 of mobidedrm....

MobiDeDRM.py Error: no key found. maybe the PID is incorrect

Stream Recorder 11-26-2010 11:23 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Quote:

Originally Posted by mchassy (Post 21845)
[*]You mention the Skindle tool afterwards, but that is only for PC. Is there an equivalent for Mac?

Try to use the following:
DeDRM AppleScript for Mac OS X 10.5, 10.6

Apprentice Alf 01-03-2011 03:32 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Quote:

Originally Posted by any ANONYMOUS forum user (Post 23229)
Here's the problem I'm having:
my results are this:

MobiDeDrm v0.08. Copyright (c) 2008 the Dark Reverser
MOBI header length = 232
MOBI header version = 6
Extra Data flags = 2
Error: no key found. maybe the PID is incorrect.


I'm using an .azw file, and I thought, 0.13 of mobidedrm....


Anyone got any tips for THAT?


MobiDeDRM is currently at version 0.21. Download the tools v3.0 archive. The latest version is always available from my blog (since I'm the one who has been maintaining it.) It's unlikely to help with this problem, but is worth having as it will decode more books correctly.

More likely the problem is that you've updated the firmware on your Kindle. Luckily people cleverer than me have worked out how to fix this now, and a script to generate the book-specific PID and then call MobiDeDRM has been developed. The latest version of this is also always available at my blog.

— Alf.

mememe 01-11-2011 06:30 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Hi,

I don't have a Kindle, but I use Kindle for PC to read Kindle e-books. I installed eBookUtility0.6a-win and activepython and created a ebook.props text file with my Mobipocket Reader PID and 0123 for the serial number as directed by the ebookUtility readme file.

Unfortunately, when I use the GUI I get the following error:
Error: no key found. maybe PID is incorrect.

I'd appreciate any help as there is no Kindle reader available for my old Blackberry Pearl 8130 and I'd like to be able to convert my Kindle ebooks to .PRC format readable by Mobipocket.

Thanks in advance!

FelixPer 01-12-2011 09:32 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
I'm getting a weird error with mobidedrm.py 0.22 when trying to remove DRM from a .prc file I bought from mobipocket.com.

Code:

MobiDeDrm v0.22. Copyright 2008-2010 The Dark Reverser.
Traceback (most recent call last):
  File "MobiDeDRM.py", line 361, in <module>
    sys.exit(main())
  File "MobiDeDRM.py", line 352, in main
    stripped_file = getUnencryptedBookWithList(infile, pidlist)
  File "MobiDeDRM.py", line 334, in getUnencryptedBookWithList
    if not os.path.isfile(infile):
NameError: global name 'os' is not defined

I thought maybe my Python setup was wrong and tried reinstalling Python and wxPython, now I'm using ActivePython and the error is still the same.

I also tried using KindleBooks.pyw, which gave me the following error.

Code:

MOBI header version = 6, length = 228

Extra Data Flags = 6

Processing Book:  XYZ

No EXTH record type 209 - Perhaps not a K4 file?

    ... not suceessful Not yet initialised with PID. Must be opened with Mobipocket Reader first.

Error: Encryption Removal Failed

Of course I opened the file with Mobipocket Reader.

Am I doing something completely wrong?

Any help would be highly appreciated. :)

Apprentice Alf 01-13-2011 02:35 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Quote:

Originally Posted by mememe (Post 24457)
Hi,

I don't have a Kindle, but I use Kindle for PC to read Kindle e-books. I installed eBookUtility0.6a-win and activepython and created a ebook.props text file with my Mobipocket Reader PID and 0123 for the serial number as directed by the ebookUtility readme file.

Unfortunately, when I use the GUI I get the following error:
Error: no key found. maybe PID is incorrect.

I'd appreciate any help as there is no Kindle reader available for my old Blackberry Pearl 8130 and I'd like to be able to convert my Kindle ebooks to .PRC format readable by Mobipocket.

Thanks in advance!

Kindle for PC uses a per-book PID scheme. Luckily is has already been reverse engineered. You need KindleBooks, a collection of scripts that will remove the DRM from your Kindle for PC ebooks by calculating the per-book PIDs automatically, and then running the latest MobiDeDRM for you.

See my blog (in my profile) for the latest tools. Or you can download v3.1 (the latest as I write this) directly from http://www.datafilehost.com/download-74a4e2fc.html

— Alf.

Apprentice Alf 01-13-2011 02:40 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Quote:

Originally Posted by FelixPer (Post 24480)
Code:

    ... not suceessful Not yet initialised with PID. Must be opened with Mobipocket Reader first.

Error: Encryption Removal Failed

Of course I opened the file with Mobipocket Reader.

Am I doing something completely wrong?

Any help would be highly appreciated. :)

You opened the file with Mobipocket reader, but that's not enough. Mobipocket Reader doesn't alter the file you originally have, it creates a new copy in its library folder, and it's THAT copy that you must use when doing the de-drm process.

MobiDeDRM is now at 0.24 (well, 0.25, but that version isn't generally available yet, and is only needed for some very old Mobipocket books with type 1 encryption.) There was a bug in 0.22 that could give that 'os' error, now fixed.

— Alf.

FelixPer 01-13-2011 06:10 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks


 
Quote:

Originally Posted by Apprentice Alf (Post 24499)
Mobipocket Reader doesn't alter the file you originally have, it creates a new copy in its library folder, and it's THAT copy that you must use when doing the de-drm process

While I was writing my post, I was already fearing that I just made some stupid mistake or was overseeing something obvious. I should have known better, because I already decrypted some .epub eBook with Adobe DRM a while ago where it's exactly the same game. :o

You're right, of course, and decrypting with KindleBooks.pyw worked perfectly using the right file.

Thanks for your help! :)

any ANONYMOUS forum user 01-27-2011 02:28 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
OK, this is what I did:
Downloaded MobiDeDrm.py
ran the command MobiDeDrm.py myfile.prc outfile.mobi '#XXXXXXX'
Response "Error: Invalid PID checksum"
So I re-read the instructions and downloaded MobiPocket reader, which would not accept my prc (it says it is corrupted but K4PC opened it fine)
Then I used the PID from MobiPocket Reader and it gave me the same error.

Any tips/ideas? Thanks for taking a moment to assist me

Stream Recorder 01-27-2011 02:36 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
Quote:

Originally Posted by any ANONYMOUS forum user (Post 24870)
ran the command MobiDeDrm.py myfile.prc outfile.mobi '#XXXXXXX'
Response "Error: Invalid PID checksum"

Error: Invalid PID checksum

any ANONYMOUS forum user 01-27-2011 11:20 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
Quote:

Originally Posted by Stream Recorder (Post 24872)

Still says the same thing

If I sent you the prc, do you think you could try to remove the DRM? Nothing I'm trying is working and it's making me upset...

Stream Recorder 02-17-2011 09:50 PM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
ebook DRM removal tools archive
Quote:

Originally Posted by README_KindleBooks.txt
KindleBooks (Originally called K4MobiDeDRM and Topaz_Tools)

This tools combines functionality of MobiDeDRM with that of K4PCDeDRM, K4MDeDRM, and K4DeDRM. Effectively, it provides one-stop shopping for all your Mobipocket, Kindle for iPhone/iPad/iPodTouch, Kindle for PC, and Kindle for Mac needs and should work for both Mobi and Topaz ebooks.

Preliminary Steps:

1. Make sure you have Python 2.X installed (32 bit) and properly set as part of your SYSTEM PATH environment variable (On Windows I recommend ActiveState's ActivePython. See their web pages for instructions on how to install and how to properly set your PATH). On Mac OSX 10.6 everything you need is already installed.


****
Please Note: If you a happy user of MobiDeDRM, K4DeDRM, K4PCDeDRM, or K4MUnswindle, please continue to use these programs as there is no additional capability provided by this tool over the others. In the long run, if you have problems with any of those tools, you might want to try this one as it will continue under development eventually replacing all of those tools.
****

Instructions:

1. double-click on KindleBooks.pyw

2. In the window that opens:
hit the first '...' button to locate your DRM Kindle-style ebook

3. Then hit the second '...' button to select an output directory for the unlocked file

4. If you have multiple Kindle.Info files and would like to use one specific one, please hit the third "...' button to select it. Note, if you only have one Kindle.Info file (like most users) this can and should be left blank.

5. Then add in any PIDs you need from KindleV1, Kindle for iPhone/iPad/iPodTouch, or other single PID devices to the provided box as a comma separated list of 10 digit PID numbers. If this is a Kindle for Mac or a Kindle for PC book then you can leave this box blank


6. If you have standalone Kindles, add in any 16 digit Serial Numbers as a comma separated list. If this is a Kindle for Mac or a Kindle for PC book then you can leave this box blank

7. hit the 'Start' button

After a short delay, you should see progress in the Conversion Log window indicating is the unlocking was a success or failure.



If your book was a normal Mobi style ebook:
If successful, you should see a "_nodrm" named version Mobi ebook.
If not please examine the Conversion Log window for any errors.



If your book was actually a Topaz book:

Please note that Topaz is most similar to a poor man's image only PDF in style. It has glyphs and x,y positions, ocrText used just for searching, that describe the image each page all encoded into a binary xml-like set of files.

If successful, you will have 3 zip archives created.

1. The first is BOOKNAME_nodrm.zip.
You can import this into calibre as is or unzip it and edit the book.html file you find inside. To create the book.html, Amazon's ocrText is combined with other information to recreate as closely as possible what the original book looked like. Unfortunately most bolding, italics is lost. Also, Amazon's ocrText can be absolutely horrible at times. Much work will be needed to clean up and correct Topaz books.

2. The second is BOOKNAME_SVG.zip
You can also import this into calibre or unzip it and open the indexsvg.xhtml file in any good Browser (Safari, Firefox, etc). This zip contains a set of svg images (one for each pages is created) and it shows the page exactly how it appeared. This zip can be used to create an image only pdf file via post conversion.

3. The third is BOOKNAME_XML.zip
This is a zip archive of the decrypted and translated xml-like descriptions of each page and can be archived/saved in case later code can do a better job converting these files. These are exactly what a Topaz books guts are. You should take a look at them in any text editor to see what they look like.

If the Topaz book conversion is not successful, a large _DEBUG.zip archive of all of the pieces is created and this can examined along with the Conversion Log window contents to determine the cause of the error and hopefully get it fixed in the next release.


any ANONYMOUS forum user 02-21-2011 01:01 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
Hi!

I've been trying to follow your instructions to remove the DRM from my Mobipocket books. I'm stuck at the begininng. I've tried using Calibre. It didn't help. I've been trying to start with the cmd prompt. (I have my PID) It says the file path is invalid. My file path is Documents\My eBooks. I've tried typing it in as Documents\My() eBooks, Documents\My eBooks, & Documents\(My eBooks). Obviously I'm not very savy with this but I can't figure out where I am going wrong. Please help!

Stream Recorder 02-21-2011 01:12 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
Quote:

Originally Posted by any ANONYMOUS forum user (Post 25512)
Hi!

I've been trying to follow your instructions to remove the DRM from my Mobipocket books. I'm stuck at the begininng. I've tried using Calibre. It didn't help. I've been trying to start with the cmd prompt. (I have my PID) It says the file path is invalid. My file path is Documents\My eBooks. I've tried typing it in as Documents\My() eBooks, Documents\My eBooks, & Documents\(My eBooks). Obviously I'm not very savy with this but I can't figure out where I am going wrong. Please help!

Read about Calibre DRM removal plug-ins at:
The simplest option for removing DRM: Calibre Plugins

Also read README_KindleBooks.txt quoted in my previous post.

slayda 02-21-2011 05:10 AM

Re: MobiDeDRM.py - remove DRM from Mobipocket ebooks (unDRM MOBI and PRC files)


 
Quote:

Originally Posted by any ANONYMOUS forum user (Post 25512)
Hi!

I've been trying to follow your instructions to remove the DRM from my Mobipocket books. I'm stuck at the begininng. I've tried using Calibre. It didn't help. I've been trying to start with the cmd prompt. (I have my PID) It says the file path is invalid. My file path is Documents\My eBooks. I've tried typing it in as Documents\My() eBooks, Documents\My eBooks, & Documents\(My eBooks). Obviously I'm not very savy with this but I can't figure out where I am going wrong. Please help!

The command prompt doesn't like blanks in the name. try it as Documents\My?eBooks. The "?" allows a single wildcard character so command prompt won't care what that character is.

Also what Stream_Recorder says for using Calibre.


All times are GMT -6. The time now is 10:57 AM.