View Single Post
Old 07-25-2008, 03:29 AM   #13
Haidon
Member
Haidon is on a distinguished road
 
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
Quote:
Originally Posted by red_dragon View Post
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
Success!

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:
FULL PID is ----------
Note: I've blanked out the actual PID. What it suggested above was the same as the actual PID for the first 7 digits, and then with a different last three. MobiDeDRM wouldn't accept it as a PID either.

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!
Haidon is offline   Reply With Quote