I have a file encoded in a strange template. For instance,
Char (1 byte) | Integer (4 bytes) | Double (8 bytes) | etc...
So far I have written the code below, but I have not been able to figure out why the garbage is still showing on the screen. Any help would be greatly appreciated.
BRK_File = 'commands.BRK'
input = open(BRK_File, "rb")
rev = input.read(1)
filesize = input.read(4)
highpoint = input.read(8)
which = input.read(1)
print 'Revision: ', rev
print 'File size: ', filesize
print 'High point: ', highpoint
print 'Which: ', which
while True
opcode = input.read(1)
print 'Opcode: ', opcode
if opcode = 120:
break
elif
source
share