View Single Post
Old 09-09-2007, 03:39 PM   #48
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,970
Karma: 147448039
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by igorsk View Post
Here's a tool I wrote a while ago for myself which does not use any of Mobipocket's code. Python implementation is not too fast but gets the job done. Was planning to use it for adding secure mobi support to FBReader once I get around to porting it but I guess the cat is out of bag now...

Right now it only decrypts. I do have an implementation of Mobi Huff decompressor but there's some bug in it which causes wrong output at the end of decompressed text... If anyone is willing to debug it, I'll send the source.

Version 0.1
I can help beta test. I have a book that has such encoding that your program fails with. I don't think I can sort out the code issue though.

Quote:
[e:\e-books\mobipocket]demobi.bat itshourcomeround4.prc
demobi.py itshourcomeround4.prc XJ6M28H$B2
Mobipocket decoder v0.1. Copyright (c) 2007 Igor Skochinsky
Encryption: 2
compression: huffman
Mobi publication type: 2
Mobi format version: 4
Decrypting........................................ .........done.
Output written to out.mobi
JSWolf is offline   Reply With Quote