It _looks_ like there is a bug in the drmcheck.py file; at least in the version I downloaded.
In version 1.01, on line 72 it has:
cmpdata += unprocessed
But I think that puts the not yet processed bytes on the wrong end of the buffer. Shouldn't that read:
cmpdata = unprocessed + cmpdata
The worst effect I can see is failing to recognize the location of the encrypyedKey. And that would only happen if the cmpdata were larger than _MAX_SIZE which may never happen for an eBooks rights.xml file.
But in case you also use this code in other scripts, it might bite.
-Jesse Chisholm
|