Improve version detection.
This commit is contained in:
parent
74157d0d2c
commit
da13257a3e
@ -395,9 +395,8 @@ class TLVbinary(TLV):
|
|||||||
class TLVbinary0401(TLVbinary):
|
class TLVbinary0401(TLVbinary):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
txt = super().__str__()
|
txt = super().__str__()
|
||||||
hdr1 = unpack("<H", self.value[0:2])[0]
|
skuprobe = self.value[10:14]
|
||||||
hdr2 = unpack("<H", self.value[2:4])[0]
|
if skuprobe == b"006B":
|
||||||
if hdr1 == 0xffff or hdr2 == 0xffff:
|
|
||||||
version = unpack("<H", self.value[4:6])[0]
|
version = unpack("<H", self.value[4:6])[0]
|
||||||
sku = self.value[10:20].decode("utf-8")
|
sku = self.value[10:20].decode("utf-8")
|
||||||
hwid = int(sku[4:8])
|
hwid = int(sku[4:8])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user