"""
-Comprehensive Mazama Book DRM with Topaz Cryptography V2.1
+Comprehensive Mazama Book DRM with Topaz Cryptography V2.2
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBHJ4CNc6DNFCw4MRCw4SWAK6
byte += flag
result += chr(byte)
flag = 0x80
- if number == 0 : break
+ if number == 0 :
+ if (byte == 0xFF and negative == False) :
+ result += chr(0x80)
+ break
if negative:
result += chr(0xFF)
for headerRecord in bookHeaderRecords:
name = headerRecord
newRecord = []
- # if you are reading this, you might want to uncomment the next line :-D
- #if name != "dkey" :
+
+ if name != "dkey" :
- for index in range (0,len(bookHeaderRecords[name])) :
+ for index in range (0,len(bookHeaderRecords[name])) :
offset = currentOffset
if payload != None:
try:
- opts, args = getopt.getopt(sys.argv[1:], "vir:o:p:")
+ opts, args = getopt.getopt(sys.argv[1:], "vdir:o:p:")
except getopt.GetoptError, err:
# print help information and exit:
print str(err) # will print something like "option -a not recognized"
if __name__ == '__main__':
sys.exit(main())
+