Driv3rs/Beginning.py
2015-07-28 20:32:31 -05:00

22 lines
496 B
Python

import struct
import binascii
SOSfile = open('SOSCFFA.DRIVER', 'rb')
try:
SOS = SOSfile.read()
finally:
SOSfile.close()
# encode file as hexadecimal
SOSHex = SOS.encode('hex_codec')
#Search for 0x2205 byte pair
print 'Searching for first bytepair...'
SOSfindbyte = SOSHex.find('2205')
print 'I found it.'
#Reorder for Little Endian
MSB = SOSHex[SOSfindbyte+2:SOSfindbyte+4]
LSB = SOSHex[SOSfindbyte:SOSfindbyte+2]
print "In File: " + LSB, MSB + "\nLittle Endian: " + MSB, LSB