View Full Version : Mobigen Mobigen (KindleCreator) for Linux now available


wallcraft
06-04-2008, 10:32 AM
As Hadrian first posted (http://www.mobileread.com/forums/showpost.php?p=192907&postcount=522), MobiPocket has release an alpha of mobigen for Linux. See the Mobipocket Developer Center (http://www.mobipocket.com/dev/).

I have not tried it on ebooks yet, but running mobigen_linux with no arguments returns:

*************************************
* Kindle Creator V6.01 build 41 *
* Copyright Amazon.com 2003-2007 *
*************************************

Usage : KindleCreator filename.opf/.htm/.html/.epub [-lowpriority] [-nomin] [-c0 or -c1 or c2] [-s0 or -s1 or -s2] [-kindle] [-vouchers=n] [-nocopypaste] [-rebuild] [-onlydeps or -nodeps] [-unicode]
Options:
-c0: no compression
-c1: standard DOC compression
-c2: Mobipocket huffdic compression
-v0: quiet mode
-v1: verbose level one (default)
-v : maximum verbose level
-s0: no security
-s1: encrypted content
-s2: PID secured (retargetable) Mobipocket ebook
-kindle: syntax checking for compatibility with the kindle
-vouchers=n: [by default] use DRM v2 with n vouchers (min = 6).
-nocopypaste: does not allow any copy paste of content in Reader
-nomin: do not minimize version
-rebuild: rebuilds all dependencies
-onlydeps: build only needed dependencies
-nodeps: do not check/build dependencies
-unicode: force build of Unicode book
-lowpriority: set the PRCGEN thread priority to low (background build)
-releasenotes: display release notes
-gif: images are converted to GIF format (no JPEG in the book)


I wonder if Amazon is using Linux servers for their conversions. Does this also work under OSX?

igorsk
06-04-2008, 12:24 PM
Nope, it's purely for Linux (x86).

Roady
06-04-2008, 01:44 PM
Interesting stuff in there with just a quick glance.

They don't even try to obfuscate it, they even gently give pirates all the information they need :smack:.

Pretty careless IHMO.


.rodata:081C9BC3 public INTERNAL_PUBLISHER_KEY
.rodata:081C9BC3 INTERNAL_PUBLISHER_KEY db xxh, xxh, xxh, xxh, xxh, xxh,

.rodata:081C9BD3 public INTERNAL_READER_KEY
.rodata:081C9BD3 INTERNAL_READER_KEY db 72h, 38h, xxh, xxh, xxh, xxh, xxh, xxh, xxh, xx



People who have used drmmobi will recognize these stuff.

foozywoozy
06-04-2008, 07:56 PM
Interesting stuff in there with just a quick glance.

They don't even try to obfuscate it, they even gently give pirates all the information they need :smack:.


Wow! Does this mean that there is a single master PID for all Mobipocket files? If so, what is it??

I notice that Mobipocket has already pulled the download from their site, so they must have found the vulnerability as well!

igorsk
06-05-2008, 07:17 AM
Wow! Does this mean that there is a single master PID for all Mobipocket files?

I don't think so. As far as I understand it, the keys mentioned are used as a temporary PID when making the initial file to send to Mobipocket for distribution. When file is sent to the buyer, it's personalized with his own PID.

Roady
06-05-2008, 08:10 AM
As far as I understood, each DRMed Mobipocket file is encrypted with a unique media key.

This media key is then encrypted for each authorized device with a secret device key that is derived from the PID.

INTERNAL_READER_KEY is basically all you need to derive the device key from the PID if I read drmmobi correctly.

Therefore I don't understand that all the mobipocket generators (not only the one they removed) have this value in clear without protection. The Linux software even had all the debugging information including naming of these variables and of the function that use them.

Nate the great
06-05-2008, 09:04 AM
As far as I understood, each DRMed Mobipocket file is encrypted with a unique media key.

This media key is then encrypted for each authorized device with a secret device key that is derived from the PID.

INTERNAL_READER_KEY is basically all you need to derive the device key from the PID if I read drmmobi correctly.

Therefore I don't understand that all the mobipocket generators (not only the one they removed) have this value in clear without protection. The Linux software even had all the debugging information including naming of these variables and of the function that use them.

Really? Damn, I wish I'd gotten a copy when it was available.

Nate the great
06-06-2008, 11:47 AM
Can someone send me a copy? There are a couple new features we want to add to the ebook upload section.

IceHand
06-06-2008, 12:33 PM
Can someone send me a copy? There are a couple new features we want to add to the ebook upload section.
I've send you a copy via PM.

Nate the great
06-06-2008, 12:45 PM
Thank you.

cstross
06-06-2008, 01:11 PM
The kindle file generator is still available; I grabbed a fresh copy half an hour ago. Looks like nobody noticed after all.

Nate the great
06-06-2008, 01:13 PM
Can you provide a link? The Linux version of Mobigen is still down.

delphidb96
06-06-2008, 01:42 PM
Can you provide a link? The Linux version of Mobigen is still down.

What Nate asked, please! :)

Derek

cstross
06-06-2008, 04:00 PM
That's interesting ...

... Damn. My download file turns out to be a 404 page.

:smack:

rustak
06-09-2008, 06:36 PM
Argh, saw this too late -- would love to be able to stop using wine for my own docs, and they seem to have yanked the download. Anyone still have a copy handy?

Nate the great
06-09-2008, 06:43 PM
Here:
LINK REMOVED.

tompe
06-09-2008, 06:47 PM
Well I have it. The file does not contain any information at all about copyrigh so is it OK to put the link here? I cannot find any info on mobipockets web site either.

HarryT
06-10-2008, 03:23 AM
You're welcome to link to it here, but best not to upload the file here.

tompe
06-10-2008, 06:33 AM
The file I downloaded is here:

http://egad.dyndns.org/mobigen_linux.tar.gz

but I assume that is the same file as the one Nate put up.

EDIT: I removed the file since it seems that a new version is available.

IceHand
06-10-2008, 10:39 AM
The link (http://www.mobipocket.com/soft/prcgen/mobigen_linux.tar.gz) at Mobipocket is working again, although the program has been slightly changed (e.g. instead of Kindle Creator it's called "Mobipocket mobigen.exe"). I don't know if they made any other changes.

Nate the great
06-10-2008, 11:32 AM
I took the link down because I got this:
Hello,

It seems you are redistributing our software on your website ("Mobigen for linux") without permission. Could you please remove it from your website and link directly to the official version that is available on Mobipocket.com ?


Best Regards,

The Mobipocket team

igorsk
06-10-2008, 11:34 AM
Looks like they stripped the symbols this time. Too late guys! :D

TadW
06-10-2008, 11:51 AM
Looks like they stripped the symbols this time. Too late guys! :D

You think the guy who screwed up (by forgetting to strip the symbols) is still working for Mobipocket? :o

Also notice the reuploaded version doesn't include the Kindle-specific features.

Usage : KindleCreator filename.opf/.htm/.html/.epub [-lowpriority] [-nomin] [-c0 or -c1 or c2] [-s0 or -s1 or -s2] [-kindle] [-vouchers=n] [-nocopypaste] [-rebuild] [-onlydeps or -nodeps]
[-unicode]
Options:
-c0: no compression
-c1: standard DOC compression
-c2: Mobipocket huffdic compression
-v0: quiet mode
-v1: verbose level one (default)
-v : maximum verbose level
-s0: no security
-s1: encrypted content
-s2: PID secured (retargetable) Mobipocket ebook
-kindle: syntax checking for compatibility with the kindle
-vouchers=n: [by default] use DRM v2 with n vouchers (min = 6).
-nocopypaste: does not allow any copy paste of content in Reader
-nomin: do not minimize version
-rebuild: rebuilds all dependencies
-onlydeps: build only needed dependencies
-nodeps: do not check/build dependencies
-unicode: force build of Unicode book
-lowpriority: set the PRCGEN thread priority to low (background build)
-releasenotes: display release notes
-gif: images are converted to GIF format (no JPEG in the book)

vs.

Usage : mobigen filename.opf/.htm/.html/.epub [-lowpriority] [-nomin] [-c0 or -c1 or c2] [-s0 or -s1 or -s2] [-vouchers=n] [-nocopypaste] [-rebuild] [-onlydeps or -nodeps] [-unicode]
Options:
-c0: no compression
-c1: standard DOC compression
-c2: Mobipocket huffdic compression
-v0: quiet mode
-v1: verbose level one (default)
-v : maximum verbose level
-s0: no security
-s1: encrypted content
-s2: PID secured (retargetable) Mobipocket ebook
-vouchers=n: [by default] use DRM v2 with n vouchers (min = 6).
-nocopypaste: does not allow any copy paste of content in Reader
-nomin: do not minimize version
-rebuild: rebuilds all dependencies
-onlydeps: build only needed dependencies
-nodeps: do not check/build dependencies
-unicode: force build of Unicode book
-lowpriority: set the PRCGEN thread priority to low (background build)
-releasenotes: display release notes
-gif: images are converted to GIF format (no JPEG in the book)

HarryT
06-11-2008, 06:23 AM
You think the guy who screwed up (by forgetting to strip the symbols) is still working for Mobipocket? :o


Why? What benefit do they give the user?

TadW
07-08-2008, 04:20 AM
Why? What benefit do they give the user?

Sorry for my late reply, Harry - didn't see your question before. Well, with the debug symbols still intact, to someone with a good knowledge in assembly code and debugging tools (like igorsk) it's almost like reading from the source code. Of course this includes the code for the DRM creation...

tompe
07-08-2008, 05:36 AM
Sorry for my late reply, Harry - didn't see your question before. Well, with the debug symbols still intact, to someone with a good knowledge in assembly code and debugging tools (like igorsk) it's almost like reading from the source code. Of course this includes the code for the DRM creation...

Maybe I should try to decode it to gain more insights into the MobiPocket format. I am not interested in the DRM stuff but having a correct specification of the format would be good.

Any good tools in Linux to analyze binaries?

TadW
07-08-2008, 05:47 AM
Datarescue IDA (comes for various hosts, like Windows, Linux, Mac). Alas, it's not cheap. You may search on Google for "5.2.0.908" for more information.

Hadrien
07-08-2008, 06:07 AM
Found a bug with the Linux version. When you link to an anchor (file.html#domid) in the OPF, the link won't work with the linux version, although it works fine with the Windows version.

Alexander Turcic
07-08-2008, 06:28 AM
Hadrien, this one works for us using the Linux version:

<guide><reference type="toc" title="Table of Contents" href="guide.html%23toc">

Have you properly url-escaped the # character?

Hadrien
07-08-2008, 06:46 AM
Hadrien, this one works for us using the Linux version:

<guide><reference type="toc" title="Table of Contents" href="guide.html%23toc">

Have you properly url-escaped the # character?

That's probably the problem. No need to escape it in the Windows version, I'll try this.

Thank you for the tip Alex :thumbsup:

Alexander Turcic
07-08-2008, 07:30 AM
NP ;)

nalioth
03-17-2009, 12:32 AM
I really appreciate this site & all you knowledgable peeps.

The download link (http://www.mobileread.com/forums/showpost.php?p=196908&postcount=20) for mobigen_linux still works as of today, and if you are running 64bit linux (as more and more of us are), this page (http://www.debian-administration.org/articles/534) will get this 32bit binary running on your 64bit system.

Keep up the good works :)