View Full Version : Latest MobiDeDRM Patch


pdurrant
12-17-2008, 05:25 PM
[edited January 2010]

Anyone wanting to remove DRM from ebooks should use google to find Apprentice Alf's blog.




Source code lines removed. Please don't post them here in the forums. -- Alex

nohmi2
12-17-2008, 07:03 PM
Thanks to a sample of a Mobipocket ebook for which MobiDeDRM 0.04 didn't work properly, I've made a slight adjustment to the code. The new code should work with all the ebooks that 0.04 worked with, and a few more.

For Mac users I have two useful AppleScripts. The first will take MobiDeDRM 0.02 and patch it to MobiDeDRM 0.05. The second, when MobiDeDRM.py is added to the package, will give drag & drop unlocking of Mobipocket files.

For Windows and Linux, I have a diff files created with the standard POSIX diff on Mac OS X 10.5.6, and when used with the standard patch tool on MobiDeDRM 0.02 should produce version 0.05.

For those who were happy with the line-by-line instructions, I have new ones here. I've reversed the order (last line patched first) to make the line numbers constant while patching.

:smack: I have gone into Active Python, and I am afraid that I am still flummoxed about how to even start correcting MobiDeDRM4.py.
Smart, I'm not...willing to try, I am.
Please help(don't even know about the line numbers).

devinoneill1
12-17-2008, 07:32 PM
Pdurrant
I've been having some difficulty with your mobidedrm002to005 script, I pm'd you about it
but maybe there's an applescript pro who can walk my dumb @$$ though it in the mean time.

daviddem
12-17-2008, 08:30 PM
Good job dude. Are you starting work on epub and lrf any time soon? :D

pdurrant
12-18-2008, 02:27 AM
I didn't do any of the hard work in the Mobipocket decoder code, just fixed a few minor bugs.

Paul

Good job dude. Are you starting work on epub and lrf any time soon? :D

Justy
12-19-2008, 01:36 PM
This sounds like a great patch. Is it possible to post the lines of code in a different thread, perhaps the "Mobipocket Decoder Tool" thread where the Admins seem to have accepted code in the past? Or in a Wiki so that we can see them again?

pdurrant
12-19-2008, 05:30 PM
I'm reluctant to repost anything that has been removed from Mobileread. The administrators have to make a judgement as to what's permissible.

It is much better to have the Mobileread forums without the Mobipocket Unlocker code, than to have no Mobileread forums at all.

Paul

withoutThis sounds like a great patch. Is it possible to post the lines of code in a different thread, perhaps the "Mobipocket Decoder Tool" thread where the Admins seem to have accepted code in the past? Or in a Wiki so that we can see them again?

FizzyWater
12-19-2008, 08:43 PM
I didn't see your original post, but I thought the update from 003 to 004 was posted with as little code as possible, for example:

[line 25] replace "a@18" with "a@@18"

But maybe you already were cryptic?

devinoneill1
12-19-2008, 11:43 PM
I'm really dying here guys. I have no idea what I'm doing with this applescript for mobidedrm002to05. Is there anyway somebody can walk me through running it?
I'm sure its all my slow headedness, but when I try to put the code in applescript editor I get error messages stating unexpected characters, end of line expected something or other.
Any Suggestions?
Thanks,
Devin

wallcraft
12-20-2008, 12:06 AM
I'm really dying here guys. The best place to start to look for copies of MobiDeDRM python scripts is in the responses to DarkReverser's Weblog (http://darkreverser.wordpress.com/2008/02/13/new-blog/). Since 0.05 is new, start with the most recent responses.

Striking Claw
12-22-2008, 12:26 PM
The best place to start to look for copies of MobiDeDRM python scripts is in the responses to DarkReverser's Weblog (http://darkreverser.wordpress.com/2008/02/13/new-blog/). Since 0.05 is new, start with the most recent responses.

I tried the version mentioned in the blog and got the following error message:
File "MobiDeDrm05.py", line 100
assert off + in_off + len(new) <= endoff
^

I have the version 0.04 which works.
Does someone know where to find a listing of the differences between 0.04 and 0.05?

pdurrant
12-22-2008, 05:10 PM
There is only one line that changed between 0.04 and 0.05, barring comments and help info.

You should be able to find the information on the internet somewhere.

Paul

I tried the version mentioned in the blog and got the following error message:
File "MobiDeDrm05.py", line 100
assert off + in_off + len(new) <= endoff
^

I have the version 0.04 which works.
Does someone know where to find a listing of the differences between 0.04 and 0.05?

JSWolf
12-24-2008, 02:43 AM
I'm wondering why the code snippt to allow 0.02 to be updated to 0.04 was allowed on MR while the code snippit to go from 0.02 to 0.05 is not allowed.

pilotbob
12-24-2008, 01:03 PM
I'm wondering why the code snippt to allow 0.02 to be updated to 0.04 was allowed on MR while the code snippit to go from 0.02 to 0.05 is not allowed.

Probably because one was buried in a semi-related "help" thread so not as visible?

BOb

bbusybookworm
12-24-2008, 10:32 PM
Probably because one was buried in a semi-related "help" thread so not as visible?

BOb

And also probably as it did not include scripts to do it automaticley as the original post did.

The one to change 0.2 to 0.4 required you to go find the script, and then apply the changes your self, i.e. no code was directly provided.

so a post just mention ing the additional step might be permissible, but providing a tool to do it for you might not be.

Its a bit of a blurry line, but ....

JSWolf
12-25-2008, 05:00 AM
Would it be ok to post a link to the changes as long as the changes were posted someplace else?

HarryT
12-30-2008, 07:28 AM
Yes, that would be fine.

wmaurer
01-10-2009, 10:28 AM
I'm using version 0.05 and have successfully stripped many files. However I have one that it doesn’t work with; I get a message saying “Invalid file format”. This file is readable using Mobipocket software, and Calibre recognises it as a valid mobi file. Any ideas on how I can investigate further to solve the problem?

Cheers
Wayne

wallcraft
01-10-2009, 10:50 AM
I get a message saying “Invalid file format”. This should only happen if the file does not have "BOOKMOBI" starting at byte 61, see Wiki: PDB (http://wiki.mobileread.com/wiki/PDB). This should be the case for all recent MOBI's, but very early ones used to have "TEXtREAd" (i.e. they pretended to be PalmDOC ebooks).

Use a text editor to see what your ebook contains. If it has "TEXtREAd", did you download it recently? I am surprised no one has come across a "TEXtREAd" with DRM before now if they exist.

EDIT: My guess is that this ebook has "TEXtREAd", but it is not encrypted. So you don't need mobidedrm at all.

wmaurer
01-10-2009, 02:11 PM
You're right, the file format is "TEXtREAd", but it's also encrypted according to Calibre. I commented out the check in mobidedrm to ignore the header, but then I got the error message "invalid encryption type: 1" - the script is expecting the crypto_type to be 2. I tried commenting out this check, but then the script fails later on somewhere in the unpack method. To me, it looks as if a different encryption algorithm is being used.

I only purchased this book a couple of days ago; it was purchased directly from the publisher.

-Wayne

wallcraft
01-10-2009, 04:22 PM
To me, it looks as if a different encryption algorithm is being used. If you open it in Windows MobiPocket Reader and right click on the ebook in the ebook view and select properties -> summary what is shown in the encryption: entry?

wmaurer
01-11-2009, 08:22 PM
If you open it in Windows MobiPocket Reader and right click on the ebook in the ebook view and select properties -> summary what is shown in the encryption: entry?

I'm sorry, I can't do that as I don't have Windows, and I can't seem to get that info from the Palm MobiPocket reader or from the Cybook. Is there anything else I can do?

xianfox
01-12-2009, 10:00 PM
I've read thru thread after thread, installed python, copied so many scripts I'm blue in the face and no matter what I've tried I've never gotten past "Bad Key Length!" I guess I won't fret too much as I haven't purchased that many Mobi DRM'd books.

I'm giving up totally on anything except MS LIT which has a system I've actually managed to use.

wmaurer
01-13-2009, 05:40 PM
If you open it in Windows MobiPocket Reader and right click on the ebook in the ebook view and select properties -> summary what is shown in the encryption: entry?

Wallcraft, I can't get Windows MobiPocket Reader working properly under Wine. Can I send you the DRM'd file so that you can see what MobiPocket Reader reports?

Your help is appreciated.
-Wayne

tompe
01-13-2009, 05:47 PM
Wallcraft, I can't get Windows MobiPocket Reader working properly under Wine. Can I send you the DRM'd file so that you can see what MobiPocket Reader reports?

Your help is appreciated.
-Wayne

I do not know if mobi2mobi detects the drm always but if there is drm info in the EXTH header you will see it. E.g:

EXTH doctype: EXTH
EXTH length: 48
EXTH n_items: 2
EXTH item: 2 - drm_commerce_id - 15 - MOBIPOCKET_0123
EXTH item: 3 - drm_ebookbase_book_id - 5 - 19122
LONGTITLE: Concise Oxford English Dictionary

wmaurer
01-13-2009, 09:42 PM
I do not know if mobi2mobi detects the drm always but if there is drm info in the EXTH header you will see it. E.g:


No, mobi2mobi doesn't seem to give any such information:

[CODE]
Version: 0
Type: TEXt
Creator: REAd
Seed: 0
Resdb:
AppInfoDirty:
ctime: -1968466898 - Fri Aug 16 12:38:22 1907
mtime: -1968466898 - Fri Aug 16 12:38:22 1907
baktime: -2082844800 - Thu Dec 31 17:00:00 1903
---------------------------------------------------
FIRST IMG Record Id: 7307629
WARNING: Record 7307820 - Image data size might be too large: 62718
---------------------------------------------------
Image record index: 365 (90 x 140)
START IMAGE INDEX: 365
COVER IMAGE INDEX: 365
PDHEADER Version: 2
PDHEADER Length: 745441
PDHEADER NRecords: 364
PDHEADER Recsize: 2048
PDHEADER Unknown: 69220
LASTID: 7307878
-----------------


I think this eBook was created using an early version of creator. With kind help, I have been able to strip it using some different dedrm code.

Thanks
-Wayne

sahmad88
02-16-2009, 11:34 PM
I've read thru thread after thread, installed python, copied so many scripts I'm blue in the face and no matter what I've tried I've never gotten past "Bad Key Length!" I guess I won't fret too much as I haven't purchased that many Mobi DRM'd books.

I'm giving up totally on anything except MS LIT which has a system I've actually managed to use.

I have tried reading through as many posts as I can find on this. Sorry if this is a simple problem, but I can't find the solution.

I am in the same boat. I can't seem to get past the "Bad Key Length!" problem either. I have run MobiDeDRM 01, 02, and 05 with no luck. Any ideas?

FizzyWater
02-17-2009, 12:14 AM
I'm not sure this is a related issue, but do you have more than one Mobi device registered for your ebooks? For example, do you have your desk top computer, a PDA, and a Cybook installed (just as an example - don't have to be exact combination!) You might try one of the other device's PIDs in that case.

The other thing I regularly "hiccup" on is that you either must have a filename (and new filename) with no spaces in it, or you have to put the filename in quotes.

So using

mobidederm05 Old Filename New Filename PIDnumber

Might give a bad length error message because it thinks "New" is the PID.

Instead, it should be

mobidederm05 OldFilename NewFilename PIDnumber

or

mobidedrm05 "Old Filename" "New Filename" PIDnumber

I'll admit, I've never tried using the quotes. I just take any spaces out of my filenames. I can always rename them later.

dregar
02-17-2009, 01:10 AM
I have tried reading through as many posts as I can find on this. Sorry if this is a simple problem, but I can't find the solution.

I am in the same boat. I can't seem to get past the "Bad Key Length!" problem either. I have run MobiDeDRM 01, 02, and 05 with no luck. Any ideas?

It may be the problem with your installation of Python. If you downloaded Python from python.org and are using version 3.10, try using version 2.60.

sahmad88
02-17-2009, 12:22 PM
It may be the problem with your installation of Python. If you downloaded Python from python.org and are using version 3.10, try using version 2.60.


Oh cool, thanks. I will give that a try and let you know how it worked. I am running 3.0.

sahmad88
02-17-2009, 12:52 PM
Yea!!! It worked. I am very excited to bring over all my ebooks from MobiPocket. Thanks again!

phenomshel
02-17-2009, 12:59 PM
I've read thru thread after thread, installed python, copied so many scripts I'm blue in the face and no matter what I've tried I've never gotten past "Bad Key Length!" I guess I won't fret too much as I haven't purchased that many Mobi DRM'd books.

I'm giving up totally on anything except MS LIT which has a system I've actually managed to use.

Same here. I won't purchase MOBI books. I purchase LIT and then reverse engineer them via Calibre to MOBI for my BlackBerry.

sahmad88
02-17-2009, 05:01 PM
Same here. I won't purchase MOBI books. I purchase LIT and then reverse engineer them via Calibre to MOBI for my BlackBerry.

I had the same problem. Dregar suggested I use Python 2.6. I had been using 3.0. He was right. It worked like a charm after that. Thanks again.

Sydney's Mom
02-17-2009, 07:08 PM
Does work like a charm. I bought some books with my fictionwise coupon last night, and was able to convert in a minute about 6 books. Now if someone could just figure out epub so I can read library books! Debra

pdurrant
02-18-2009, 05:47 AM
Oh cool, thanks. I will give that a try and let you know how it worked. I am running 3.0.

MobiDeDRM will not work with Python 3.0

There were lots of changes to the language in 3.0.

Gideon
02-18-2009, 06:42 AM
I got the Applescripts (thanks to pdurrant!) but they don't seem to be working for me.

Anyone else using them and have them working? I'm pretty positive I'm using them properly (and changed the PID in the file.) But it asks for the PID and then does... nothing.

pthwaite
02-18-2009, 12:06 PM
Yes, I use pdurrant's applescripts. Very much appreciated too and have no problems. I installed them as per his instructions. I assume you did remember to copy over the mobidedrm script as the applescript doesn't include that?

pdurrant
02-18-2009, 12:11 PM
I've heard directly. He hadn't given the filenames .prc or .mobi extensions.

Yes, I use pdurrant's applescripts. Very much appreciated too and have no problems. I installed them as per his instructions. I assume you did remember to copy over the mobidedrm script as the applescript doesn't include that?

Gideon
02-18-2009, 04:04 PM
Yep. So I fixed it in the script to read azw as well and it works like a champ now! Beats opening up parallels and moving everything to Windows to work in the command line there every time!!

If I had MobiPocket Creator for Mac I'd never need to open the thing again! Though Calibre is reducing that need somewhat.

avrignaud
02-18-2009, 05:09 PM
Hi all -

First time poster, and about to be first-time ebook/Kindle2 owner as well. :) I've been doing some research on supported book formats and found that I have some questions - I was hoping you might be able to help.

Short form, I'm a big believer in digital media... as long as I can use it on whatever device I want. I have no problem purchasing ebooks from Amazon for the Kindle, but I want to do my best to have the ability to read that book 20 years from now on whatever device makes the most sense. As such, MobiDeDRM *seems* to be a good answer. My questions are around the details - and likely fall out from my being a complete newbie here, so I apologize if these questions seem silly.

Question 1: What format does MobiDeDRM output a DRM-stripped Amazon mobipocket book format in? Is this a valid archive format I can keep (and read)? Or is it some sort of transitory format which I should translate into some other, readable format?

Question 2: If I need to translate the DRM-stripped ebook above into another format, what is recommended? I'm looking for best layout, portability, and no (or few) issues with tables, images, etc. Is it a .mobi? A .lit? etc.

The rule of three says I should have a last question, but honestly, I suspect getting the two above answered will get me a long way down the right path. :)

Thank you so much for any insight you might be able to share!

AV

pdurrant
02-19-2009, 06:36 AM
Question 1: What format does MobiDeDRM output a DRM-stripped Amazon mobipocket book format in? Is this a valid archive format I can keep (and read)? Or is it some sort of transitory format which I should translate into some other, readable format?


MobiDeDRM produces a Mobipocket format file identical to the original except for the lack of DRM.

Mobipocket format is OK as an archive format. The full specification isn't public, but enough has been reverse engineered that it's fairly easy to convert back to standard XHTML and metadata if necessary.

Question 2: If I need to translate the DRM-stripped ebook above into another format, what is recommended? I'm looking for best layout, portability, and no (or few) issues with tables, images, etc. Is it a .mobi? A .lit? etc.


Keep it as Mobipocket until you need it in something else. ePUB looks like being the best bet, but although Calibre does pretty good Mobi->ePub conversion now, it is only going to get better with time.

avrignaud
02-20-2009, 12:08 PM
MobiDeDRM produces a Mobipocket format file identical to the original except for the lack of DRM.

Mobipocket format is OK as an archive format. The full specification isn't public, but enough has been reverse engineered that it's fairly easy to convert back to standard XHTML and metadata if necessary.

Keep it as Mobipocket until you need it in something else. ePUB looks like being the best bet, but although Calibre does pretty good Mobi->ePub conversion now, it is only going to get better with time.

Thank you very much for your response!

I think I have one follow-up from your responses: how should I think about the other book formats out there? Ie, why did you recommend ePub - are there certain benefits to it vs. the Microsoft .LIT format, or the Mobi format?

akira28
02-28-2009, 07:00 PM
I am on a Mac and using python 2.61. Using pdurrant's Applescript I am receiving the following error message:

"sh: line 1: python: command not found"

Any ideas how to get through this?

Thanks.

BTW using the command line results in a "Permission denied".

akira28
02-28-2009, 10:42 PM
Well I finally found the right syntax to get this running via CLI. Applescript still gives errors, though.

Sydney's Mom
03-01-2009, 04:22 PM
I don't know anything about apple, but you can run the command prompt in windows as an administrator, and that should get rid of the permission issues. I got similar error messages when I had things on my desktop. I ended up putting python26 file on the root C:\ and putting mobidedrm in My eBooks.

TS-Rick
03-01-2009, 09:17 PM
I use the AppleScript with no problems.
Mac OS 10.5.6
Python provided with the system.

The error is saying it can't find the python program.
The script executes the following command:
python MobiDeDRMPath encryptedFilePath unlockedFilePath encryptionKey

I believe this assumes that python can be found on the path.

Is the path setup correctly?

My python is located in /usr/bin
Which points to the python provided by Leopard.

Macintosh:~ rick$ echo $PATH
/sw/bin:/sw/sbin:/Users/rick/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/bin:/usr/X11R6/bin
Macintosh:~ rick$ which python
/usr/bin/python
Macintosh:~ rick$ ls -la /usr/bin/python
lrwxr-xr-x 1 root wheel 72 Nov 5 2007 /usr/bin/python -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python
Macintosh:~ rick$

Hope this helps...

Rick

pdurrant
03-02-2009, 03:57 AM
I recommended ePUB because it is an open and documented, based on XML and HTML, all wrapped as a zip file. It should be readable with standard tools indefinitely.

Microsoft .lit format is also pretty good - internally it's also HTML, and fairly standard HTML at that (more so than Mobipocket). But as with Mobipocket, it's wrapped in a proprietary way, with no documentation on the file format. (All public documentation on .mobi, .lit, etc,., is reverse engineered.)


Thank you very much for your response!

I think I have one follow-up from your responses: how should I think about the other book formats out there? Ie, why did you recommend ePub - are there certain benefits to it vs. the Microsoft .LIT format, or the Mobi format?

pdurrant
03-02-2009, 03:58 AM
I'd guess you haven't copied the mobidedrm.py script into the resources folder of the Applescript package.

Paul

I am on a Mac and using python 2.61. Using pdurrant's Applescript I am receiving the following error message:

"sh: line 1: python: command not found"

Any ideas how to get through this?

Thanks.

BTW using the command line results in a "Permission denied".

pilotbob
03-02-2009, 10:08 AM
But as with Mobipocket, it's wrapped in a proprietary way, with no documentation on the file format. (All public documentation on .mobi, .lit, etc,., is reverse engineered.)

Really? Then what's all this then?

http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen

BOb

tompe
03-02-2009, 10:16 AM
Really? Then what's all this then?

http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen

BOb

Documentation of the thing you feed to MobiPocket Creator or mobigen to create the proprietary format.

akira28
03-02-2009, 10:40 AM
I'd guess you haven't copied the mobidedrm.py script into the resources folder of the Applescript package.

Paul

Sorry Paul, but you guessed wrong. I'm not too concerned though, but had I got it working it would have been a little easier.

akira28
03-02-2009, 10:49 AM
I use the AppleScript with no problems.
Mac OS 10.5.6
Python provided with the system.

The error is saying it can't find the python program.
The script executes the following command:
python MobiDeDRMPath encryptedFilePath unlockedFilePath encryptionKey

I believe this assumes that python can be found on the path.

Is the path setup correctly?

My python is located in /usr/bin
Which points to the python provided by Leopard.

Macintosh:~ rick$ echo $PATH
/sw/bin:/sw/sbin:/Users/rick/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/bin:/usr/X11R6/bin
Macintosh:~ rick$ which python
/usr/bin/python
Macintosh:~ rick$ ls -la /usr/bin/python
lrwxr-xr-x 1 root wheel 72 Nov 5 2007 /usr/bin/python -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python
Macintosh:~ rick$

Hope this helps...

Rick

I don't have any problems envoking the python script from the CLI so yes it's in my $PATH. Strange about the script though.

pdurrant
03-02-2009, 11:41 AM
Documentation of the peculiarities of MObipocket's HTML, along with documentation of what standard HTML Mobipocket will accept and convert into Mobipocket's particular HTML variant.

If you can find official documentation of the binary format and the various metadata stored in it, I'd be delighted. Something along the lines of the reverse-engineered info in the wiki:

http://wiki.mobileread.com/wiki/MOBI


Really? Then what's all this then?

http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen

BOb

pilotbob
03-02-2009, 02:12 PM
Documentation of the thing you feed to MobiPocket Creator or mobigen to create the proprietary format.

Ah gotcha.

BOb

Nedan
03-11-2009, 09:24 PM
I have a little Problem. Thanks for the Patch.
when i try it i get this error:

Traceback (most recent call last):
File "input\booktitle.prc", line 1, in <module>
BookTitle
NameError: name 'Book_Title' is not defined

Other files worked well.

******* Got it working ********
I had to use MobiHuff instead of DeDrm

Sanderfox
05-31-2009, 10:44 PM
...the file format is "TEXtREAd", but it's also encrypted...



I think this eBook was created using an early version of creator. With kind help, I have been able to strip it using some different dedrm code.


Hi,
I know it's some time ago, but could you explain to me what you did to fix it? Or anyone else for that matter. I'm having exactly the same problem. Thanks!

Sander

wallcraft
06-04-2009, 01:21 PM
could you explain to me what you did to fix it? There was an earlier decoding method that actually used MobiPocket's own Java code, which means that it decodes all MOBIs. However, it may now be very hard to find - see Secure Mobipocket Decoder v0.3 (http://www.mobileread.com/forums/showthread.php?t=13458).

Sanderfox
06-17-2009, 04:11 PM
Thank you for the tip. You were right, that script is now impossible to find anywhere. I also can't find any information on the TEXTREAD format. Is there anyone here that still has the old Secure Mobipocket Decoder files or has some information on the TEXTREAD format?

Sanderfox
06-17-2009, 05:56 PM
I got it! pdbshred did the trick :D It exports everything to html and bmp files. The only problem is that the bmp files aren't used correctly in the html file. It just says '<img src=BMP" for every image. Can that be changed?

kevindorsey
06-22-2009, 12:13 PM
There was an earlier decoding method that actually used MobiPocket's own Java code, which means that it decodes all MOBIs. However, it may now be very hard to find - see Secure Mobipocket Decoder v0.3 (http://www.mobileread.com/forums/showthread.php?t=13458).

Did it go the dinosaur route?

ouboub
07-17-2009, 11:12 AM
Thanks to a sample of a Mobipocket ebook for which MobiDeDRM 0.04 didn't work properly, I've made a slight adjustment to the code. The new code should work with all the ebooks that 0.04 worked with, and a few more.


Hi I tried your code on a mobi file but with the scripts .py 002.py
I obained invalid encryption type 0 bytes

and the last one 005 tells me the PID is wrong.

what can I do are there DRM protected books where the DRM can´t be removed?
Thanks

wallcraft
07-17-2009, 11:26 AM
are there DRM protected books where the DRM can´t be removed? Are you sure the MOBI has DRM? Encryption type 0 means no DRM.

If it is encrypted, it might be a "content encrypted" ebook. In other words, it has encryption but only using the generic MOBI key (not a PID-specific key). This means that can be read by any MobiPocket Reader software, on any device, but not by any non-MobiPocket software. To check for this, open the ebook with Windows MobiPocket Reader, right click in the library view and select Properties -> Summary and it will be listed as Content Encrypted. There is a version of mobidedrm.py that strips content encryption, see Mobipocket Decoder Tool #176 (http://www.mobileread.com/forums/showpost.php?p=292071&postcount=176).

ouboub
07-17-2009, 12:41 PM
Are you sure the MOBI has DRM? Encryption type 0 means no DRM.

If it is encrypted, it might be a "content encrypted" ebook. In other words, it has encryption but only using the generic MOBI key (not a PID-specific key). This means that can be read by any MobiPocket Reader software, on any device, but not by any non-MobiPocket software. To check for this, open the ebook with Windows MobiPocket Reader, right click in the library view and select Properties -> Summary and it will be listed as Content Encrypted. There is a version of mobidedrm.py that strips content encryption, see Mobipocket Decoder Tool #176 (http://www.mobileread.com/forums/showpost.php?p=292071&postcount=176).

Thanks for your rapid answer.
I did not know about content encryption.
That is really odd. I did what you explained, and there is no encryption in the summary not even content encryption.

The very strange thing is that in the manual of the dictionary it is explicitly stated that the reader has a PID maybe I misinterpreated it.

However I cannot open this mobi file with calibre to convert it to epub to read it on my ipod touch.

So maybe I can read it with the kindle software, which should only work for not DRM protected mobi files.

Sweetpea
07-17-2009, 03:00 PM
what can I do are there DRM protected books where the DRM can´t be removed?

So far, I've only one DRM protected book I can't remove the DRM from. And that's my old dictionary. It has an encryption type of 1.

ouboub
07-18-2009, 06:34 AM
So far, I've only one DRM protected book I can't remove the DRM from. And that's my old dictionary. It has an encryption type of 1.

Following the Advice from the former post
the dict. seemS not encrypted how can i figure out whether
it is tupe 1 encrypted??

demoric
08-09-2009, 03:02 PM
I had a strange error occur when using mobidedrm v0.0.2 in linux using python 2.6.2 I get the following Error: invalid PID checksum. However in windows using python 2.6.2 the script works fine.

I'm at a loss as to why this is. I would prefer to NOT have to boot into windows, and would like to assist in correcting this. ( Feel free to pm me, or to point me to an active maintainer of the code. )

====UPDATE====
Just put the PID in single 'quote' marks (or apostrophes for some) and the script worked fine. I've modified the script copy to show that requirement in the error messages.