Driv3rs/Beginning.py
ultramagnus_tcv 26d01b2e79 Initial
2015-07-28 13:46:34 -05:00

15 lines
367 B
Python

import struct
import binascii
SOSfile = open('SOSCFFA.DRIVER', 'rb')
try:
SOS = SOSfile.read()
finally:
SOSfile.close()
SOSSlice = SOS.encode('hex_codec')[0x10:0x14]
print '0x' + SOSSlice
SOSstruct = str(struct.pack('>2s', SOSSlice) [0])
print 'Packed: ' + SOSstruct
SOSunhexlify = binascii.unhexlify(SOSstruct)
print 'Unhexlified: ' + SOSunhexlify