mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2024-12-25 18:47:37 +06:00
CMBDTC 2.2 tweak by clarknova
This commit is contained in:
parent
6a4e9434c0
commit
f4fe0f9bee
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Comprehensive Mazama Book DRM with Topaz Cryptography V2.1
|
Comprehensive Mazama Book DRM with Topaz Cryptography V2.2
|
||||||
|
|
||||||
-----BEGIN PUBLIC KEY-----
|
-----BEGIN PUBLIC KEY-----
|
||||||
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBHJ4CNc6DNFCw4MRCw4SWAK6
|
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBHJ4CNc6DNFCw4MRCw4SWAK6
|
||||||
@ -304,7 +304,10 @@ def encodeNumber(number):
|
|||||||
byte += flag
|
byte += flag
|
||||||
result += chr(byte)
|
result += chr(byte)
|
||||||
flag = 0x80
|
flag = 0x80
|
||||||
if number == 0 : break
|
if number == 0 :
|
||||||
|
if (byte == 0xFF and negative == False) :
|
||||||
|
result += chr(0x80)
|
||||||
|
break
|
||||||
|
|
||||||
if negative:
|
if negative:
|
||||||
result += chr(0xFF)
|
result += chr(0xFF)
|
||||||
@ -650,10 +653,10 @@ def createDecryptedPayload(payload):
|
|||||||
for headerRecord in bookHeaderRecords:
|
for headerRecord in bookHeaderRecords:
|
||||||
name = headerRecord
|
name = headerRecord
|
||||||
newRecord = []
|
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
|
offset = currentOffset
|
||||||
|
|
||||||
if payload != None:
|
if payload != None:
|
||||||
@ -747,7 +750,7 @@ def main(argv=sys.argv):
|
|||||||
|
|
||||||
|
|
||||||
try:
|
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:
|
except getopt.GetoptError, err:
|
||||||
# print help information and exit:
|
# print help information and exit:
|
||||||
print str(err) # will print something like "option -a not recognized"
|
print str(err) # will print something like "option -a not recognized"
|
||||||
@ -894,3 +897,4 @@ def main(argv=sys.argv):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user