mirror of
https://github.com/thecompu/Driv3rs.git
synced 2025-01-06 14:30:02 +00:00
16 lines
372 B
Python
16 lines
372 B
Python
from struct import unpack
|
|
|
|
#Is File a SOS DRIVER file?
|
|
SOSfile = open('SOSCFFA.DRIVER', 'rb')
|
|
SOS = SOSfile.read(10)
|
|
filetype, offset = unpack('< 8s H', SOS)
|
|
print "Filetype is: %s. Offset is: %04x" % (filetype, offset)
|
|
|
|
#Seek to first driver
|
|
SOSfile.seek(offset,1)
|
|
SOS = SOSfile.read(2) # Read two bytes
|
|
marker = unpack('< H', SOS)
|
|
if marker == \x0000 :
|
|
|
|
SOSfile.close()
|