mirror of
https://github.com/thecompu/Driv3rs.git
synced 2024-11-19 03:08:04 +00:00
22 lines
496 B
Python
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
|