View Full Version : Mobidedrm - How the heck do you use it??


reeder
05-09-2008, 11:00 PM
I PM'd several people who seemed to know, but they didn't so somebody who knows how please tell me how.
I installed ActivePython 2.5.2.2 and have all the Mobidedrm scripts in text files. Now how the hell do I actually go about using this crap to get the damn DRM off my Mobipocket book? This stuff don't come with instructions clear enough for a layman to follow through.
And for those who will jump up and down about copyright, I bought this ebook as I couldn't find it in any easier format to rip to LRF.
All I need this MobideDRM thing to do is get rid of the DRM so I can convert it myself.

So someone please just give some clear info.

wallcraft
05-09-2008, 11:17 PM
In answer to the general question of how to get a python script working, the first thing is that it should have extension .py. Then see How to make Igor's script work (http://www.mobileread.com/forums/showthread.php?t=18310) and/or The Idiot's Guide to running Igorsk's Python Scripts (http://www.mobileread.com/forums/showthread.php?t=23225). Igor's kindlefix.py is a bit simpler than the typical format shifting scripts (fewer arguments), but any well written script is likely to give you an informative usage statement if called with no arguments. Sometimes arguments need to be in quotes, and the Windows cmd shell will complete a filename if you type a few characters and hit <tab> (and it will add quotes if necessary). If the shell gives you the wrong filename the command line can be edited with arrow keys and backspace.

reeder
05-09-2008, 11:48 PM
Thanks for the response, I will try that. But I really need to convert a .prc file to anything else (html, .lit, .lrf) with ultimate purpose of ultimately converting into .LRF for the sony reader. But what I am confused about is the scripts I have for Mobidedrm are in text format with all the commands in there. Will this still be able to work?

Sorry if my tone in the initial post is flippy, but this is the most frustrating thing especially since the ebook I got is worthless to me if I can't convert it.
:angry:

wallcraft
05-10-2008, 12:19 AM
Python scripts are text files containing Python source code, which is run using the Python interpreter (the .py extension is one way for Windows to detect that the script should be run using the Python interpreter). Once you have a DRM-free MOBI file, then mobi2lrf (another Python script, part of calibre, which was formally known as libprs500) is one way to convert it. See Question about libprs500 and DRM-PRC files... (http://www.mobileread.com/forums/showthread.php?t=23043). If you have calibre installed, mobi2lrf (not mobi2lrf.py) will be in your "path" and can be run from a command window in any directory.

reeder
05-10-2008, 12:52 AM
Eureka!!!
Extremely big THANK YOU to you, Wallcraft!!! I am repping you and give you karma if I can. And I publicly state here that you have been the most helpful person to my situation in this whole forum with all your great resource links that explained how to do this extremely frustrating (for newbies) process step by step so even I could understand.
You just made a worthless purchase usable to me as I can now read my purchase on my Reader (the format from the conversion has made the text have some misspellings and spacing issues here and there, but that's normal the course with ebooks, isn't it?). Once again, big thank you to you, Mr. Wallcraft!!! :thumbsup::2thumbsup:thanks:

Tam Magnus
07-28-2008, 10:36 AM
Nice to see that someone else remembers the old Murray teleprinter code :-)

GatorDeb
09-11-2008, 03:35 PM
Ok I have mobidedrm and I ran it like this:

mobidedrm infile.prc outfile.prc PID

I tried the Kindle's PID (for the heck of it since the Mobipocket PID didn't work) and I also tried Mobipocket's PC PID. I then took that file and used it on processText's Amber Palm Converter, and the resulting files are scrambled. I used a perl script and it says it has Huff compression or something like that. Which leads me to believe it's not DRMing. Help? Thanks! :)

wallcraft
09-11-2008, 03:48 PM
I used a perl script and it says it has Huff compression or something like that. There are two levels of compression that can be used in MOBI ebooks. All (or almost all) DRM-free MOBI's use the standard compression, but some DRMed MOBIs use the high compression. Some programs won't read high compression MOBIs, even when their DRM has been stripped off.

If you want to "explode" a DRM-free MOBI (e.g. the result of mobidedrm), I recommend the python command mobi2oeb which comes with Calibre (http://calibre.kovidgoyal.net/). If you have Calibre installed, then you should be able to invoke mobi2oeb from the command line. Its primary advantage is that it handles both compression levels. An "OEB" ebook is HTML, images, and a .opf file (just as you get from exploding a LIT ebook using ConvertLIT). Unless the MOBI is already in its own directory, you should give mobi2oeb a directory name (e.g. Author_Title) to hold the output: mobi2oeb -o Author_Title Author_Title.mobi

Amalthia
09-11-2008, 03:50 PM
Ok I have mobidedrm and I ran it like this:

mobidedrm infile.prc outfile.prc PID

I tried the Kindle's PID (for the heck of it since the Mobipocket PID didn't work) and I also tried Mobipocket's PC PID. I then took that file and used it on processText's Amber Palm Converter, and the resulting files are scrambled. I used a perl script and it says it has Huff compression or something like that. Which leads me to believe it's not DRMing. Help? Thanks! :)


are your files stored in the C: directory?

I had to move everything into that directory because originally mine was in the My Documents and for some reason it wouldn't work. Um also, I'm not sure if you checked this but in the command prompt you also need to be at C:

in XP my command prompt had me starting at My Documents and I had to move down a few directories.

GatorDeb
09-11-2008, 03:54 PM
There are two levels of compression that can be used in MOBI ebooks. All (or almost all) DRM-free MOBI's use the standard compression, but some DRMed MOBIs use the high compression. Some programs won't read high compression MOBIs, even when their DRM has been stripped off.

If you want to "explode" a DRM-free MOBI (e.g. the result of mobidedrm), I recommend the python command mobi2oeb which comes with Calibre (http://calibre.kovidgoyal.net/). If you have Calibre installed, then you should be able to invoke mobi2oeb from the command line. Its primary advantage is that it handles both compression levels. An "OEB" ebook is HTML, images, and a .opf file (just as you get from exploding a LIT ebook using ConvertLIT). Unless the MOBI is already in its own directory, you should give mobi2oeb a directory name (e.g. Author_Title) to hold the output: mobi2oeb -o Author_Title Author_Title.mobi



IT WORKED BEAUTIFULLY!!! THANKS!!!! :) :) I already had Calibre installed so I just ran the command and now I have the book in HTML format !!! Thanks again!! :)

GatorDeb
09-11-2008, 04:17 PM
Well, now that I think about it, after stripping drm there really isn't a need to convert, is there? The Kindle will read them just like that?

I converted five without a problem but two gave me this error message:

Line 24 something about getsizeoftrailingdata entried and index out of range.

What could be going on with those?

Thanks again! :)

wallcraft
09-11-2008, 04:25 PM
Well, now that I think about it, after stripping drm there really isn't a need to convert, is there? The Kindle will read them just like that? Yes. The Kindle can read DRM-free MOBIs with either kind of compression.

wallcraft
09-11-2008, 04:35 PM
There were originally two version of mobidedrm and sometimes only one of the two works. There is a 4th version that is supposed to work on all files, see New Patches to MobiDeDRM 0.02 (http://www.mobileread.com/forums/showpost.php?p=222142&postcount=125).

GatorDeb
09-11-2008, 05:01 PM
Thanks, they both converted! I was only able to make 3 of the four changes:

if size <= 0:

My script didn't have that, so I couldn't make the first change. Still it worked! :)

My script was .02.

pdurrant
09-22-2008, 04:36 AM
The first change is to add two lines (one of which is the if size <= 0 line) after the line bitpos, result = 0,0

So it's not surprising you couldn't find if size <= 0 in the script.

Do make the change - otherwise there are some Mobipocket fies it won't work with.

Paul

Thanks, they both converted! I was only able to make 3 of the four changes:

if size <= 0:

My script didn't have that, so I couldn't make the first change. Still it worked! :)

My script was .02.

GatorDeb
09-28-2008, 03:52 AM
The first change is to add two lines (one of which is the if size <= 0 line) after the line bitpos, result = 0,0

So it's not surprising you couldn't find if size <= 0 in the script.

Do make the change - otherwise there are some Mobipocket fies it won't work with.

Paul
Ooopps error BCAK :p

Now I have 3 versions :D I actually have one that failed without this last change and converted beautifully with this change.

askyn
10-07-2008, 08:50 PM
If the below isnt allowed please remove and let me know. Im not linking to the script etc.

here is a very basic batch file that will help you use the scripts mentioned.

you wil have to replace YOURPIDNUMBERHERE with your own pid number from mobi reader etc.

Put it in your python diretory, put the file to be converted in your python directory then enter the following command:

dedrm filename.ext

It will run the script, remove the drm, and copy the file to the python directory. The file is now called: NAME.DEDRM.MOBI

here is the small batch file I made, if someone better then I could convert it over so that you could just double click the file to be converted and have it appear in the same directory that would be fantastic ( after you associated it of course ):

Rem this batch file will take the name passed to it, de-drm it, save it with the .mobi ext
@echo off
cls
Echo Now removeing the DRM from the file %1 , the new file will be named %~n1.DEDRM.MOBI
ECHO .
python mobidedrm.py %1 %~n1.DEDRM.mobi YOURPIDNUMBERHERE
echo .
Echo %1 now has the DRM removed and is called, %~n1.DEDRM.mobi

askyn
10-07-2008, 08:52 PM
oh and thank you for all the help every one is giving.

it took me a while to track down the script and make the patching but it will be worth it.

I own a ebookwise 1150 and several books im intersted in only come in drm mobi it seems ( =( )

now i stand a chance at beign able to read them on my machine !

kennyc
10-08-2009, 07:58 AM
Is the amazon drm identical to the mobi drm?

AnemicOak
10-08-2009, 10:03 AM
Is the amazon drm identical to the mobi drm?

For AZW it's the same, in regards to un-infecting your books.

kennyc
10-08-2009, 10:12 AM
For AZW it's the same, in regards to un-infecting your books.

Thanks. I was a bit unsure from my various readings and do not have the opportunity to test it as I do not currently own a kindle. :)

DaleDe
10-08-2009, 11:35 AM
Thanks. I was a bit unsure from my various readings and do not have the opportunity to test it as I do not currently own a kindle. :)

Amazon has two formats. TPZ (Topaz) has not be broken.

Dale

desertgrandma
10-08-2009, 11:39 AM
if you download a sample from amazon, it will show .azw, or .azw1 or .azw2.

The ones with the 1 or 2 behind them are topaz, I believe.

kennyc
10-08-2009, 11:44 AM
if you download a sample from amazon, it will show .azw, or .azw1 or .azw2.

The ones with the 1 or 2 behind them are topaz, I believe.


Ah, thanks DGM. I was just about to ask that question. You clearly are psychic! :eek:

desertgrandma
10-08-2009, 12:30 PM
Ah, thanks DGM. I was just about to ask that question. You clearly are psychic! :eek:

and sometimes, psychotic! :)

delphidb96
10-08-2009, 12:33 PM
Thanks. I was a bit unsure from my various readings and do not have the opportunity to test it as I do not currently own a kindle. :)

If you have an iPhone or iPod Touch, you can download the Kindle for iPhone app and read them. Used 2nd Gen iPod Touches are rather cheap right now. :D

However, the Topaz versions - which I've found are MOST OFTEN technical books, but some fiction comes in Topaz - run VERY SLOW on these devices.

Derek

Slite
10-08-2009, 12:33 PM
and sometimes, psychotic! :)

Which is why we all fear "THE STICK!" :)

desertgrandma
10-08-2009, 12:35 PM
Which is why we all fear "THE STICK!" :)

As well you should.................:D

Halk
10-09-2009, 01:58 PM
This wasn't as difficult as I had imagined.

This may be of help to people like me with a good general understanding of computers, but not Python.

Basically once you have installed python the windows will associate .py files with it. So all you need to do is run the python script with the right parameters - in, out, PID. You can do it with a batch file, or at a command prompt.

To make the .py file it's really just as simple as finding the code and saving it with a .py extension. You don't want the code prefixed with numbers (grab the bottom section).

AnemicOak
10-09-2009, 02:04 PM
This wasn't as difficult as I had imagined.

Yeah, it's really pretty easy. There are even versions floating around out there now with a GUI interface.

MelC
10-15-2009, 11:20 AM
Somewhat hijacked but a search didn't turn this up...Am I the only one who is finding some of the de drmed files corrupted - ie. words/paragraphs and sometimes pages missing? I have been solving this by upgrading my .py script to the most recent and doing a scan of the document to check and for the most part this seems to be working but I just wanted to make sure I wasn't missing something...

Mel

AnemicOak
10-15-2009, 11:30 AM
Somewhat hijacked but a search didn't turn this up...Am I the only one who is finding some of the de drmed files corrupted - ie. words/paragraphs and sometimes pages missing? I have been solving this by upgrading my .py script to the most recent and doing a scan of the document to check and for the most part this seems to be working but I just wanted to make sure I wasn't missing something...

Mel

No problems like that here. I'm assuming you checked against the original to make sure it wasn't just a badly produced ebook, I've had that happen a few times.

MelC
10-15-2009, 12:14 PM
Yes, I did load up the drm'd version on my Cybook and it was fine. And the difference is apparent when you compare the file converted by v.1 or v.2 of the .py vs. v.6 for example. It's not that it shows any errors in running the script, everything appears to run smoothly in terminal (running Mac OS) just that the book post script is missing stuff when you view it on Calibre or on the reader.

Mel

kennyc
10-15-2009, 12:28 PM
version 6?

Hmm...

MelC
10-15-2009, 01:03 PM
version 6?

Hmm...

Might have been 5? I'm at work so no access to check what the file version was on my home computer. Suffice it to say it was a more recent version than 1 or 2 which is what I started with.

Mel

kennyc
10-15-2009, 01:09 PM
Might have been 5? I'm at work so no access to check what the file version was on my home computer. Suffice it to say it was a more recent version than 1 or 2 which is what I started with.

Mel

Yeah I got one called 5, but thought maybe sumthin else might be crawing around.

pdurrant
10-15-2009, 01:13 PM
There is a version 6 of the script around that fixes some decoding problems similar to that described.

Yeah I got one called 5, but thought maybe sumthin else might be crawing around.

kennyc
10-15-2009, 01:22 PM
There is a version 6 of the script around that fixes some decoding problems similar to that described.

Thanks.

MelC
10-15-2009, 08:41 PM
I checked, it was v6. Amended January 2009.

Mel

kennyc
10-15-2009, 10:17 PM
Yep. I guess there was a version this neophyte was unaware of.....got it now though thanks to a really nice guy. :)

Sweetpea
10-20-2009, 09:05 AM
Hmm, time to search for version 6 then!