|
|
Thread Tools | Search this Thread |
07-07-2008, 02:51 AM | #1 | ||
Member
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
|
"invalid PID checksum" when using mobidedrm, even though it IS valid.
I've been trying to use mobidedrm (both 0.0.1 and 0.0.2) to remove the DRM from a number of ebooks that I've purchased for use on my Kindle. The application seems to work properly, and it requests the files and PID to input. However, after doing so, I continuously get the following error message
Quote:
I located the directory and inputted the command; Quote:
I've been trying the command using the terminal in Mac OS X 10.5.3. The majority of my ebooks are purchased for HarperCollins online store, though I plan to purchase books from mobipocket's store if I can get this working. Could this error be a result of my computer, the publisher, or have I been entering something wrong all along? Any help at all would be greatly appreciated. Thanks. |
||
07-07-2008, 10:41 AM | #2 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Try putting the PID in quotes. If that does not work, put all the arguments in quotes.
|
07-07-2008, 10:11 PM | #3 | |
Member
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
|
Quote:
Error: invalid PID checksum I don't get what's going wrong with it. The script works until it comes up with the error message, and the files open on the applications with their respective PIDs. |
|
07-07-2008, 10:59 PM | #4 | |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
I suggest going to HarperCollins and finding your PIDs there. Copy one to the "clipboard "and paste it into the command line (however this is done under OS X). So far as I know the PID is always 10 characters long and the last two characters are the checksum (confirming that the 1st 8 are correct). If this works, most likely you have misread a 1 as I or a zero 0 as a O.
MobiPocket does not say how long a PID is (even though it is obvious by inspection), but it does say: incorrect PID message on web site: Quote:
If none of this works, Igor kindly provided us with the PID of someones Kindle to test kindlefix.py. So try V176CXM*FZ as the PID. It will fail because this isn't a PID authorized for your ebook, but the point is this PID has a valid checksum and so it should fail with a different error message (Error: no key found. maybe the PID is incorrect). |
|
07-09-2008, 02:42 PM | #5 | |
Gnomic Kindler
Posts: 7
Karma: 30
Join Date: Jul 2008
Location: Ohio, USA
Device: KINDLE
|
Invalid PID with mobidedrm
Wallcraft,
I'm having the same problem as Haidon and I've carefully checked and rechecked my PID. I took your suggestion and entered the PID provided by Igor. Got the same error message about an "invalid PID checksum." Any other suggestions what might be going on? Quote:
|
|
07-09-2008, 04:38 PM | #6 |
Gnomic Kindler
Posts: 7
Karma: 30
Join Date: Jul 2008
Location: Ohio, USA
Device: KINDLE
|
mobidrm
Wallcraft,
Just to let you know and anyone else having an invalid PID checksum with MobiDeDRM0.02. I went back to ver 0.01 and had no problem running the program. Something appears to be broken in ver 0.02. The only difference between the two versions that I can see is the following: Code:
def getSizeOfTrailingDataEntries(ptr, size, flags): def getSizeOfTrailingDataEntry(ptr, size): bitpos, result = 0, 0 while True: v = ord(ptr[size-1]) result |= (v & 0x7F) << bitpos bitpos += 7 size -= 1 if (v & 0x80) != 0 or (bitpos >= 28) or (size == 0): return result num = 0 flags >>= 1 while flags: if flags & 1: num += getSizeOfTrailingDataEntry(ptr, size - num) flags >>= 1 return num |
07-09-2008, 10:57 PM | #7 | |||||
Member
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
|
Quote:
Quote:
Quote:
As my attempts to run the script under Mac OS X (my main machines, unfortunately) have failed, I've also tried loading the script through an oldish Windows machine. I read a tutorial explaining that in order to run it it is necessary to create a .bat file with the following: Quote:
Quote:
Once again, thanks for any and all advice! |
|||||
07-09-2008, 11:32 PM | #8 | |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Quote:
I don't think you need a .bat file, but in any case the "usage" message is an indication that the script is being called with the wrong number of arguments (i.e. not 3). Some of the arguments may need to be in quotes. |
|
07-09-2008, 11:43 PM | #9 |
Grand Sorcerer
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
|
07-11-2008, 04:55 AM | #10 |
Member
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
|
No. I typed in the correct details for the files and the PID. I just used that as an example, as I tried it multiple ways, with and without quotation marks. Unfortunately nothing worked. I can think of no other reason for this to be other than what wallcraft suggested, that the script only works with some (likely most, but not all) PIDs.
|
07-18-2008, 08:39 AM | #11 |
Daywalker
Posts: 29
Karma: 52
Join Date: Jul 2008
Device: Kindle Paperwhite
|
You could disable the PID check and examine what mobidedrm expects. After making the changes you have to pass a 8 char PID to the python program:
(Be careful with the indentions) Code:
def __init__(self, data_file, pid): ### BEGIN NEW CODE ### # Calculate PID checksum if just the first 8 chars are specified if len(pid) == 8: pid = checksumPid(pid) print "Full PID is %s" % pid ### END NEW CODE ### if checksumPid(pid[0:-2]) != pid: raise DrmException("invalid PID checksum") pid = pid[0:-2] Does it work for you? If the decrypted result is garbage then your PID is not correct. -Red Dragon Last edited by red_dragon; 07-18-2008 at 08:44 AM. Reason: clarification and spelling |
07-24-2008, 11:21 PM | #12 |
RSS &amp; Gadget Addict!
Posts: 82
Karma: 67
Join Date: May 2005
Location: Albuquerque, NM
Device: Sony PRS-500, iPod Touch, iPhone
|
I'm another one experiencing the problem...inserting the code into the python script computed the original checksum (WE) and correctly de-decrypted a couple of test books. (I used V.01 of the script for this testing)
|
07-25-2008, 03:29 AM | #13 | ||
Member
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
|
Quote:
After adding the above code I managed to get the script working. The original PID still didn't work; strangely it returned a message telling me my 'FULL PID' was something different. Quote:
But when I took the last two digits off the PID, cutting it from 10 digits to 8, as red_dragon's code suggested, it worked flawlessly. It came up with a message similar to the one above, listing my actual PID instead of the incorrect one, and then decoded the file. I've tried it on a number of files at its worked each time. If anyone else is having the same problem I recommend trying this. Thanks to everyone who's helped solve this problem! |
||
07-25-2008, 03:18 PM | #14 |
RSS &amp; Gadget Addict!
Posts: 82
Karma: 67
Join Date: May 2005
Location: Albuquerque, NM
Device: Sony PRS-500, iPod Touch, iPhone
|
I'm going to go out on a branch here and bet that the "invalid" PIDs were all PID's from PCs (as opposed to "mobile" implementations of mobipocket PID's).
The "Dark Reverser" might want to update his official copy of his script to either diable PID checking or take PC PID checksums into account. Glad to hear that this little mystery is getting cleared up for everyone w/issues. |
07-26-2008, 10:51 AM | #15 | |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Quote:
Last edited by wallcraft; 07-26-2008 at 10:58 AM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"dx" is not a valid search keyword | sushovande | Feedback | 6 | 08-15-2010 09:20 PM |
PRS-600 "Internal content invalid. Formatting" 600 crash (is it dead ?) | zelda_pinwheel | Sony Reader | 93 | 02-18-2010 05:27 PM |
Classic "Invalid Update" | shrktank | Barnes & Noble NOOK | 4 | 02-14-2010 06:58 PM |
Error help: "Invalid input object: NoneType" | MichaelGray | ePub | 1 | 02-14-2010 09:16 AM |
Error message : "Invalid Format" " Do you want to format your internal memory" | narbeauchamp | Sony Reader | 11 | 07-22-2009 12:39 PM |