Second fix for
@@ -133,6 +133,7 @@ class Ticket(File):
def getMasterKeyRevision(self):
self.seekStart(0x144)
self.masterKeyRevision = self.readInt8() | self.readInt8()
+ masterKeyRevision1=self.masterKeyRevision
if self.masterKeyRevision == 0:
self.rewind()
self.seekStart(0x145)
@@ -145,6 +146,18 @@ class Ticket(File):
filename=bytearray.fromhex(filename)
self.masterKeyRevision = int(filename,16)
else:self.masterKeyRevision=0
+ elif self.masterKeyRevision >2:
+ filename = str(self._path)
+ filename = filename[:-4]
+ filename = filename[-3:-1]
+ if filename != '00':
+ filename=bytearray.fromhex(filename)
+ if int(filename,16)==self.masterKeyRevision:
+ pass
+ else:
+ self.masterKeyRevision=masterKeyRevision1
+ else:
+ self.masterKeyRevision=masterKeyRevision1
elif self.masterKeyRevision > 2:
self.rewind()
self.seekStart(0x145)
@@ -153,7 +166,9 @@ class Ticket(File):
filename = str(self._path)
filename = filename[:-4]
filename = filename[-3:-1]
- if filename != '00' and filename==test:
+ if filename != '00':
+ filename=bytearray.fromhex(filename)
+ if int(filename,16) ==test:
self.masterKeyRevision==test
return self.masterKeyRevision
