View Single Post
Old 08-05-2009, 05:54 PM   #90
Dowland
Junior Member
Dowland began at the beginning.
 
Posts: 1
Karma: 28
Join Date: Aug 2009
Device: Cybook Gen 3
Exclamation Solution.

Here comes a lengthy post to summarize the problem and give an actual solution. Please don't hesitate to reproduce this elsewhere. And also, please don't bury this post in the thread, because then nobody will ever find it ... :-)
*

Background info. A MobiPocket PID is 10 characters: 8 characters are the actual key, and 2 characters are the checksum.

Now, before doing its deed, MobileDRM looks at the PID you gave: it controls whether the checksum and the key actually correspond. If they dont, then it gives the error message we all know ("Error: invalid PID checksum"). If they do, then it cuts away the last 2 characters of the PID, and keeps only the key for the remainder of its operation.

Problem. The issue, at least in mobiledrm005.py, is that it accidentally repeats this operation twice (probably whoever wrote this did an unwitting double copy-paste). So scenario 1: your PID is incorrect, and it gets rejected on the first check. And scenario 2: your PID is correct, it passes the first check, gets shortened to its key component, and then flunks the second check.

Solution. Remove the first block from the initialization the code
Quote:
Please contact the OP for this code, as we are not allowed to host Python code of this nature on MR. Thanks for your understanding.

Moderator
Outro. It may very well be that your PID is actually incorrect, and you should browse this thread for ways to find out.

Also: opening the book after buying it unnecessary (except if your vendor does some non-standard thing I've never heard about). If this seems like it works, than a possible explanation is that opening the book actually removes the DRM (and then running MobileDRM on it gives the appearance that it actually worked ...).

Finally: no, I've never seen (valid) MobiPocket PIDs with anything but uppercase alphanumerical characters...

Last edited by mtravellerh; 08-31-2009 at 03:12 AM.
Dowland is offline   Reply With Quote