mirror of
https://github.com/thecompu/Driv3rs.git
synced 2025-04-09 12:38:16 +00:00
Adjusted text unpack so that output is converted from tuple to string.
This commit is contained in:
parent
a4510e2d62
commit
3d348670fa
@ -5,7 +5,8 @@ def readUnpack(bytes, **options):
|
||||
if options.get("type") == 't':
|
||||
#print 'DEBUG: In t'
|
||||
SOS = SOSfile.read(bytes)
|
||||
return unpack('%ss' % bytes, SOS)
|
||||
text_unpacked = unpack('%ss' % bytes, SOS)
|
||||
return ''.join(text_unpacked)
|
||||
|
||||
if options.get("type") == 'b':
|
||||
#print 'DEBUG: In b', bytes
|
||||
@ -23,7 +24,7 @@ print("\033c");
|
||||
SOSfile = open('SOSCFFA.DRIVER', 'rb')
|
||||
filetype = readUnpack(8, type = 't')
|
||||
|
||||
if 'SOS DRVR' in filetype:
|
||||
if filetype == 'SOS DRVR':
|
||||
print "This is a proper SOS file."
|
||||
print "Filetype is: %s." % (filetype)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user