Add verbose structure output.

This commit is contained in:
Markus Birth 2018-12-10 03:00:51 +01:00
parent 28480970c4
commit 4988fc7b63
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

View File

@ -79,6 +79,13 @@ class Gcd:
tlv_length += tlv.length
last_tlv = tlv.type_id
def print_struct_full(self):
"""
Prints the structure of the parsed GCD file
"""
for i, tlv in enumerate(self.struct):
print("#{:03d}: {}".format(i, tlv))
def validate(self, print_stats: bool=False):
"""
Checks and verifies all checksums in the GCD.