aboutsummaryrefslogtreecommitdiff
path: root/tools/make_file.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-13 15:00:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-13 15:00:30 -0700
commitfe00c08a453ecd805835525f13c0180bda8eeec3 (patch)
tree6f715dacc5f9d3728885fdd28728db84559f576d /tools/make_file.py
parent4cc863f41354edf309cab860a1f925e8d8725d3d (diff)
file tool fixes
Diffstat (limited to 'tools/make_file.py')
-rw-r--r--tools/make_file.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/make_file.py b/tools/make_file.py
index 9568ff40..6885610d 100644
--- a/tools/make_file.py
+++ b/tools/make_file.py
@@ -7,8 +7,9 @@ that and make a proper file out of it
import os, sys, re
data = open(sys.argv[1], 'r').read()
-m = re.search('\[[\d, ]*\]', data)
+m = re.search('\[[\d, -]*\]', data)
data = eval(m.group(0))
+data = [x&0xff for x in data]
string = ''.join([chr(item) for item in data])
out = open(sys.argv[1]+'.raw', 'wb')
print data[0:80]