17 lines
475 B
Python
17 lines
475 B
Python
from packet_parser_helpers import *
|
|
import time
|
|
|
|
log = open('first_real.LOG','rb').read()
|
|
|
|
types = get_type_list(packet_definitions)
|
|
|
|
index = 493
|
|
while index < len(log):
|
|
size = int.from_bytes(log[index:index + 4], byteorder = 'little', signed = False)
|
|
print("INDEX: " + str(index) + " SIZE: " + str(size) + " FILESIZE: " + str(len(log)))
|
|
cons = log[index + 4 : index + 4 + size]
|
|
read_and_process(types, cons, size)
|
|
#time.sleep(0.1)
|
|
|
|
index += 4 + size
|