Quote:
Originally Posted by igorsk
|
I've tested both books with Calibre, it can not show or transform none of them. The unscrambling method described on sven.de/librie is exactly the same I implemented in LRFTools, but for some streams it does not work.
I'm going to pm you the books.
The following code
Code:
BYTE keybyte;
declen = LengthOfStream
keybyte = (declen % PsuedoEncryptionKeyByte) + 0x0F;
if ((type == 0x11)||(type == 0x19)||(type == 0x17))
{
if (declen > 0x400) declen = 0x400;
}
for (i = 0; i < declen; i++) {
*(p + i) ^= keybyte;
}
sometimes produces a byte stream (p) wich is not a zip-encoded stream. As keybyte holds 256 possible values, I've test each value trying to unzip resulting streams. If one of them works, I suppose this is the correct keybyte an continue. This weekend I'll try to figure out how can be the keybyte be infered with these sample books directly, because I like to think LRFTools is a fast tools.